mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
libthr: filter rather than link with libsys
The allows gcc + GNU ld to link programs with -m32 -pthread without erroring out due to _umtx_op_err being undefined (unless -lsys is added to the link command. We now always link _umtx_op_err into libthr (not just when it's static) and filter it with libsys so we call that implementation. The dynamic implementations (at least the assembly ones) should likely become stubs as a further refinement. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43783
This commit is contained in:
parent
49076f376a
commit
49d684369c
|
@ -13,8 +13,6 @@ MK_SSP= no
|
|||
LIB=thr
|
||||
SHLIB_MAJOR= 3
|
||||
|
||||
LIBADD= sys
|
||||
|
||||
NO_WTHREAD_SAFETY=1
|
||||
NO_WCAST_ALIGN.gcc=1 # for gcc 4.2
|
||||
CFLAGS+=-DPTHREAD_KERNEL
|
||||
|
@ -47,6 +45,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND
|
|||
.endif
|
||||
|
||||
LDFLAGS+=-Wl,-znodelete
|
||||
LDFLAGS+=-Wl,--auxiliary,libsys.so.7
|
||||
|
||||
VERSION_DEF=${SRCTOP}/lib/libc/Versions.def
|
||||
SYMBOL_MAPS=${.CURDIR}/pthread.map
|
||||
|
@ -76,7 +75,7 @@ LIBSYS_SRCTOP= ${.CURDIR:H}/libsys
|
|||
.else
|
||||
.PATH: ${LIBSYS_SRCTOP}
|
||||
.endif
|
||||
STATICOBJS+= _umtx_op_err.o
|
||||
OBJS+= _umtx_op_err.o
|
||||
|
||||
.if ${MK_INSTALLLIB} != "no"
|
||||
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
|
||||
|
|
|
@ -298,6 +298,9 @@ FBSDprivate_1.0 {
|
|||
|
||||
/* ABI bug workaround, indicate that pli->rtli_version is valid */
|
||||
_pli_rtli_version;
|
||||
|
||||
/* Expose stub for libsys filter */
|
||||
_umtx_op_err;
|
||||
};
|
||||
|
||||
FBSD_1.1 {
|
||||
|
|
Loading…
Reference in a new issue