summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-02-21 10:23:41 +0000
committerru <ru@FreeBSD.org>2002-02-21 10:23:41 +0000
commitc07193f5e6cc00015182db29333a116a0f386736 (patch)
treee7c279c006a47a9b66b7f469c896ee07e53e2bd2 /share
parent118c70fed9abb13a1decb1f77a6f0af7db9bbafd (diff)
downloadFreeBSD-src-c07193f5e6cc00015182db29333a116a0f386736.zip
FreeBSD-src-c07193f5e6cc00015182db29333a116a0f386736.tar.gz
Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1
to pick up the correct cross-tools (the compiler executables and binutils) and special linker files (crt*.o). This is now controlled by a single knob, TOOLS_PREFIX, when building cross-tools. Fixed regression in Makefile.inc1,v 1.203 (-nostdinc). This clobbered target architecture's CFLAGS with building host's CPUTYPE setting in /etc/make.conf, and had a nice but nasty side effect of exposing some (normally hidden) bugs in system headers. (Attempt to move the "-nostdinc -I..." part of CFLAGS into the new CINCLUDES (modeled after a similar CXXINCLUDES) eventually failed because hard-coding ${WORLDTMP}/usr/include to be the first in the include list does not always work, e.g. lib/libbind.) Compensate the -nostdinc removal by making cpp(1) built in the cross-tools stage to not look for <> header files in the building host's /usr/include (already committed as gnu/usr.bin/cc/cc_tools/freebsd-native.h, revisions 1.10-1.12, STANDARD_INCLUDE_DIR). : $ /usr/obj/usr/src/i386/usr/bin/cpp -v /dev/null : : Before: : : #include <...> search starts here: : /usr/obj/usr/src/i386/usr/include : /usr/include : End of search list. : : After: : : #include <...> search starts here: : /usr/obj/usr/src/i386/usr/include : /usr/obj/usr/src/i386/usr/include (Disabling the use of GCC_INCLUDE_DIR in the FREEBSD_NATIVE case would fix the duplicate above.) Get rid of the (now unneeded) -I${DESTDIR}/usr/include magic in bsd.prog.mk and bsd.lib.mk. Finish the removal of LDDESTDIR in bsd.lib.mk,v 1.55 -- we no longer have users of it. The required changes to gcc were already committed as contrib/gcc.295/gcc.c, revisions 1.23 and 1.24. Basically, this allows for the changes above plus makes gcc(1) persistent about path configuration, whether it's configured as a native or a cross compiler: : $ /usr/obj/usr/src/i386/usr/bin/cc -print-search-dirs : install: /usr/obj/usr/src/i386/usr/libexec/(null) : programs: /usr/obj/usr/src/i386/usr/libexec/elf/:/usr/obj/usr/src/i386/usr/libexec/ : libraries: /usr/obj/usr/src/i386/usr/lib/ : : $ /usr/obj/alpha/usr/src/i386/usr/bin/cc -print-search-dirs : install: /usr/obj/alpha/usr/src/i386/usr/libexec/(null) : programs: /usr/obj/alpha/usr/src/i386/usr/libexec/elf/:/usr/obj/alpha/usr/src/i386/usr/libexec/ : libraries: /usr/obj/alpha/usr/src/i386/usr/lib/ Reviewed by: bde, obrien
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.lib.mk19
-rw-r--r--share/mk/bsd.prog.mk4
2 files changed, 5 insertions, 18 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index ca8807e..06ca356 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -37,11 +37,6 @@ SHLIB_NAME?= lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif
.endif
-.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
-CFLAGS+= -I${DESTDIR}/usr/include
-CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
-.endif
-
.if defined(DEBUG_FLAGS)
CFLAGS+= ${DEBUG_FLAGS}
.endif
@@ -196,10 +191,6 @@ lib${LIB}_p.a:: ${POBJS}
${RANLIB} lib${LIB}_p.a
.endif
-.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
-LDDESTDIRENV?= LIBRARY_PATH=${DESTDIR}${SHLIBDIR}:${DESTDIR}${LIBDIR}
-.endif
-
SOBJS+= ${OBJS:.o=.So}
.if defined(SHLIB_NAME)
@@ -210,13 +201,13 @@ ${SHLIB_NAME}: ${SOBJS}
@ln -sf ${SHLIB_NAME} ${SHLIB_LINK}
.endif
.if ${OBJFORMAT} == aout
- @${LDDESTDIRENV} ${CC} -shared -Wl,-x,-assert,pure-text \
+ @${CC} -shared -Wl,-x,-assert,pure-text \
-o ${SHLIB_NAME} \
- `lorder ${SOBJS} | tsort -q` ${LDDESTDIR} ${LDADD}
+ `lorder ${SOBJS} | tsort -q` ${LDADD}
.else
- @${LDDESTDIRENV} ${CC} -shared -Wl,-x \
+ @${CC} -shared -Wl,-x \
-o ${SHLIB_NAME} -Wl,-soname,${SONAME} \
- `lorder ${SOBJS} | tsort -q` ${LDDESTDIR} ${LDADD}
+ `lorder ${SOBJS} | tsort -q` ${LDADD}
.endif
.endif
@@ -252,7 +243,7 @@ _EXTRADEPEND:
.if !defined(NOEXTRADEPEND) && defined(SHLIB_NAME)
.if ${OBJFORMAT} == aout
echo ${SHLIB_NAME}: \
- `${LDDESTDIRENV} ${CC} -shared -Wl,-f ${LDDESTDIR} ${LDADD}` \
+ `${CC} -shared -Wl,-f ${LDADD}` \
>> ${DEPENDFILE}
.else
.if defined(DPADD) && !empty(DPADD)
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 31b3855..25c9e04 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -11,10 +11,6 @@ __initialized__:
.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .s .S
CFLAGS+=${COPTS} ${DEBUG_FLAGS}
-.if defined(DESTDIR) && !defined(BOOTSTRAPPING)
-CFLAGS+= -I${DESTDIR}/usr/include
-CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
-.endif
.if !defined(DEBUG_FLAGS)
STRIP?= -s
OpenPOWER on IntegriCloud