diff options
-rw-r--r-- | lib/libc/Makefile | 3 | ||||
-rw-r--r-- | libexec/rtld-elf/Makefile | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 707fc1a46a18..8b3f201cd06a 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -5,6 +5,9 @@ SHLIBDIR?= /lib .include <src.opts.mk> +# Force building of libc_pic.a +MK_TOOLCHAIN= yes + LIBC_SRCTOP?= ${.CURDIR} # Pick the current architecture directory for libc. In general, this is diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index ae49e9bd75a3..60e08afe867f 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -45,6 +45,9 @@ CFLAGS+= -fvisibility=hidden .endif LDFLAGS+= -shared -Wl,-Bsymbolic LIBADD= c_pic +.if ${MK_TOOLCHAIN} == "no" +LDFLAGS+= -L${LIBCDIR} +.endif .if ${MACHINE_CPUARCH} == "arm" # Some of the required math functions (div & mod) are implemented in |