freebsd-dev/share/mk
Ruslan Ermilov ea5c0da93b 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
2002-02-21 10:23:41 +00:00
..
bsd.cpu.mk
bsd.dep.mk
bsd.doc.mk Removed a no-op FILES from bsd.doc.mk. 2001-12-17 13:45:56 +00:00
bsd.docb.mk
bsd.info.mk
bsd.kern.mk
bsd.kmod.mk
bsd.lib.mk Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1 2002-02-21 10:23:41 +00:00
bsd.libnames.mk Add two new libraries which are part of sendmail 8.12. libsm is used only 2002-02-17 22:01:40 +00:00
bsd.man.mk
bsd.obj.mk Neither .depend nor ${DEPENDFILE} depend on _SUBDIR. 2002-02-06 18:08:31 +00:00
bsd.own.mk Correct comment: mklocale(1) and NLS are absolutely independent 2002-02-13 18:18:13 +00:00
bsd.port.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk
bsd.prog.mk Obviate the need to set the COMPILER_PATH and LIBRARY_PATH in Makefile.inc1 2002-02-21 10:23:41 +00:00
bsd.README FILES support for bsd.prog.mk. See bsd.README for details. 2001-12-17 13:59:35 +00:00
bsd.sgml.mk
bsd.subdir.mk Back out revision 1.23 (SUBDIR_CHANGE). 2002-02-06 18:05:53 +00:00
bsd.sys.mk Put -Wno-uninitialized at the end of the warns flags as it may be enabeled 2002-01-05 20:17:50 +00:00
Makefile FILES support for bsd.prog.mk. See bsd.README for details. 2001-12-17 13:59:35 +00:00
sys.mk