Commit Graph

17 Commits

Author SHA1 Message Date
Bryan Drewery
12330f35fa DIRDEPS_BUILD: Fix 'make bootstrap-tools' not using the proper tblgen binaries.
This was an incomplete item from r291561.  The host {clang,llvm}-tblgen
binaries were used, rather than the ones built into the host stagedir by
normal Makefile.depend dependencies on tblgen.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-09-01 23:21:12 +00:00
Bryan Drewery
f6b9561750 DIRDEPS_BUILD: Fix bootstrap-tools not handling CCACHE_DIR properly.
CCACHE_DIR needs to be resolved to its full path before processing
legacy.meta or meta mode may see the change to the stats file.

Sponsored by:	EMC / Isilon Storage Division
2016-06-05 23:05:07 +00:00
Bryan Drewery
b7d28aff10 META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:28 +00:00
Bryan Drewery
3bed45ab81 META MODE: Rework [bootstrapped] tools PATH support.
- Support more of the toolchain from TOOLSDIR.
- This also improves 'make bootstrap-tools' to pass, for example,
  AS=/usr/bin/as to Makefile.inc1, which will tell cross-tools to use
  external toolchain support and avoid building things we won't be using
  in the build.
- Always set the PATH to contain the staged TOOLSDIR directories when
  not building the bootstrap targets.

  The previous version was only setting this at MAKE.LEVEL==0 and if the
  TOOLSDIR existed.  Both of these prevented using staged tools that were
  built during the build though as DIRDEPS with .host dependencies, such
  as the fix for needing usr.bin/localedef.host in r291311.
  This is not a common tool so we must build and use it during the build,
  and need to be prepared to change PATH as soon as it appears.

  This should also fix the issue of host dependencies disappearing from
  Makefile.depend and then reappearing due to the start of the fresh build not
  having the directory yet, resulting in the tools that were built not actually
  being used.
- Only use LEGACY_TOOLS while building in Makefile.inc1.  After r291317
  and r291546 there is no need to add LEGACY_TOOLS into the PATH for
  the pseudo/targets/toolchain build.
- Because the pseudo/targets/toolchain will now build its own
  [clang-]tblgen, the special logic in clang.build.mk is no longer needed.
- LEGACY_TOOLS is no longer used outside of targets/pseudo/bootstrap-tools
  so is no longer passed into the environment in its build.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:19:02 +00:00
Bryan Drewery
6ca6c445fd META MODE: For bootstrap-tools, don't let Makefile.inc1 build any of the
toolchain.

This change prevents building of [clang-]tblgen, which is unneeded due
to already being a host dependency where needed for
targets/pseudo/toolchain.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 00:32:09 +00:00
Bryan Drewery
dfb62a5a22 META MODE: Fix bootstrap-tools after r291349.
Now that OBJTOP is assumed to be proper, it needs to be overridden for
the bootstrap-tools phase to ensure it is not kept as the top-level
OBJTOP.  Otherwise the libraries were not found during the
bootstrap-tools phase.

Sponsored by:	EMC / Isilon Storage Division
2015-11-30 22:53:55 +00:00
Bryan Drewery
4aa63711a7 META MODE: Fix 'make bootstrap-tools'.
The main problem was bitrot after elftoolchain being swapped in for the
GNU toolchain.

This also reworks how the list of 'host allowed' libraries is determined
to only allow INTERNALLIBs, which is needed for libelftc to come in.

For usr.bin/readelf use the same hack, as libelf and libdward, to bring in
the needed sys/ headers for host builds.  This has not yet been a problem due
to readelf not being built as a host tool in buildworld.  This is possible
in the meta build though when building the toolchain.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:51 +00:00
Bryan Drewery
0695a3bcd6 META MODE: Need to include the LEGACY_TOOLS directories into PATH.
This is just as Makefile.inc1 does it for these phases.  Otherwise some
of the build tools are not found and used properly, such as 'make-roken'
in the kerberos5 build on older releases.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:44:28 +00:00
Bryan Drewery
24b1e7f11d META MODE: Avoid creating TESTS directories for bootstrap.
Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:10:56 +00:00
Bryan Drewery
1db83e6350 META MODE: Don't override DESTDIR to the default when building the toolchain.
For this case, the normal META MODE staging logic should be used.  The
BSARGS having DESTDIR= is due to Makefile.inc1 overriding DESTDIR to
something when appropriate.  For the toolchain stage META MODE is in charge of
it, not Makefile.inc1.

At least include/, if staging it to the host stagedir, was impacted from
this.  Staging of include.host is not yet done.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:10:53 +00:00
Bryan Drewery
7b3ea376a2 META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.
This both avoids some dependencies on xinstall.host and allows
bootstrapping on older releases to work due to lack of at least 'install -l'
support.

Sponsored by:	EMC / Isilon Storage Division
2015-11-25 19:10:28 +00:00
Bryan Drewery
30f1a93633 META MODE: Don't set schg flags in the stagedir for distrib-dirs.
This recently started setting /var/empty to schg after r290628.

Sponsored by:	EMC / Isilon Storage Division
2015-11-12 17:13:12 +00:00
Bryan Drewery
066a643b9f Don't create cookie until the command is all finished, it or the commands
after may fail.

Sponsored by:	EMC / Isilon Storage Division
2015-10-01 21:52:25 +00:00
Bryan Drewery
3cad5c68de META_MODE: Make it easier to keep the bootstrap-tools args in sync.
Sponsored by:	EMC / Isilon Storage Division
2015-09-26 04:22:18 +00:00
Bryan Drewery
54c7d75a06 META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:26:08 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Simon J. Gerraty
b6209a9b58 Rename pkgs to more generic targets (that's what they are)
Reviewed by:	marcel
2014-11-30 00:20:20 +00:00