mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
lib{c,thr}: add DT_RUNPATH for gcc -m32
To allow gcc -m32 to work, link libc and libthr with --rpath-/usr/lib32. When called with -m32, gcc is currently unable to communicate to the bfd linker that it should look in /usr/lib32 to resolve needed (as opposed to explicitly linked) libraries so we need to provide a hint. See also: https://sourceware.org/bugzilla/show_bug.cgi?id=31395 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43910
This commit is contained in:
parent
99ea675731
commit
eb90239d08
|
@ -63,6 +63,11 @@ CFLAGS+= -ftls-model=initial-exec
|
|||
LDFLAGS+= -nodefaultlibs
|
||||
LIBADD+= compiler_rt
|
||||
LIBADD+= sys
|
||||
.if defined(COMPAT_libcompat)
|
||||
# XXX: work around gcc -m32 + bfd ld path issue for DT_NEEDED symbols.
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=31395
|
||||
LDFLAGS+= -Wl,--rpath=/usr/lib${COMPAT_libcompat}
|
||||
.endif
|
||||
|
||||
LDFLAGS+=-Wl,--auxiliary,libsys.so.7
|
||||
|
||||
|
|
|
@ -8,6 +8,11 @@ PACKAGE= clibs
|
|||
SHLIBDIR?= /lib
|
||||
|
||||
LIBADD= c sys
|
||||
.if defined(COMPAT_libcompat)
|
||||
# XXX: work around gcc -m32 + bfd ld path issue for DT_NEEDED symbols.
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=31395
|
||||
LDFLAGS+= -Wl,--rpath=/usr/lib${COMPAT_libcompat}
|
||||
.endif
|
||||
|
||||
.include <src.opts.mk>
|
||||
MK_SSP= no
|
||||
|
|
Loading…
Reference in a new issue