freebsd-nq/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 Pentium II's do not support SSE, that came in with the PIII 2001-03-21 08:29:39 +00:00
bsd.dep.mk $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
bsd.doc.mk Removed a no-op FILES from bsd.doc.mk. 2001-12-17 13:45:56 +00:00
bsd.docb.mk $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
bsd.info.mk Make it possible to build manpages for the entire source tree. 2001-03-27 08:43:28 +00:00
bsd.kern.mk This will have to be revised, but allow putting 'makeoptions GCC3=true' 2001-09-10 06:23:33 +00:00
bsd.kmod.mk Bring in the WARNS directive from NetBSD, localized in a new bsd.sys.mk 2001-05-19 23:18:21 +00:00
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 There is a better way to suppress groff(1) output. 2001-09-05 14:29:28 +00:00
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 Add $FreeBSD$ 2000-12-29 01:23:57 +00:00
bsd.port.post.mk $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
bsd.port.pre.mk $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
bsd.port.subdir.mk Add $FreeBSD$ 2000-12-29 01:23:57 +00:00
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 Make it possible to build manpages for the entire source tree. 2001-03-27 08:43:28 +00:00
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 Final way: Don't include /etc/defaults/make.conf at all. It wasn't 2001-08-31 12:20:43 +00:00