[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pthread*: Fix link errors on FreeBSD 5.2.1/i386
From: |
Bruno Haible |
Subject: |
pthread*: Fix link errors on FreeBSD 5.2.1/i386 |
Date: |
Sun, 15 Oct 2023 22:15:20 +0200 |
On FreeBSD 5.2.1/i386, I see these link errors:
../gllib/libgnu.a(mtx.o): In function `mtx_timedlock':
/usr/home/bruno/testdir-all/build/gllib/../../gllib/mtx.c:257: undefined
reference to `pthread_mutex_timedlock'
gmake[4]: *** [test-mtx] Error 1
test-pthread-spin.o: In function `lock_mutator_thread':
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:122:
undefined reference to `pthread_spin_lock'
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:132:
undefined reference to `pthread_spin_unlock'
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:136:
undefined reference to `pthread_spin_lock'
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:138:
undefined reference to `pthread_spin_unlock'
test-pthread-spin.o: In function `lock_checker_thread':
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:156:
undefined reference to `pthread_spin_lock'
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:158:
undefined reference to `pthread_spin_unlock'
test-pthread-spin.o: In function `main':
/home/bruno/testdir-all/build/gltests/../../gltests/test-pthread-spin.c:209:
undefined reference to `pthread_spin_init'
gmake[4]: *** [test-pthread-spin] Error 1
The cause is similar: FreeBSD declares these functions in <pthread.h>, but
does not actually define them in libthr.so.
These two patches corrects the configuration results accordingly.
2023-10-15 Bruno Haible <bruno@clisp.org>
pthread-spin: Fix link errors on FreeBSD 5.2.1/i386.
* m4/pthread-spin.m4 (gl_PTHREAD_SPIN): Test not only whether
<pthread.h> defines the pthread_spinlock_t type, but also whether the
function pthread_spin_init is actually defined.
2023-10-15 Bruno Haible <bruno@clisp.org>
pthread_mutex_timedlock: Fix link errors on FreeBSD 5.2.1/i386.
* m4/pthread_mutex_timedlock.m4 (gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK): Test
not only whether pthread_mutex_timedlock is declared, but also whether
it is actually defined.
0001-pthread_mutex_timedlock-Fix-link-errors-on-FreeBSD-5.patch
Description: Text Data
0002-pthread-spin-Fix-link-errors-on-FreeBSD-5.2.1-i386.patch
Description: Text Data
- pthread*: Fix link errors on FreeBSD 5.2.1/i386,
Bruno Haible <=