diff options
author | ru <ru@FreeBSD.org> | 2002-02-21 10:23:41 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-02-21 10:23:41 +0000 |
commit | c07193f5e6cc00015182db29333a116a0f386736 (patch) | |
tree | e7c279c006a47a9b66b7f469c896ee07e53e2bd2 /share/mk/bsd.prog.mk | |
parent | 118c70fed9abb13a1decb1f77a6f0af7db9bbafd (diff) | |
download | FreeBSD-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/mk/bsd.prog.mk')
-rw-r--r-- | share/mk/bsd.prog.mk | 4 |
1 files changed, 0 insertions, 4 deletions
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 |