From a5190194a04b3ac9f041b7ca7fb4d780e408c062 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 6 Mar 2012 17:57:34 +0100 Subject: [PATCH] build: don't -L/usr/pkg/lib You might have to update the compiler-rt package! See UPDATING. . the purpose of this -L was solely to find compiler-rt, which contains runtime support code for clang-compiled binaries . this also makes all other packaged libraries visible, however . it is cleaner to isolate the base system from packages, and so compiler-rt puts itself in /usr/pkg/compiler-rt/lib/ too, which the base system henceforth uses exclusively . e.g. this solves a link failure when libfetch is installed as a package . the new compiler-rt package also puts itself in /usr/pkg/lib for 'old' systems; that is harmless. The benefit of 'new' systems is that the other packages are hidden. --- docs/UPDATING | 6 ++++++ kernel/Makefile | 2 +- share/mk/minix.service.mk | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/UPDATING b/docs/UPDATING index 052ba9c4a..f502e6ec1 100644 --- a/docs/UPDATING +++ b/docs/UPDATING @@ -1,3 +1,9 @@ +20120306: + The base system only looks in /usr/pkg/compiler-rt/lib now, so + -L/usr/pkg/lib is gone. + Please make sure you have the latest compiler-rt package + installed. + 20120214: Compiling everything with clang (previous entry) depends on a relatively new clang package. Please make sure you have at diff --git a/kernel/Makefile b/kernel/Makefile index 071e12f79..4752efee0 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -26,7 +26,7 @@ DPADD+= ${LIBMINLIB} .if ${CC} == "gcc" LDADD+= -lgcc -lsys -lgcc -lminc .elif ${CC} == "clang" -LDADD+= -L/usr/pkg/lib -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc +LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc DPADD+= ${LIBC} .endif diff --git a/share/mk/minix.service.mk b/share/mk/minix.service.mk index 19d028fd7..647124794 100644 --- a/share/mk/minix.service.mk +++ b/share/mk/minix.service.mk @@ -4,7 +4,7 @@ .if ${CC} == "gcc" LDADD+= -nodefaultlibs -lgcc -lsys -lgcc -lminc .elif ${CC} == "clang" -LDADD+= -nodefaultlibs -L/usr/pkg/lib -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc +LDADD+= -nodefaultlibs -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic -lminc .endif .include -- 2.44.0