Commit Graph

2923 Commits

Author SHA1 Message Date
Bryan Drewery
5fecb1f1d6 AUTO_OBJ is unsafe at the moment as it is for some reason removing /etc with _cleanobj. 2017-11-02 23:00:04 +00:00
Bryan Drewery
89bd07e927 DIRDEPS_BUILD: Cleanup leftover WORLDTMP files.
This will force any existing objects to rebuild if their .meta
files reference files from WORLDTMP.  This is a problem after
the UNIFIED_OBJDIR effort caused buildworld and DIRDEPS_BUILD
to share an OBJDIR.  Without cleaning these files the
Makefile.depend files end up with odd tmp/legacy/... entries
since some bootstrap-tools linger from there and otherwise
don't rebuild.  Removing the files causes anything having
used WORLDTMP to rebuild.

Sponsored by:	Dell EMC Isilon
2017-11-02 20:45:04 +00:00
Bryan Drewery
615a1e70b0 Enable AUTO_OBJ by default if the OBJDIR is writable, only for in-tree builds.
This can be disabled by putting WITHOUT_AUTO_OBJ=yes in /etc/src-env.conf, not
/etc/src.conf, or passing it in the environment.

The purpose of this rather than simply flipping the default of AUTO_OBJ to yes
is to avoid hassling users with auto.obj.mk failures if the wanted OBJDIR is
not writable. It will fallback to writing to the source directory like it does
today if MAKEOBJDIRPREFIX is not writable.

The act of enabling MK_AUTO_OBJ disables all 'make obj' treewalks since
previous work has made those not run if MK_AUTO_OBJ==yes in Makefile.inc1.

Relnotes:	yes
Reviewed by:	sjg
Discussed at:	https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12841
2017-11-02 18:09:07 +00:00
Bryan Drewery
fbb74b0ee7 Don't propagate MAKEOBJDIRPREFIX changes to environment.
A makefile may use this variable later for its own reasons,
don't infect sub-makes with that value.

Sponsored by:	Dell EMC Isilon
2017-11-02 04:05:03 +00:00
Bryan Drewery
718edb1577 META_MODE: Respect make -s.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-11-01 21:22:19 +00:00
Bryan Drewery
f8b15066f2 make obj: Skip treewalk if AUTO_OBJ is enabled.
Sponsored by:	Dell EMC Isilon
2017-11-01 21:22:16 +00:00
Bryan Drewery
dfa099890c Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR.
This changes the build OBJDIR from the older style of /usr/obj/<srcdir> for
native builds, and /usr/obj/<target>.<target_arch>/<srcdir> for cross builds to
a new simpler format of /usr/obj/<srcdir>/<target>.<target_arch>.  This
new format is used regardless of cross or native build.  It allows
easier management of multiple source tree object directories.

The UNIFIED_OBJDIR option will be removed and its feature made permanent
for the 12.0 release.

Relnotes:	yes (don't note UNIFIED_OBJDIR option since it will be removed)
Prior work:	D3711 D874
Reviewed by:	gjb, sjg
Discussed at:	https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html
Discussed with:	emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12840
2017-11-01 21:22:05 +00:00
Bryan Drewery
bec340c8f8 This check is not ready here yet.
Keeping for blame purposes, it will be enabled soon.
2017-10-31 02:25:47 +00:00
Bryan Drewery
32e7d9d0d9 AUTO_OBJ can work for crunchgen build-tools.
Sponsored by:	Dell EMC Isilon
2017-10-31 02:12:13 +00:00
Bryan Drewery
579deb45c1 Disable MK_AUTO_OBJ as a make argument like r325078.
This avoids needlessly trying to enable it opportunistically.

Sponsored by:	Dell EMC Isilon
2017-10-31 02:12:09 +00:00
Bryan Drewery
0dd60f15a5 Move some objdir handling (OBJROOT/OBJTOP) out of DIRDEPS_BUILD-only files.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:26:42 +00:00
Bryan Drewery
95137b228e Add RELOBJTOP and RELSRCTOP for relative paths.
RELSRCTOP is likely not as useful since make will always be running from
inside of .OBJDIR and using something like ${.CURDIR}/${RELSRCTOP} is
not redundant for ${SRCTOP}.

Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:41 +00:00
Bryan Drewery
a160cbfa07 DIRDEPS_BUILD: libgcc now depends on MK_LLVM_LIBUNWIND
The dependency on gnu/lib/libgcc or lib/libgcc* is determined
at 'make dirdeps' time.

Sponsored by:	Dell EMC Isilon
2017-10-31 00:03:36 +00:00
Bryan Drewery
83f4f35130 Follow-up r320149: Enable GPL_DTC if we're using GCC as the cross-compiler.
This fixes object files landing in the source tree in gnu/usr.bin/dtc
for GCC platforms.

We cannot reliably detect if an external compiler is used here, and the
default YES option does include GCC_BOOTSTRAP which implies that GCC may
be used for the build.

The problem manifests when not using an external compiler, and the host
compiler is clang.  When a fresh build is done (no OBJDIR yet) the
'make obj' treewalk is done before 'make cross-tools', so
COMPILER_FEATURES at this point contains 'c++11' since the host compiler
was used for COMPILER_FEATURES.  Once cross-tools builds the GCC
bootstrap compiler and then descends into 'make everything',
COMPILER_FEATURES no longer contains 'c++11' and MK_GPL_DTC defaults to
enabled.  Now it builds in gnu/usr.bin/dtc without an OBJDIR preset and
drops files into the source tree.

The COMPILER_FEATURES check here is useful for knowing if we can *bootstrap*
C++11 things.  Indeed we do bootstrap dtc as a build tool so it is
useful for enabling the BSD dtc for the build, but we end up needing the
GPL dtc for installation anyway.

Reviewed by:	manu, emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12817
2017-10-31 00:03:32 +00:00
Bryan Drewery
49c9ea8fe5 AUTO_OBJ: auto.obj.mk mkdir -p simplification
Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:36 +00:00
Bryan Drewery
d3e478c4c3 MAKEOBJDIR should be an absolute path, not any path with a slash.
Using MAKEOBJDIR=foo did not work but MAKEOBJDIR=foo/ did, but
really it needs to be absolute.

Sponsored by:	Dell EMC Isilon
2017-10-29 01:21:12 +00:00
Ruslan Bukin
d27927f731 Extract a set of pmcstat functions and interfaces to the new internal
library -- libpmcstat.

This includes PMC logging module, symbols lookup functions,
ELF parsing, process management, PMC attachment, etc.

This allows to reuse code while building new hwpmc(4)-based applications.

Also add pmcstat_symbol_search_by_name() function that allows to find
mapped IP range for a given function name.

Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12718
2017-10-24 16:28:00 +00:00
Enji Cooper
0c095a65a1 Fix an omission in a comment
Soft float API support applies to armv7 too after r324340
2017-10-23 07:56:56 +00:00
Jonathan Anderson
4f2fac3759 Improve computation of {BC,LL}OBJS.
Now that OBJS has grown an OBJS_SRCS_FILTER variable, use this variable
in the computation of BCOBJS and LLOBJS too. Also move BCOBJS and LLOBJS
computation to be next to the OBJS computation: this should both make
the parallel structure clearer and serve to remind people changing OBJS
that parallel changes are required in BCOBJS and LLOBJS.

A side effect of this change is that BCOBJS and LLOBJS will be available
even when LLVM_LINK has not been defined, but that seems like a positive
change: there's no reason we can't ask "what bitcode files would you
generate" just because we can't link those files together into a
complete bitcode representation of a binary or library.

Reviewed by:	sjg
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12701
2017-10-18 00:33:20 +00:00
Jonathan Anderson
6f6b66a827 Improve logic of CLEANFILES+=${PROG_FULL}.{bc,ll}.
The build rule describing how to create ${PROG_FULL}.{bc,ll} is only
dependent on LLVM_LINK being defined, not on MK_DEBUG_FILES being "yes".
Move the addition of ${PROG_FULL}.{bc,ll} out of the conditional block
under `.if ${MK_DEBUG_FILES} != "no"` and up next to where the build
rules for ${PROG_FULL}.{bc,ll} are defined.

Reviewed by:	emaste
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12703
2017-10-18 00:30:15 +00:00
Jonathan Anderson
fd8103ed43 Add LLVM IR libraries to CLEANFILES.
We previously taught the build system how to create files like libfoo.bc,
but neglected to teach it about cleaning such files up. Rectify this now.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2017-10-17 16:29:50 +00:00
Warner Losh
c8550231ef Disconnect libstand from the build.
Remove libstand from the src/lib build. Remove LIBSTAND from
bsd.libnames.mk. Add affected files to the obsolete files list.

Sponsored by: Netflix
2017-10-09 22:12:57 +00:00
Jeremie Le Hen
e415aa2846 Remove rcmds.
If they are still needed, you can find them in the net/bsdrcmds port.

This was proposed June, 20th and approved by various committers [1].
They have been marked as deprecated on CURRENT in r320644 [2] on July, 4th.
Both stable/11 and release/11.1 contain the deprecation notice (thanks to
allanjude@).

Note that ruptime(1)/rwho(1)/rwhod(8) were initially thought to be part of
rcmds but this was a mistake and those are therefore NOT removed.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2017-June/018239.html
[2] https://svnweb.freebsd.org/base?view=revision&revision=320644

Reviewed by:	bapt, brooks
Differential Revision:	https://reviews.freebsd.org/D12573
2017-10-06 08:43:14 +00:00
Warner Losh
0b972ac92e Support armv7 builds for userland
Make armv7 as a new MACHINE_ARCH.

Copy all the places we do armv6 and add armv7 as basically an
alias. clang appears to generate code for armv7 by default. armv7 hard
float isn't supported by the the in-tree gcc, so it hasn't been
updated to have a new default.

Support armv7 as a new valid MACHINE_ARCH (and by extension
TARGET_ARCH).

Add armv7 to the universe build.

Differential Revision: https://reviews.freebsd.org/D12010
2017-10-05 23:01:33 +00:00
Andriy Voskoboinyk
9e63610e82 Mark libifconfig as private library in src.libnames.mk (completes r305700) 2017-10-01 12:54:40 +00:00
Wojciech Macek
76541eb0a7 Compile loader as Little-Endian on PPC64/POWER8
Add flag to the makefile to allow loader compilation as
  Little-Endian 32-bit executable.
  Usage:

  make WITH_LOADER_FORCE_LE=yes -C sys/boot all

Submitted by:          Wojciech Macek <wma@freebsd.org>
Reviewed by:           imp, nwhitehorn
Obtained from:         Semihalf
Sponsored by:          QCM Technologies
Differential revision: https://reviews.freebsd.org/D12421
2017-09-29 06:36:19 +00:00
Simon J. Gerraty
2506d70010 Use OBJS_SRCS_FILTER to control setting OBJS from SRCS
Some makefiles do reachover builds.
In some cases it is convenient to list subdirs of the distribution
in SRCS.

It is not very convenient, or always even desirable to have corresponding
subdirs in .OBJDIR, so OBJS_SRCS_FILTER allows the makefile to choose.
The default value 'R' matches existing practice.

But a makefile can set OBJS_SRCS_FILTER= T (the R gets added by
bsd.init.mk) to avoid the need for subdirs in .OBJDIR

Differential Revision:	https://reviews.freebsd.org/D12218
Reviewed by:	bdrewery
2017-09-16 05:42:27 +00:00
Kyle Evans
bf51ff5670 bsdgrep: disable TRE implementation by default
Start the phasing out of TRE by disabling it by default. r317254 introduced
a BSD_GREP_FASTMATCH knob (defaulting to on) for testing of bsdgrep with and
without TRE enabled. More bugs have cropped up since then, and
WITHOUT_BSD_GREP_FASTMATCH has shown in testing to be more stable than its
counterpart.

Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12381
2017-09-15 15:57:15 +00:00
Ryan Libby
edaa206d08 gcc builds: reenable -Wstrict-overflow for bsd.sys.mk
This effectively reverts r304877, after having relegated the warning
suppression to the zic(8) makefile in r323572.

Reviewed by:	emaste
Sponsored by:	Dell EMC Isilon
X-Differential Revision:	https://reviews.freebsd.org/D12284
2017-09-14 03:41:49 +00:00
Bryan Drewery
5179958a28 Tweak comment for install -S usage since it does not impact the build.
The -S flag is currently ignored for builds since we filter through
tools/install.sh that is intended for both non-root and cross-builds.

Sponsored by:	Dell EMC Isilon
X-MFC-With:	r322565
2017-09-08 19:20:42 +00:00
Enji Cooper
9a1f7ce50c Revert change (r322952) that was not yet destined for ^/head
This unbreaks the build.

This happened because of a botched "svn switch".

Reported by:	cem
2017-08-27 17:08:08 +00:00
Enji Cooper
b5197de15e Try and rebase the bsd.lib.mk changes after ^/head@r322824 was merged in
Unfortunately the snippet's now broken -- need to get the matching expressions to
work properly.
2017-08-27 16:46:51 +00:00
John Baldwin
de6feefdb7 Improve the coverage of debug symbols for MK_DEBUG_FILES.
- Include debug symbols in static libraries.  This permits binaries
  to include debug symbols for functions obtained from static libraries.
- Permit the C/C++ compiler flags added for MK_DEBUG_FILES to be
  overridden by setting DEBUG_FILES_CFLAGS.  Use this to limit the debug
  information for llvm libraries and binaries.

Reviewed by:	emaste
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12025
2017-08-23 23:30:25 +00:00
Bryan Drewery
96dd05dd7d Quote ${MAKE} when passing in env in case it contains spaces.
Downstream we are wrapping MAKE with a limits(1) call which
interferes with these non-quoted cases.

Sponsored by:	Dell EMC Isilon
2017-08-16 17:54:24 +00:00
Bryan Drewery
04594feee5 Use -S for library installations except for -DNO_ROOT builds.
Also disable this if NO_SAFE_LIBINSTALL is defined.

There is little harm in always using -S and it fixes several issues:
- A race during 'make libraries' where, for example, libgcc_s is being
  installed while another library is trying to link against it.  This is
  possible because libgcc_s is connected in both _prereq_libs and
  _startup_libs.  The first build (_prereq_libs) sets MK_PROFILE=no
  while the 2nd pass (_startup_libs) enables MK_PROFILE.  Thus the
  libgcc_s library *is* present in WORLDTMP for other libraries to
  link to, so serializing further items in _startup_libs is not
  required.  Just ensuring that libgcc_s is installed atomically (via
  rename(2)) is enough. [1]
- Installation to a running system where some library that cannot be
  detected, copied and used from the temporary INSTALLTMP with LD_LIBRARY_PATH
  that the build itself uses for installation.  Such an example is having the
  install an NSS module for user lookups that install(1) uses while
  concurrently installing the module in another process.  This is not
  a problem for the FreeBSD base build but can be for downstream
  vendors.  While this is a very specific case, installation to a
  running system with non-atomic library installation is prone to many
  problems.  A further step still is to install in proper dependency
  ordering.

Reported by:	dhw many times [1]
Sponsored by:	Dell EMC Isilon
MFC after:	2 weeks
2017-08-16 05:02:31 +00:00
Enji Cooper
38f8fddf05 Add limited sandbox capability to "make check"
== Rationale ==

r295380 introduced "make check" and consolidated means for running
test code in an attempt to simplify running tests. One could either
install files/libraries/programs and run "make check", or run "make check"
with an explicit CHECKDIR, e.g., `make check CHECKDIR=$(make -V.OBJDIR)``.

One criticism that was received is that "make check" should be run with
the intent of making dev->test->commit easier, which means that the target
audience's workflow should be developers. One developer pattern available
in other opensource projects is to run test code from a developer sandbox,
instead of installing to a system.

== Method ==

This approach is slightly different from the standard approach, in the sense
that it builds and installs into a deterministic directory under .OBJDIR (as I call it,
the "sandbox"), then runs "make check" against that. In the event the test
run is successful, the deterministic directory is removed to save space.

== Approach ==

bsd.lib.mk, bsd.prog.mk:

To support this functionality, a new variable `HAS_TESTS` is being added.

HAS_TESTS enables appropriate behavior with bsd.lib.mk and bsd.prog.mk, as
follows:
- Add "make check" as an available target from the directory.
- Pass down appropriate variables via ${TESTS_ENV}, i.e.,
  ${TESTS_LD_LIBRARY_PATH} and ${TESTS_PATH}.

One should add "HAS_TESTS" to directories containing tests in them, e.g. from
bin/sh/Makefile,

  HAS_TESTS=
  SUBDIR.${MK_TESTS}+= tests

HAS_TESTS doesn't automatically add the tests subdirectory for flexibility
reasons.

bsd.opts.mk, src.opts.mk:
- The knob ${MK_MAKE_CHECK_USE_SANDBOX} has been added, both to explicitly
  direct (internally) when to set a deterministic ${DESTDIR} and to also allow
  users to disable this behavior globally, i.e., via src.conf.
- MK_TESTS has been promoted from src.opts.mk to bsd.opts.mk to leverage
  syntactic sugar for having MK_TESTS be a dependency for
  MK_MAKE_CHECK_USE_SANDBOX, but to also ensure that src.opts.mk isn't required
  to use suite.test.mk (which is a dependency of bsd.test.mk).

suite.test.mk:
- beforecheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Build.
-- Run "make hierarchy" on the sandbox dir.
-- Install the tests/files to the sandbox dir.
- aftercheck behavior (when MK_MAKE_CHECK_USE_SANDBOX is enabled) is modified
  from a no-op to:
-- Remove the sandbox dir.

Again, because the dependency order set in bsd.test.mk is
beforecheck -> check -> aftercheck, "make check" will not be run unless
"beforecheck" completes successfully, and "aftercheck" will not be run unless
"beforecheck" and "check" complete successfully.

== Caveats ==

- This target must either be run with MK_INSTALL_AS_USER or as root. Otherwise
  it will fail when running "make install" as the default user/group for many
  makefiles when calling INSTALL is root/wheel.
- This target must be run from a suitable top-level directory. For example,
  running tests from `tests/sys/fs/tmpfs` won't work, but `tests/sys/fs` will,
  because `tests/sys/fs/tmpfs` relies on files installed by `tests/sys/fs`.
- Running MK_INSTALL_AS_USER may introduce determinism issues. However, using
  it could identify deficiences in tests in terms of needing to be run as
  root, which are not properly articulated in the test requirements.
- The doesn't negate the need for running "make installworld" and
  "make checkworld", etc. Again, this just is intended to simplify the
  dev->test->commit workflow.

== Cleanup done ==
- CHECKDIR is removed; one can use "MK_MAKE_CHECK_USE_SANDBOX=no" to enable
  "legacy" (r295380) behavior.

MFC after:	2 months
Relnotes:	yes (CHECKDIR removed; "make check" behavior changed)
Requested by:	jhb
Reviewed by:	arch (silence), testing (silence)
Differential Revision:	D11905
2017-08-14 19:03:05 +00:00
Warner Losh
06d0095e71 We don't use ARM_ARCH_6 in the tree, and haven't for a long long
time. Remove it from here. As far as I could tell, nothing in ports
use it (either __ARM_ARCH or __ARM_ARCH_6__ is used in all the
apatches). We do have a define for _ARM_ARCH_6, but it's mostly unused
(and will remain, since it isn't in this file).
2017-08-13 04:10:47 +00:00
Enji Cooper
7a6fd8dc6b Delete trailing whitespace
MFC after:	1 month
2017-08-12 21:26:46 +00:00
Li-Wen Hsu
229d577fe8 Re-remove excess / for installing SYMLINKS
This excess / was introduced in r280129, and fixed in r295230, but got
re-introduced while merging another branch in r298107.

Approved by:	gjb
Differential Revision:	https://reviews.freebsd.org/D11995
2017-08-12 18:11:41 +00:00
Warner Losh
9208cbbd0e arm*hf is no longer a thing, remove it from the conversion now that it's easy.
Submitted by: andyt@
2017-08-12 17:07:32 +00:00
Warner Losh
7709b2ae16 Make _TO_CPUARCH macro for ARCH to CPUARCH conversions
Consolidate all the regular expressions to convert from MACHINE_ARCH
to MACHINE_CPUARCH into a variable and use that variable in preference
to the almost identical copies in the tree (which should have been
identical).

Differential Revision: https://reviews.freebsd.org/D11986
2017-08-12 17:07:27 +00:00
Ed Maste
056dd75b27 lldb: enable on i386
It is functional on FreeBSD/i386 as of r322326.

Sponsored by:	The FreeBSD Foundation
2017-08-11 20:11:43 +00:00
Glen Barber
ebd2eeb3f8 Add SVNVERSION_CMD to bsd.own.mk, adding the capability to include
svnversion metadata to the runtime and kernel packages.

Instead of traversing src/sys, as is done by newvers.sh for uname(1),
a full tree walk is done to prevent userland and/or modifications
from not being reflected in a modified tree (M).

MFC after:	5 days
Sponsored by:	The FreeBSD Foundation
2017-08-11 19:21:40 +00:00
Ruslan Bukin
af19cc59ca Support for v1.10 (latest) of RISC-V privilege specification.
New version is not compatible on supervisor mode with v1.9.1
(previous version).

Highlights:
    o BBL (Berkeley Boot Loader) provides no initial page tables
      anymore allowing us to choose VM, to build page tables manually
      and enable MMU in S-mode.
    o SBI interface changed.
    o GENERIC kernel.
      FDT is now chosen standard for RISC-V hardware description.
      DTB is now provided by Spike (golden model simulator). This
      allows us to introduce GENERIC kernel. However, description
      for console and timer devices is not provided in DTB, so move
      these devices temporary to nexus bus.
    o Supervisor can't access userspace by default. Solution is to
      set SUM (permit Supervisor User Memory access) bit in sstatus
      register.
    o Compressed extension is now turned on by default.
    o External GCC 7.1 compiler used.
    o _gp renamed to __global_pointer$
    o Compiler -march= string is now in use allowing us to choose
      required extensions (compressed, FPU, atomic, etc).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11800
2017-08-10 14:18:09 +00:00
Ed Maste
2427dc7d95 Mark PROFILE option as broken when targetting mips64
The assembly in sys/mips/include/profile.h will only work for o32 ABI.

Submitted by:	Alexander Richardson
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D11950
2017-08-10 13:01:19 +00:00
Enji Cooper
ba25b1ca42 Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"
src.conf(5) should document which knobs are which and the dependency between each;
remove the comment so the variable can apply to non-"meta mode options".

MFC after:	2 weeks
2017-08-02 21:49:37 +00:00
Enji Cooper
edb58145c8 Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

MFC after:	1 month
2017-08-02 21:38:15 +00:00
Enji Cooper
f117e4e1df Some minor doc fixups
- Tweak a sentence by placing the modifier before an adjective to make it flow
  better.
- Fix a typo.

MFC after:	3 days
2017-08-02 21:31:46 +00:00
Bryan Drewery
91234af7d8 CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.
- bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first
  in PATH.
- Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it
  overrides the PATH set in bsd.compiler.mk in sub-makes.  The PATH
  set in bsd.compiler.mk is not exported and doing so would cause it to
  then override the BPATH set from environment.  The only sane solution
  is to prepend into BPATH as needed.
CCACHE_PATH could possibly be used for some of this as well.

Sponsored by:	Dell EMC Isilon
2017-08-01 18:26:20 +00:00
Bryan Drewery
e2a659ea64 CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.
This uses the /usr/local/libexec/ccache/<cc,c++> wrappers rather than
modifying CC to be '/usr/local/bin/ccache cc'.  Some forms of compilation
do not support the 'command' type.

Sponsored by:	Dell EMC Isilon
2017-08-01 16:15:08 +00:00