History log of /netbsd-current/tools/Makefile.gnuhost
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.56 19-May-2023 lukem

Fix passing -j NNN to gmake

Use a more restrictive pattern to extract -j NNN from MAKEFLAGS
into GMAKE_J_ARGS, to avoid false positives when the source directory
has "-j" in the path (e.g "amd64-job-000012" or "src-j9999").
Previously this could pass either -"-j" or "-j BIGNUM" to gmake
and result in "vfork: Resource temporarily unavailable" failures.

PR misc/54456


# 1.55 15-May-2023 lukem

tools: if MAKEVERBOSE >=2, noisy automake builds

Explicitly build with V=1 for MAKEVERBOSE >= 2
so that Makefile.gnuhost (automake) consumers
are more consistent with native builds.

(If the upstream is using AM_SILENT_RULES(yes)
then the default is V=0).


Revision tags: netbsd-10-base
# 1.54 29-Aug-2021 rillig

branches: 1.54.2;
tools: in non-verbose mode, build the tools silently


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.53 13-Jun-2020 lukem

tools: configure --silent if MAKEVERBOSE == 0


# 1.52 13-Jun-2020 lukem

tools: if MAKEVERBOSE < 2, quieten automake builds


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.51 22-Oct-2018 maya

Adjust whitespace to look more like assignment than comparison. NFC


# 1.50 21-Oct-2018 christos

detect clang instead of bundling it with Darwin


Revision tags: pgoyette-compat-1020
# 1.49 14-Oct-2018 martin

Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422
# 1.48 17-Apr-2018 maya

branches: 1.48.2;
Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.


# 1.47 17-Apr-2018 christos

Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@


# 1.46 15-Apr-2018 christos

do the bracket nesting only for clang for now.


Revision tags: pgoyette-compat-0415
# 1.45 13-Apr-2018 snj

GCC build exceeds the macOS clang default bracket nesting level of 256.
Work around with -fbracket-depth=512.

From potr in PR toolchain/53178.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jan-2016 christos

branches: 1.44.8; 1.44.14;
look in gpl3 for stuff too (autoconf)


# 1.43 13-Jan-2016 christos

look in external first.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.42 13-Aug-2013 drochner

pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH


# 1.41 07-Aug-2013 apb

Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV. This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=... that Makefile.gnuhost stores in CONFIGURE_ENV.


# 1.40 06-Aug-2013 apb

Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost. This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.39 19-Jun-2012 hans

branches: 1.39.2;
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


Revision tags: yamt-pagecache-base5
# 1.38 18-Apr-2012 tsutsui

Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.


Revision tags: yamt-pagecache-base4 netbsd-6-base
# 1.37 21-Jan-2012 christos

branches: 1.37.2;
remove dup target.


# 1.36 20-Jan-2012 christos

Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.


# 1.35 21-Nov-2011 tsutsui

Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.34 25-Nov-2009 uebayasi

branches: 1.34.6;
Actually use timestamp file's timestamps so that things rebuild correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.33 19-Oct-2008 apb

Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.32 11-Feb-2005 jmc

Put back @ on configure line. Was off for debugging and shouldn't have been
committed.


# 1.31 11-Feb-2005 jmc

Make a BUILD_ENV that by defaults matches CONFIGURE_ENV and pass it along on
the build step. Catches things like binutils which do a bunch of configures
on the build step and lose possibly. Fixes issues from PR#29197 for lex
not being picked up here.


# 1.30 18-Oct-2004 skrll

Pass AR and RANLIB also.

OK'ed by mrg.


# 1.29 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


# 1.28 20-Jun-2004 jmc

Add $MAKE to env also. From PR#25952


# 1.27 12-Jun-2004 jmc

MKUPDATE cannot possibly do the right thing with GNU wrapped tools installs as
no dependencies are known in advance. So a simple 'build.sh -r -u' will
often lose and end up with a TOOLDIR without a toolchain, groff, etc. Fix
by forcing .install_done to always run.


Revision tags: netbsd-2-0-base
# 1.26 27-Feb-2004 skrll

branches: 1.26.2;
Backout recent changes made to gnu/lib/libgcc3 for a forced MKPIC=no build.

Fix the behaviour of native and tools gcc when MKPIC=no is specified for
platforms that mknative has determined support shared libraries.

XXX distrib/sets/sets.subr doesn't support MKPIC=no


# 1.25 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


# 1.24 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.23 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


# 1.22 18-Oct-2003 lukem

MAKEVERBOSE support


# 1.21 10-Oct-2003 dbj

add -O2 to HOST_CFLAGS on Darwin since adding "-no-cpp-precomp" there blows
it away otherwise


# 1.20 07-Oct-2003 dbj

set HOST_CFLAGS+= -no-cpp-precomp when configuring gnu software on Darwin


# 1.19 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


# 1.18 14-Mar-2003 thorpej

Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.


# 1.17 07-Feb-2003 lukem

replace DIST with GNUHOSTDIST, and don't unconditionally define it
in Makefile.gnuhost (use ?= instead of =, to allow overriding)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 26-Feb-2002 tv

Remove the "-j1" hack. This needs to be fixed better. For now, -j is
disabled at the top level anyway, making this extra hack unnecessary.


# 1.15 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


# 1.14 31-Jan-2002 tv

Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.


# 1.13 03-Jan-2002 tv

Remove stray diagnostic "echo".


# 1.12 03-Jan-2002 tv

* Honor BUILD on "make install" (will do "make all" first).

* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)


# 1.11 13-Dec-2001 tv

Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....


# 1.10 02-Dec-2001 jmc

Make sure and run sh configure as it may not have execute permissions.


# 1.9 19-Nov-2001 perry

replace instances of INSTALL_FILE with HOST_INSTALL_FILE


# 1.8 16-Nov-2001 tv

Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}. How losing....


# 1.7 14-Nov-2001 tv

Recheck the GNU configuration if ${.CURDIR}/Makefile changes.


# 1.6 14-Nov-2001 tv

Use ${INSTALL_FILE:N-U}.


# 1.5 13-Nov-2001 tv

Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.


# 1.4 13-Nov-2001 tv

Remove extraneous @echo from local changes.


# 1.3 13-Nov-2001 tv

Move around the MAKE_ARGS assignments to put the := as early as possible.


# 1.2 13-Nov-2001 tv

Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.


# 1.1 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


# 1.54 29-Aug-2021 rillig

tools: in non-verbose mode, build the tools silently


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.53 13-Jun-2020 lukem

tools: configure --silent if MAKEVERBOSE == 0


# 1.52 13-Jun-2020 lukem

tools: if MAKEVERBOSE < 2, quieten automake builds


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.51 22-Oct-2018 maya

Adjust whitespace to look more like assignment than comparison. NFC


# 1.50 21-Oct-2018 christos

detect clang instead of bundling it with Darwin


Revision tags: pgoyette-compat-1020
# 1.49 14-Oct-2018 martin

Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422
# 1.48 17-Apr-2018 maya

branches: 1.48.2;
Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.


# 1.47 17-Apr-2018 christos

Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@


# 1.46 15-Apr-2018 christos

do the bracket nesting only for clang for now.


Revision tags: pgoyette-compat-0415
# 1.45 13-Apr-2018 snj

GCC build exceeds the macOS clang default bracket nesting level of 256.
Work around with -fbracket-depth=512.

From potr in PR toolchain/53178.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jan-2016 christos

branches: 1.44.8; 1.44.14;
look in gpl3 for stuff too (autoconf)


# 1.43 13-Jan-2016 christos

look in external first.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.42 13-Aug-2013 drochner

pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH


# 1.41 07-Aug-2013 apb

Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV. This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=... that Makefile.gnuhost stores in CONFIGURE_ENV.


# 1.40 06-Aug-2013 apb

Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost. This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.39 19-Jun-2012 hans

branches: 1.39.2;
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


Revision tags: yamt-pagecache-base5
# 1.38 18-Apr-2012 tsutsui

Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.


Revision tags: yamt-pagecache-base4 netbsd-6-base
# 1.37 21-Jan-2012 christos

branches: 1.37.2;
remove dup target.


# 1.36 20-Jan-2012 christos

Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.


# 1.35 21-Nov-2011 tsutsui

Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.34 25-Nov-2009 uebayasi

branches: 1.34.6;
Actually use timestamp file's timestamps so that things rebuild correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.33 19-Oct-2008 apb

Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.32 11-Feb-2005 jmc

Put back @ on configure line. Was off for debugging and shouldn't have been
committed.


# 1.31 11-Feb-2005 jmc

Make a BUILD_ENV that by defaults matches CONFIGURE_ENV and pass it along on
the build step. Catches things like binutils which do a bunch of configures
on the build step and lose possibly. Fixes issues from PR#29197 for lex
not being picked up here.


# 1.30 18-Oct-2004 skrll

Pass AR and RANLIB also.

OK'ed by mrg.


# 1.29 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


# 1.28 20-Jun-2004 jmc

Add $MAKE to env also. From PR#25952


# 1.27 12-Jun-2004 jmc

MKUPDATE cannot possibly do the right thing with GNU wrapped tools installs as
no dependencies are known in advance. So a simple 'build.sh -r -u' will
often lose and end up with a TOOLDIR without a toolchain, groff, etc. Fix
by forcing .install_done to always run.


Revision tags: netbsd-2-0-base
# 1.26 27-Feb-2004 skrll

branches: 1.26.2;
Backout recent changes made to gnu/lib/libgcc3 for a forced MKPIC=no build.

Fix the behaviour of native and tools gcc when MKPIC=no is specified for
platforms that mknative has determined support shared libraries.

XXX distrib/sets/sets.subr doesn't support MKPIC=no


# 1.25 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


# 1.24 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.23 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


# 1.22 18-Oct-2003 lukem

MAKEVERBOSE support


# 1.21 10-Oct-2003 dbj

add -O2 to HOST_CFLAGS on Darwin since adding "-no-cpp-precomp" there blows
it away otherwise


# 1.20 07-Oct-2003 dbj

set HOST_CFLAGS+= -no-cpp-precomp when configuring gnu software on Darwin


# 1.19 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


# 1.18 14-Mar-2003 thorpej

Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.


# 1.17 07-Feb-2003 lukem

replace DIST with GNUHOSTDIST, and don't unconditionally define it
in Makefile.gnuhost (use ?= instead of =, to allow overriding)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 26-Feb-2002 tv

Remove the "-j1" hack. This needs to be fixed better. For now, -j is
disabled at the top level anyway, making this extra hack unnecessary.


# 1.15 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


# 1.14 31-Jan-2002 tv

Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.


# 1.13 03-Jan-2002 tv

Remove stray diagnostic "echo".


# 1.12 03-Jan-2002 tv

* Honor BUILD on "make install" (will do "make all" first).

* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)


# 1.11 13-Dec-2001 tv

Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....


# 1.10 02-Dec-2001 jmc

Make sure and run sh configure as it may not have execute permissions.


# 1.9 19-Nov-2001 perry

replace instances of INSTALL_FILE with HOST_INSTALL_FILE


# 1.8 16-Nov-2001 tv

Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}. How losing....


# 1.7 14-Nov-2001 tv

Recheck the GNU configuration if ${.CURDIR}/Makefile changes.


# 1.6 14-Nov-2001 tv

Use ${INSTALL_FILE:N-U}.


# 1.5 13-Nov-2001 tv

Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.


# 1.4 13-Nov-2001 tv

Remove extraneous @echo from local changes.


# 1.3 13-Nov-2001 tv

Move around the MAKE_ARGS assignments to put the := as early as possible.


# 1.2 13-Nov-2001 tv

Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.


# 1.1 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


# 1.53 13-Jun-2020 lukem

tools: configure --silent if MAKEVERBOSE == 0


# 1.52 13-Jun-2020 lukem

tools: if MAKEVERBOSE < 2, quieten automake builds


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.51 22-Oct-2018 maya

Adjust whitespace to look more like assignment than comparison. NFC


# 1.50 21-Oct-2018 christos

detect clang instead of bundling it with Darwin


Revision tags: pgoyette-compat-1020
# 1.49 14-Oct-2018 martin

Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422
# 1.48 17-Apr-2018 maya

branches: 1.48.2;
Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.


# 1.47 17-Apr-2018 christos

Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@


# 1.46 15-Apr-2018 christos

do the bracket nesting only for clang for now.


Revision tags: pgoyette-compat-0415
# 1.45 13-Apr-2018 snj

GCC build exceeds the macOS clang default bracket nesting level of 256.
Work around with -fbracket-depth=512.

From potr in PR toolchain/53178.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jan-2016 christos

branches: 1.44.8; 1.44.14;
look in gpl3 for stuff too (autoconf)


# 1.43 13-Jan-2016 christos

look in external first.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.42 13-Aug-2013 drochner

pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH


# 1.41 07-Aug-2013 apb

Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV. This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=... that Makefile.gnuhost stores in CONFIGURE_ENV.


# 1.40 06-Aug-2013 apb

Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost. This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.39 19-Jun-2012 hans

branches: 1.39.2;
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


Revision tags: yamt-pagecache-base5
# 1.38 18-Apr-2012 tsutsui

Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.


Revision tags: yamt-pagecache-base4 netbsd-6-base
# 1.37 21-Jan-2012 christos

branches: 1.37.2;
remove dup target.


# 1.36 20-Jan-2012 christos

Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.


# 1.35 21-Nov-2011 tsutsui

Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.34 25-Nov-2009 uebayasi

branches: 1.34.6;
Actually use timestamp file's timestamps so that things rebuild correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.33 19-Oct-2008 apb

Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.32 11-Feb-2005 jmc

Put back @ on configure line. Was off for debugging and shouldn't have been
committed.


# 1.31 11-Feb-2005 jmc

Make a BUILD_ENV that by defaults matches CONFIGURE_ENV and pass it along on
the build step. Catches things like binutils which do a bunch of configures
on the build step and lose possibly. Fixes issues from PR#29197 for lex
not being picked up here.


# 1.30 18-Oct-2004 skrll

Pass AR and RANLIB also.

OK'ed by mrg.


# 1.29 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


# 1.28 20-Jun-2004 jmc

Add $MAKE to env also. From PR#25952


# 1.27 12-Jun-2004 jmc

MKUPDATE cannot possibly do the right thing with GNU wrapped tools installs as
no dependencies are known in advance. So a simple 'build.sh -r -u' will
often lose and end up with a TOOLDIR without a toolchain, groff, etc. Fix
by forcing .install_done to always run.


Revision tags: netbsd-2-0-base
# 1.26 27-Feb-2004 skrll

branches: 1.26.2;
Backout recent changes made to gnu/lib/libgcc3 for a forced MKPIC=no build.

Fix the behaviour of native and tools gcc when MKPIC=no is specified for
platforms that mknative has determined support shared libraries.

XXX distrib/sets/sets.subr doesn't support MKPIC=no


# 1.25 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


# 1.24 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.23 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


# 1.22 18-Oct-2003 lukem

MAKEVERBOSE support


# 1.21 10-Oct-2003 dbj

add -O2 to HOST_CFLAGS on Darwin since adding "-no-cpp-precomp" there blows
it away otherwise


# 1.20 07-Oct-2003 dbj

set HOST_CFLAGS+= -no-cpp-precomp when configuring gnu software on Darwin


# 1.19 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


# 1.18 14-Mar-2003 thorpej

Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.


# 1.17 07-Feb-2003 lukem

replace DIST with GNUHOSTDIST, and don't unconditionally define it
in Makefile.gnuhost (use ?= instead of =, to allow overriding)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 26-Feb-2002 tv

Remove the "-j1" hack. This needs to be fixed better. For now, -j is
disabled at the top level anyway, making this extra hack unnecessary.


# 1.15 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


# 1.14 31-Jan-2002 tv

Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.


# 1.13 03-Jan-2002 tv

Remove stray diagnostic "echo".


# 1.12 03-Jan-2002 tv

* Honor BUILD on "make install" (will do "make all" first).

* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)


# 1.11 13-Dec-2001 tv

Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....


# 1.10 02-Dec-2001 jmc

Make sure and run sh configure as it may not have execute permissions.


# 1.9 19-Nov-2001 perry

replace instances of INSTALL_FILE with HOST_INSTALL_FILE


# 1.8 16-Nov-2001 tv

Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}. How losing....


# 1.7 14-Nov-2001 tv

Recheck the GNU configuration if ${.CURDIR}/Makefile changes.


# 1.6 14-Nov-2001 tv

Use ${INSTALL_FILE:N-U}.


# 1.5 13-Nov-2001 tv

Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.


# 1.4 13-Nov-2001 tv

Remove extraneous @echo from local changes.


# 1.3 13-Nov-2001 tv

Move around the MAKE_ARGS assignments to put the := as early as possible.


# 1.2 13-Nov-2001 tv

Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.


# 1.1 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.51 22-Oct-2018 maya

Adjust whitespace to look more like assignment than comparison. NFC


# 1.50 21-Oct-2018 christos

detect clang instead of bundling it with Darwin


Revision tags: pgoyette-compat-1020
# 1.49 14-Oct-2018 martin

Add FLEX to the configure env, from Lloyd Parkes on tech-toolchain.
Some configure scripts seem to need both LEX and FLEX.


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422
# 1.48 17-Apr-2018 maya

Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.


# 1.47 17-Apr-2018 christos

Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@


# 1.46 15-Apr-2018 christos

do the bracket nesting only for clang for now.


Revision tags: pgoyette-compat-0415
# 1.45 13-Apr-2018 snj

GCC build exceeds the macOS clang default bracket nesting level of 256.
Work around with -fbracket-depth=512.

From potr in PR toolchain/53178.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jan-2016 christos

branches: 1.44.8; 1.44.14;
look in gpl3 for stuff too (autoconf)


# 1.43 13-Jan-2016 christos

look in external first.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.42 13-Aug-2013 drochner

pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH


# 1.41 07-Aug-2013 apb

Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV. This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=... that Makefile.gnuhost stores in CONFIGURE_ENV.


# 1.40 06-Aug-2013 apb

Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost. This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.39 19-Jun-2012 hans

branches: 1.39.2;
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


Revision tags: yamt-pagecache-base5
# 1.38 18-Apr-2012 tsutsui

Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.


Revision tags: yamt-pagecache-base4 netbsd-6-base
# 1.37 21-Jan-2012 christos

branches: 1.37.2;
remove dup target.


# 1.36 20-Jan-2012 christos

Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.


# 1.35 21-Nov-2011 tsutsui

Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.34 25-Nov-2009 uebayasi

branches: 1.34.6;
Actually use timestamp file's timestamps so that things rebuild correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.33 19-Oct-2008 apb

Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.32 11-Feb-2005 jmc

Put back @ on configure line. Was off for debugging and shouldn't have been
committed.


# 1.31 11-Feb-2005 jmc

Make a BUILD_ENV that by defaults matches CONFIGURE_ENV and pass it along on
the build step. Catches things like binutils which do a bunch of configures
on the build step and lose possibly. Fixes issues from PR#29197 for lex
not being picked up here.


# 1.30 18-Oct-2004 skrll

Pass AR and RANLIB also.

OK'ed by mrg.


# 1.29 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


# 1.28 20-Jun-2004 jmc

Add $MAKE to env also. From PR#25952


# 1.27 12-Jun-2004 jmc

MKUPDATE cannot possibly do the right thing with GNU wrapped tools installs as
no dependencies are known in advance. So a simple 'build.sh -r -u' will
often lose and end up with a TOOLDIR without a toolchain, groff, etc. Fix
by forcing .install_done to always run.


Revision tags: netbsd-2-0-base
# 1.26 27-Feb-2004 skrll

branches: 1.26.2;
Backout recent changes made to gnu/lib/libgcc3 for a forced MKPIC=no build.

Fix the behaviour of native and tools gcc when MKPIC=no is specified for
platforms that mknative has determined support shared libraries.

XXX distrib/sets/sets.subr doesn't support MKPIC=no


# 1.25 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


# 1.24 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.23 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


# 1.22 18-Oct-2003 lukem

MAKEVERBOSE support


# 1.21 10-Oct-2003 dbj

add -O2 to HOST_CFLAGS on Darwin since adding "-no-cpp-precomp" there blows
it away otherwise


# 1.20 07-Oct-2003 dbj

set HOST_CFLAGS+= -no-cpp-precomp when configuring gnu software on Darwin


# 1.19 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


# 1.18 14-Mar-2003 thorpej

Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.


# 1.17 07-Feb-2003 lukem

replace DIST with GNUHOSTDIST, and don't unconditionally define it
in Makefile.gnuhost (use ?= instead of =, to allow overriding)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 26-Feb-2002 tv

Remove the "-j1" hack. This needs to be fixed better. For now, -j is
disabled at the top level anyway, making this extra hack unnecessary.


# 1.15 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


# 1.14 31-Jan-2002 tv

Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.


# 1.13 03-Jan-2002 tv

Remove stray diagnostic "echo".


# 1.12 03-Jan-2002 tv

* Honor BUILD on "make install" (will do "make all" first).

* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)


# 1.11 13-Dec-2001 tv

Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....


# 1.10 02-Dec-2001 jmc

Make sure and run sh configure as it may not have execute permissions.


# 1.9 19-Nov-2001 perry

replace instances of INSTALL_FILE with HOST_INSTALL_FILE


# 1.8 16-Nov-2001 tv

Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}. How losing....


# 1.7 14-Nov-2001 tv

Recheck the GNU configuration if ${.CURDIR}/Makefile changes.


# 1.6 14-Nov-2001 tv

Use ${INSTALL_FILE:N-U}.


# 1.5 13-Nov-2001 tv

Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.


# 1.4 13-Nov-2001 tv

Remove extraneous @echo from local changes.


# 1.3 13-Nov-2001 tv

Move around the MAKE_ARGS assignments to put the := as early as possible.


# 1.2 13-Nov-2001 tv

Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.


# 1.1 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.44 16-Jan-2016 christos

look in gpl3 for stuff too (autoconf)


# 1.43 13-Jan-2016 christos

look in external first.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.42 13-Aug-2013 drochner

pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH


# 1.41 07-Aug-2013 apb

Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV. This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=... that Makefile.gnuhost stores in CONFIGURE_ENV.


# 1.40 06-Aug-2013 apb

Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost. This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.39 19-Jun-2012 hans

branches: 1.39.2;
Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all.


Revision tags: yamt-pagecache-base5
# 1.38 18-Apr-2012 tsutsui

Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.


Revision tags: yamt-pagecache-base4 netbsd-6-base
# 1.37 21-Jan-2012 christos

branches: 1.37.2;
remove dup target.


# 1.36 20-Jan-2012 christos

Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.


# 1.35 21-Nov-2011 tsutsui

Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
# 1.34 25-Nov-2009 uebayasi

branches: 1.34.6;
Actually use timestamp file's timestamps so that things rebuild correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.33 19-Oct-2008 apb

Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.


Revision tags: mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.32 11-Feb-2005 jmc

Put back @ on configure line. Was off for debugging and shouldn't have been
committed.


# 1.31 11-Feb-2005 jmc

Make a BUILD_ENV that by defaults matches CONFIGURE_ENV and pass it along on
the build step. Catches things like binutils which do a bunch of configures
on the build step and lose possibly. Fixes issues from PR#29197 for lex
not being picked up here.


# 1.30 18-Oct-2004 skrll

Pass AR and RANLIB also.

OK'ed by mrg.


# 1.29 21-Jun-2004 jmc

Ignore errors on some rm -rf's for platforms that aren't quite
POSIX compliant
and return errors on r/o source (FreeBSD) for -rf. Fixes PR#25022


# 1.28 20-Jun-2004 jmc

Add $MAKE to env also. From PR#25952


# 1.27 12-Jun-2004 jmc

MKUPDATE cannot possibly do the right thing with GNU wrapped tools installs as
no dependencies are known in advance. So a simple 'build.sh -r -u' will
often lose and end up with a TOOLDIR without a toolchain, groff, etc. Fix
by forcing .install_done to always run.


Revision tags: netbsd-2-0-base
# 1.26 27-Feb-2004 skrll

branches: 1.26.2;
Backout recent changes made to gnu/lib/libgcc3 for a forced MKPIC=no build.

Fix the behaviour of native and tools gcc when MKPIC=no is specified for
platforms that mknative has determined support shared libraries.

XXX distrib/sets/sets.subr doesn't support MKPIC=no


# 1.25 15-Feb-2004 skrll

Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

- creates libgcc, libgcc_eh and libgcc_s

- updates LIBGCC_SPEC to use them appropriately.

There's a hack in here at the moment with respect to libgcc_so in that it
is preferable to link against libgcc_so will only when -shared-libgcc is
specified (the c++ frontend does this automatically.) Configurations where
LINK_EH_SPEC is defined already do this. The gcc configuration for
NetBSD/alpha and another NetBSD platform (I forget which) actually define
LINK_EH_SPEC probably by accident rather than design.

- updates share/mk to use the compiler's knowledge of what needs linking into
libraries and executables. This removes an hppa hack.

- updates the sets for the newly created libgcc* files.

- support for linking against the _pg version of libgcc has been removed.


# 1.24 26-Oct-2003 lukem

Use ${HOST_SH} instead of `sh'.

If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.


# 1.23 21-Oct-2003 lukem

Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.


# 1.22 18-Oct-2003 lukem

MAKEVERBOSE support


# 1.21 10-Oct-2003 dbj

add -O2 to HOST_CFLAGS on Darwin since adding "-no-cpp-precomp" there blows
it away otherwise


# 1.20 07-Oct-2003 dbj

set HOST_CFLAGS+= -no-cpp-precomp when configuring gnu software on Darwin


# 1.19 18-Jul-2003 lukem

Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.


# 1.18 14-Mar-2003 thorpej

Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX.


# 1.17 07-Feb-2003 lukem

replace DIST with GNUHOSTDIST, and don't unconditionally define it
in Makefile.gnuhost (use ?= instead of =, to allow overriding)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.16 26-Feb-2002 tv

Remove the "-j1" hack. This needs to be fixed better. For now, -j is
disabled at the top level anyway, making this extra hack unnecessary.


# 1.15 31-Jan-2002 tv

Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.


# 1.14 31-Jan-2002 tv

Make sure LEX and YACC are properly defined (mainly for groff); also use
a more portable grep construct.


# 1.13 03-Jan-2002 tv

Remove stray diagnostic "echo".


# 1.12 03-Jan-2002 tv

* Honor BUILD on "make install" (will do "make all" first).

* Make "make all" update the .build_done timestamp more intelligently;
if no files changed in the build tree, don't touch the timestamp.
(This allows UPDATE and BUILD to function correctly.)


# 1.11 13-Dec-2001 tv

Avoid building and installing every time, so that we don't have toolchain
dependencies cause things like constantly regenerating catpages....


# 1.10 02-Dec-2001 jmc

Make sure and run sh configure as it may not have execute permissions.


# 1.9 19-Nov-2001 perry

replace instances of INSTALL_FILE with HOST_INSTALL_FILE


# 1.8 16-Nov-2001 tv

Workaround some make(1) braindamage wrt when it tries to "auto-chdir"
back to ${.CURDIR}. How losing....


# 1.7 14-Nov-2001 tv

Recheck the GNU configuration if ${.CURDIR}/Makefile changes.


# 1.6 14-Nov-2001 tv

Use ${INSTALL_FILE:N-U}.


# 1.5 13-Nov-2001 tv

Change where the -j1 is set to disable parallelism. XXX This should not
be necessary; .NOTPARALLEL needs to be told how to work properly for
specific recursion targets.


# 1.4 13-Nov-2001 tv

Remove extraneous @echo from local changes.


# 1.3 13-Nov-2001 tv

Move around the MAKE_ARGS assignments to put the := as early as possible.


# 1.2 13-Nov-2001 tv

Make the wrapper work correctly for groff too, which uses a rather freaky
Makefile layout.


# 1.1 12-Nov-2001 tv

Major overhaul of src/tools and host toolchain. Summary of changes:

* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.

* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.

* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.

* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).

* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.

* Add src/tools/groff and set up paths to work with this cross groff.