Commit Graph

54 Commits

Author SHA1 Message Date
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Bryan Drewery
9e2f435fc1 Add a 'make print-dir' that simply traverses all directories and prints them.
This is useful for finding connected directories.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-08-31 19:30:52 +00:00
Ed Maste
fd406aa3de Remove ${OBJDUMP} as it is not used by the base system
It was added to sys.mk relatively recently (r274503) for EFI builds
but is no longer used by the base system. The in-tree binutils are
outdated, will not be updated, and will be removed in the future.
Remove it from the toolchain build now to slightly simplify the build
and make sure we don't grow an accidental dependency.

Note that this affects only the toolchain build, and does not affect
/usr/bin/objdump in the built world.

Reviewed by:	bdrewery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6460
2016-07-27 14:58:15 +00:00
Bryan Drewery
3681768c3f WITH_META_MODE: Enable bmake's missing meta rebuild feature 2016-06-05 23:04:42 +00:00
Bryan Drewery
409bf2b097 DIRDEPS_BUILD: Don't show finished stats, which confuses crunchgen(1).
It would show 'make error:' lines for each auto object directory created.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:20 +00:00
Bryan Drewery
d0694f2738 WITH_DIRDEPS_BUILD: Fix forcing user to run bootstrap-tools.
This is a follow-up to r299289.  If the user did not run bootstrap-tools
for this directory then just build the tool as normal.  It assumes that
TARGET == MACHINE, but that was already the case before r299289.

Sponsored by:	EMC / Isilon Storage Division
2016-05-21 01:31:44 +00:00
Warner Losh
2c0e9e2a09 Make armv6 hard float abi by default. Kill armv6hf.
Allow CPUTYPE=soft to build the current soft-float abi libraries.
Add UPDATING entry to announce this.

Approved by: re@ (gjb)
2016-05-18 06:01:18 +00:00
Bryan Drewery
29df9f6b75 DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.
This avoids running target binaries.

Sponsored by:	EMC / Isilon Storage Division
2016-05-09 22:21:09 +00:00
Bryan Drewery
5528bda1b2 Revert r297833 which committed the wrong file 2016-04-11 21:12:00 +00:00
Bryan Drewery
63208a7a29 META_MODE: Support targets that already have .OBJDIR in them for META_COOKIE.
Sponsored by:	EMC / Isilon Storage Division
2016-04-11 21:10:14 +00:00
Bryan Drewery
8e8df7d50a DIRDEPS_BUILD: Use 1 parameter for defining -rpath-link.
Sponsored by:	EMC / Isilon Storage Division
2016-04-04 23:15:57 +00:00
Bryan Drewery
0d0ef32951 DIRDEPS_BUILD: Don't reset OBJROOT in sub-makes.
MAKEOBJDIRPREFIX is set to blank and exported from MAKELEVEL0 along
with OBJROOT exported.  In sub-makes OBJROOT is recalculated with
an empty MAKEOBJDIRPREFIX though.

Sponsored by:	EMC / Isilon Storage Division
2016-03-31 00:26:40 +00:00
Bryan Drewery
497e80911e Remove the old depend (mkdep) code and make FAST_DEPEND the one true way.
Reviewed by:	emaste, hselasky (partial), brooks (brief)
Discussed on:	arch@
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D5742
2016-03-30 23:50:23 +00:00
Bryan Drewery
bd08afe1c9 DIRDEPS_BUILD: Add a sure way to prohibit building 'all' during dirdeps phase.
This obsoletes the _SKIP_BUILD check but keeps it for now until it
proves to be enough.

In the dirdeps build the first 'make all' or 'make' ran would invoke
'make dirdeps' which builds dependencies and then builds the current
directory in a sub-make (when BUILD_AT_LEVEL0 is no, which for us it
is).  This behavior causes things attached to 'all:' to build in the
dirdeps phase AND the sub-make phase which creates all kinds of problems
for staging, meta file tracking, and races.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:23 +00:00
Bryan Drewery
9c7086241d DIRDEPS_BUILD: Avoid rebuilds due to changed build commands with newly staged tools.
This is a follow-up to r291561 which reworked the bootstrap tool PATH
handling.

An example of this is when building lib/clang/libclangedit.  At first
clang-tblgen will not be staged in the host tree so it will have
CLANG_TBLGEN=clang-tblgen set and exported.  During the build though it
will stage clang-tblgen and then find it via the PATH.  On the next
build it finds clang-tblgen in the stage directory and would set
CLANG_TBLGEN=<stagedir/usr/bin>/clang-tblgen thus causing the build
command to change.  In both cases the same exact tool was used though so
there is no need to rebuild.  If the tool did change the normal
meta/filemon handling would pick that up via timestamp comparisons and
rebuild.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:13 +00:00
Bryan Drewery
d424483b4b Follow-up r295827: Don't enable meta stats when recursing PROGS.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 03:22:23 +00:00
Dimitry Andric
14e9c9161c Merge ^/head r295902 through r296006. 2016-02-24 21:38:51 +00:00
Bryan Drewery
70ca9ec4b9 Hook the meta/nofilemon build into using FAST_DEPEND.
FAST_DEPEND is intended to be the "skip 'make depend' and mkdep"
feature.  Since DIRDEPS_BUILD does this already with some of its own
hacks, and filemon doesn't need this, and nofilemon does, teach it how
to handle each of these cases.

In meta+filemon mode filemon will handle dependencies itself via the
meta mode logic in bmake.  We still want to set MK_FAST_DEPEND=yes to
enable some logic that indicates that 'make depend' is skipped in the
traditional sense.  The actual .depend.* files will be skipped.

When nofilemon is set though we still need to track and generate dependencies.

Sponsored by:	EMC / Isilon Storage Division
2016-02-24 17:19:13 +00:00
Dimitry Andric
9893f787ec Merge ^/head r295601 through r295844. 2016-02-21 13:49:26 +00:00
Bryan Drewery
4ab0941ded DIRDEPS_BUILD: Enable the post-build footer/stats display.
There is no real downside to this and it is useful to have enabled.

Sponsored by:	EMC / Isilon Storage Division
2016-02-19 22:28:45 +00:00
Dimitry Andric
34cdd77646 First part of updating llvm/clang build glue: getting llvm-tblgen,
clang-tblgen and clang itself built.
2015-12-31 14:39:45 +00:00
Ruslan Bukin
1fdcc5e5c0 Start support for the RISC-V 64-bit architecture developed by UC Berkeley.
RISC-V is a new ISA designed to support computer research and education, and
is now become a standard open architecture for industry implementations.

This is a minimal set of changes required to run 'make kernel-toolchain'
using external (GNU) toolchain.

The FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv.

Reviewed by:	andrew, bdrewery, emaste, imp
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D4445
2015-12-11 22:55:23 +00:00
Bryan Drewery
fb9def88bd META MODE: Define a STAGE_TARGET_OBJTOP and export it alone with
STAGE_OBJTOP and STAGE_HOST_OBJTOP.

These will always be overridden in sub-makes when building in-tree, but
are exported for the benefit of hooking in external builds, such as
ports.

Sponsored by:	EMC / Isilon Storage Division
2015-12-08 17:56:40 +00:00
Bryan Drewery
9229b1797a Fix some makeman issues.
- Don't bother looking up REVISION/BRANCH/etc from release/, or the
  CPUTYPE check, as these are not used for makeman and wastes time.  The also
  invokes auto.obj.mk after I reverted auto.obj.mk ignoring -V in r291312.
- Don't modify CC or PATH when WITH_CCACHE_BUILD or WITH_META_MODE is enabled
  as it leads to bsd.compiler.mk errors.

Sponsored by:	EMC / Isilon Storage Division
2015-12-08 17:09:17 +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
c7f8dda118 META MODE: Always define HOST_*, even if not using them.
Sponsored by:	EMC / Isilon Storage Division
2015-12-01 00:53:17 +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
86dd299005 Remove unsupported ia64.
Sponsored by:	EMC / Isilon Storage Division
2015-11-19 22:54:37 +00:00
Simon J. Gerraty
948f327ee4 Rename META_MODE option to DIRDEPS_BUILD
This allows META_FILES option to be renamed META_MODE.
Also add META_COOKIE_TOUCH for use in targets that can benefit
from a cookie when in meta mode.

Differential Revision:	https://reviews.freebsd.org/D4153
Reviewed by:	bdrewery
2015-11-14 03:24:48 +00:00
Bryan Drewery
00bd6d0f08 Move META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, which
centralizes the handling of CC and HOST_CC.

This fixes a bug with WITH_CCACHE_BUILD when using MACHINE=host since
CC is overridden in local.init.mk via src.opts.mk long before bsd.compiler.mk
is included.

Originally the ccache implementation was placed in local.init.mk but moved
to bsd.compiler.mk as it seemed more proper and avoided other ordering
issues.

Sponsored by:	EMC / Isilon Storage Division
2015-11-11 23:52:08 +00:00
Bryan Drewery
9160419c7a Add built-in ccache build support via WITH_CCACHE_BUILD option.
ccache is mostly beneficial for frequent builds where -DNO_CLEAN is not
used to achieve a safe pseudo-incremental build.  This is explained in
more detail upstream [1] [2].  It incurs about a 20%-28% hit to populate the
cache, but with a full cache saves 30-50% in build times.  When combined with
the WITH_FAST_DEPEND feature it saves up to 65% since ccache does cache the
resulting dependency file, which it does not do when using mkdep(1)/'CC
-E'.  Stats are provided at the end of this message.

This removes the need to modify /etc/make.conf with the CC:= and CXX:=
lines which conflicted with external compiler support [3] (causing the
bootstrap compiler to not be built which lead to obscure failures [4]),
incorrectly invoked ccache in various stages, required CCACHE_CPP2 to avoid
Clang errors with parenthesis, and did not work with META_MODE.

The option name was picked to match the existing option in ports.  This
feature is available for both in-src and out-of-src builds that use
/usr/share/mk.

Linking, assembly compiles, and pre-processing avoid using ccache since it is
only overhead.  ccache does nothing special in these modes, although there is
no harm in calling it for them.

CCACHE_COMPILERCHECK is set to 'content' when using the in-tree bootstrap
compiler to hash the content of the compiler binary to determine if it
should be a cache miss.  For external compilers the 'mtime' option is used
as it is more efficient and likely to be correct.  Future work may optimize the
'content' check using the same checks as whether a bootstrap compiler is needed
to be built.

The CCACHE_CPP2 pessimization is currently default in our devel/ccache
port due to Clang requiring it.  Clang's -Wparentheses-equality,
-Wtautological-compare, and -Wself-assign warnings do not mix well with
compiling already-pre-processed code that may have expanded macros that
trigger the warnings.  GCC has so far not had this issue so it is allowed to
disable the CCACHE_CPP2 default in our port.

Sharing a cache between multiple checkouts, or systems, is explained in
the ccache manual.  Sharing a cache over NFS would likely not be worth
it, but syncing cache directories between systems may be useful for an
organization.  There is also a memcached backend available [5].  Due to using
an object directory outside of the source directory though you will need to
ensure that both are in the same prefix and all users use the same layout.  A
possible working layout is as follows:
  Source: /some/prefix/src1
  Source: /some/prefix/src2
  Source: /some/prefix/src3
  Objdir: /some/prefix/obj
  Environment: CCACHE_BASEDIR='${SRCTOP:H}' MAKEOBJDIRPREFIX='${SRCTOP:H}/obj'
This will use src*/../obj as the MAKEOBJDIRPREFIX and tells ccache to replace
all absolute paths to be relative.  Using something like this is required due
to -I and -o flags containing both SRC and OBJDIR absolute paths that ccache
adds into its hash for the object without CCACHE_BASEDIR.

distcc can be hooked into by setting CCACHE_PREFIX=/usr/local/bin/distcc.
I have not personally tested this and assume it will not mix well with
using the bootstrap compiler.

The cache from buildworld can be reused in a subdir by first running
'make buildenv' (from r290424).

Note that the cache is currently different depending on whether -j is
used or not due to ccache enabling -fdiagnostics-color automatically if
stderr is a TTY, which bmake only does if not using -j.

The system I used for testing was:
  WITNESS
  Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_CCACHE_BUILD=yes
  DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log.
        The arc was fully populated with src tree files and ccache objects.
  RAM: 76GiB
  CPU: Intel(R) Xeon(R) CPU L5520 @2.27GHz
       2 package(s) x 4 core(s) x 2 SMT threads = hw.ncpu=16

The WITH_FAST_DEPEND feature was used for comparison here as well to show
the dramatic time savings with a full cache.

buildworld:
  x buildworld-before
  + buildworld-ccache-empty
  * buildworld-ccache-full
  % buildworld-ccache-full-fastdep
  # buildworld-fastdep
  +-------------------------------------------------------------------------------+
  |%            *                               #                                +|
  |%            *                               #                                +|
  |%            *                               #             xxx                +|
  |                                                           |A                  |
  |                                                                              A|
  |             A                                                                 |
  |A                                                                              |
  |                                             A                                 |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3       3744.13       3794.31       3752.25     3763.5633     26.935139
  +   3          4519       4525.04       4520.73       4521.59     3.1104823
  Difference at 95.0% confidence
          758.027 +/- 43.4565
          20.1412% +/- 1.15466%
          (Student's t, pooled s = 19.1726)
  *   3       1823.08        1827.2       1825.62        1825.3     2.0785572
  Difference at 95.0% confidence
          -1938.26 +/- 43.298
          -51.5007% +/- 1.15045%
          (Student's t, pooled s = 19.1026)
  %   3       1266.96       1279.37       1270.47     1272.2667     6.3971113
  Difference at 95.0% confidence
          -2491.3 +/- 44.3704
          -66.1952% +/- 1.17895%
          (Student's t, pooled s = 19.5758)
  #   3       3153.34       3155.16        3154.2     3154.2333    0.91045776
  Difference at 95.0% confidence
          -609.33 +/- 43.1943
          -16.1902% +/- 1.1477%
          (Student's t, pooled s = 19.0569)

buildkernel:
  x buildkernel-before
  + buildkernel-ccache-empty
  * buildkernel-ccache-empty-fastdep
  % buildkernel-ccache-full
  # buildkernel-ccache-full-fastdep
  @ buildkernel-fastdep
  +-------------------------------------------------------------------------------+
  |#                        @   %                  *                              |
  |#                        @   %                  *     x                      + |
  |#                        @   %                  *     xx                     ++|
  |                                                      MA                       |
  |                                                                             MA|
  |                                                A                              |
  |                             A                                                 |
  |A                                                                              |
  |                         A                                                     |
  +-------------------------------------------------------------------------------+
      N           Min           Max        Median           Avg        Stddev
  x   3        571.57        573.94        571.79     572.43333     1.3094401
  +   3        727.97        731.91        728.06     729.31333     2.2492295
  Difference at 95.0% confidence
          156.88 +/- 4.17129
          27.4058% +/- 0.728695%
          (Student's t, pooled s = 1.84034)
  *   3         527.1        528.29        528.08     527.82333    0.63516402
  Difference at 95.0% confidence
          -44.61 +/- 2.33254
          -7.79305% +/- 0.407478%
          (Student's t, pooled s = 1.02909)
  %   3         400.4        401.05        400.62        400.69     0.3306055
  Difference at 95.0% confidence
          -171.743 +/- 2.16453
          -30.0023% +/- 0.378128%
          (Student's t, pooled s = 0.954969)
  #   3        201.94        203.34        202.28        202.52    0.73020545
  Difference at 95.0% confidence
          -369.913 +/- 2.40293
          -64.6212% +/- 0.419774%
          (Student's t, pooled s = 1.06015)
  @   3        369.12        370.57         369.3     369.66333    0.79033748
  Difference at 95.0% confidence
          -202.77 +/- 2.45131
          -35.4225% +/- 0.428227%
          (Student's t, pooled s = 1.0815)

[1] https://ccache.samba.org/performance.html
[2] http://www.mail-archive.com/ccache@lists.samba.org/msg00576.html
[3] https://reviews.freebsd.org/D3484
[5] https://github.com/jrosdahl/ccache/pull/30

PR:		182944 [4]
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
Relnotes:	yes
2015-11-08 00:50:18 +00:00
Bryan Drewery
5c5948ac30 META_MODE: Set HOST_CXX and HOST_CPP and chain them down into CXX/CPP for host builds.
Sponsored by:	EMC / Isilon Storage Division
2015-09-30 23:14:23 +00:00
Bryan Drewery
ba7a7c1b82 RELDIR is useful without META_MODE. Always define it.
It is the CURDIR without the SRC base location in it.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 23:30:57 +00:00
Bryan Drewery
b8aba4fc19 META_MODE: Fix 2nd build causing everything to rebuild due to changed CC.
In the first build the TOOLSDIR does not exit yet which causes CC to default
to the sys.mk version.  Once a TOOLSDIR is created during the build though,
this logic was changing CC to ${TOOLSDIR}/usr/bin/cc even though that file
did not exist.  Thus CC went from 'cc' to '/usr/bin/cc' which forced a
rebuild of everything while using the same compiler.  Check that TOOLSDIR is
not empty to avoid this.  If there is actually a TOOLSDIR cc then it will be
used and properly rebuild.

Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:36:01 +00:00
Bryan Drewery
4b23c482f4 META_MODE: Avoid // in meta log for tracked --sysroot files.
Sponsored by:	EMC / Isilon Storage Division
2015-09-23 22:23:59 +00:00
Bryan Drewery
075b136250 META_MODE: Follow-up r287865 and define CCACHE_DIR as realpath'd.
Filemon(4) will record paths as they are seen, not as fully resolved.  make(1)
will take the .MAKE.META.IGNORE_PATHS values and resolve them.  This creates
a discrepancy if CCACHE_DIR is a symlink.  Fix this by ensuring it is
resolved for its actual usage.

Submitted by:	sjg
2015-09-23 21:46:58 +00:00
Bryan Drewery
621ce7a5a6 Avoid /usr/obj// from r287899 2015-09-18 18:57:09 +00:00
Bryan Drewery
66e5857b42 Fix makeman creating obj directories due to turning on WITH_AUTO_OBJ.
r284708 addressed this slightly but seems to have put the make(showconfig)
guard in the wrong place.  Rather than guard setting the default obj directory,
guard inclusion of auto.obj.mk.  This avoids creating SRCTOP/obj and
SRCTOP/release/obj when running makeman.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 16:38:32 +00:00
Bryan Drewery
7a46bc8129 META_MODE: Default OBJROOT to the traditional /usr/src/SRCTOP/.
This avoids easily colliding multiple src trees with the same objects.  Having
multiple checkouts in dir/ dir2/ dir3/ would all use obj/ without any unique
identifier inside of obj/.  This pattern is more likely to be used due
to the non-META_MODE behavior working with it fine.

In environments where ../obj/ is wanted as the obj directory the value of
OBJROOT can be set to ${SRCTOP:H}/obj/ instead via src-env.conf (set by
SRC_ENV_CONF) or environment.  For environment it must be single quoted or
escaped.  This will be more likely for vendors who are building images or using
NFS for builds.  In those cases MAKEOBJDIRPREFIX may already be utilized and
is supported.

Discussed with:	imp
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:22:00 +00:00
Bryan Drewery
3c35812126 META_MODE: Allow MAKEOBJDIRPREFIX to work more closely to its traditional behavior.
The preferred way to modify the object directory root is to use OBJROOT.
However, setting OBJROOT to ${MAKEOBJDIRPREFIX}/${SRCTOP}/ effectively behaves
as expected.

The problem with this before was that setting OBJROOT to contain SRCTOP
resulted in a recursive replacement (/usr/obj/usr/obj/usr/src/). Anchoring to
the start of the path for replacing SRCCTOP in CURDIR resolves this by
avoiding replacing SRCTOP when CURDIR is within the OBJDIR.

Sponsored by:	EMC / Isilon Storage Division
2015-09-17 04:01:05 +00:00
Bryan Drewery
63c304b083 META_MODE: Don't define the default MAKEOBJDIR twice. Just expand the default.
Sponsored by:	EMC / Isilon Storage Division
2015-09-17 00:17:32 +00:00
Bryan Drewery
5ac0efdba9 Update META_MODE architectures for universe 2015-09-16 23:59:53 +00:00
Bryan Drewery
cf25886e34 META_MODE: Fix OBJROOT ending in two // when it does not yet exist.
This would lead to the 2nd build (after the first with a missing OBJROOT) to
always rebuild everything as the 'command' would have changed due to the path
changing from having // to only /.

Sponsored by:	EMC / Isilon Storage Division
2015-09-16 20:58:43 +00:00
Bryan Drewery
bf7ff1d2bf Fix check from r287867 for valid MAKEOBJDIR from top-level builds.
MAKEOBJDIR is based on OBJTOP so cannot be expanded until OBJTOP is set.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 19:58:04 +00:00
Bryan Drewery
7aeb371515 Error and give better feedback for invalid MAKEOBJDIR settings.
Submitted by:	sjg
2015-09-16 18:02:04 +00:00
Bryan Drewery
0b5150a36e Ignore CCACHE_DIR for meta mode decisions.
Sponsored by:	EMC / Isilon Storage Division
2015-09-16 17:44:45 +00:00
Simon J. Gerraty
5ab53989f4 Handle default MAKEOBJDIR for META_MODE.
If MAKEOBJDIRPREFIX is set, use it for default OBJROOT.
If MAKEOBJDIR is empty or not a suitable value (no '/')
set a default that works.

Reviewed by: bdrewery
2015-09-11 00:19:49 +00:00
Simon J. Gerraty
cc2520d2f3 Fix generation of src.conf.5
Since makeman turns all options on, we need to guard somethings from
make(showconfig)
2015-06-22 20:21:57 +00:00
Simon J. Gerraty
916c1cd0ab Deal with MAKEOBJDIRPREFIX
MAKEOBJDIRPREFIX does not really fit our model.
Use it to set OBJROOT to about where user expects
and set MAKEOBJDIR to do what we want.
2015-06-20 21:48:07 +00:00