From c07193f5e6cc00015182db29333a116a0f386736 Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 21 Feb 2002 10:23:41 +0000 Subject: 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 --- Makefile.inc1 | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 28b29f1..1fab98d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -167,11 +167,7 @@ INSTALLTMP!= /usr/bin/mktemp -d -u -t install CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ - COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ - LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib \ OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \ - CFLAGS="-nostdinc ${CFLAGS}" \ - CXXINCLUDES="-nostdinc++ ${CXXINCLUDES}" \ PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.6.0 \ GROFF_BIN_PATH=${WORLDTMP}/usr/bin \ GROFF_FONT_PATH=${WORLDTMP}/usr/share/groff_font \ -- cgit v1.1