summaryrefslogtreecommitdiffstats
path: root/share/mk
Commit message (Collapse)AuthorAgeFilesLines
* Move META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, whichbdrewery2015-11-112-6/+9
| | | | | | | | | | | | | | 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
* FAST_DEPEND: Fix building of wrong source files in some cases.bdrewery2015-11-092-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the original reason for these dependency hints to be added, in r124637, the missing-dependency file case can lead to building of the wrong source. A clear example of this is in gnu/lib/libstdc++ where the .PATH contains both contrib/gcc and contrib/libstdc++/src. contrib/gcc has a debug.c. contrib/libstdc++/src has a debug.cc. When building for the objects of debug.o, debug.So, and debug.po, it is ambiguous for which src file to use due to the suffix transformation rules, even though the proper one is listed first in .PATH. This was normally avoided due to these dependency hints for the initial build, and then mkdep would add an explicit 'debug.o: debug.cc' dependency into the .depend file. WITH_FAST_DEPEND does not generate the .depend file with these, but puts them into .depend.debug.o instead. Rather than extending the exists() check to each object's .depend.* file, just enable the hint when when using WITH_FAST_DEPEND. It fixes the problem and seems to be safe enough to use since it is mapping SRCS back to OBJS, rather than letting make make assumptions from OBJS to SRCS. A similar check mapping objects to headers is present in some mk files but was not extended here for FAST_DEPEND since it has not yet been found to be a problem. X-MFC-With: r290433 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* Add built-in ccache build support via WITH_CCACHE_BUILD option.bdrewery2015-11-087-23/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* FAST_DEPEND: Don't enable when .MAKE.MODE=meta.bdrewery2015-11-081-1/+1
| | | | | | | | | This is because the .meta files generated from filemon already contain a list of all files read to generate the object. X-MFC-With: r290433 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Don't include depend files when using 'make -V'.bdrewery2015-11-081-0/+2
| | | | | | | | | This is especially noticeable in the kernel obj directory since it includes so many files. X-MFC-With: r290433 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
* Merge from head r290483bapt2015-11-078-11/+44
|\
| * The 'buildenv' target can safely be ran with '+'.bdrewery2015-11-061-1/+1
| |
| * Add a FAST_DEPEND option, off by default, which speeds up the build ↵bdrewery2015-11-064-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | significantly. This speeds up buildworld by 16% on my system and buildkernel by 35%. Rather than calling mkdep(1), which is just a wrapper around 'cc -E', use the modern -MD -MT -MF flags to gather and generate dependencies during compilation. This flag was introduced in GCC "a long time ago", in GCC 3.0, and is also supported by Clang. (It appears that ICC also supports this but I do not have access to test it). This avoids running the preprocessor *twice* for every build, in both 'make depend' and 'make all'. This is especially noticeable when using ccache since it does not cache preprocessor results from mkdep(1) / 'cc -E', but still speeds up compilation with the -MD flags. For 'make depend' a tree-walk is still done to ensure that all DPSRCS are generated when expected, and that beforedepend/afterdepend and _EXTRADEPEND are all still respected. In time this may change but for now I've been conservative. The time for a tree-walk with -j combined with SUBDIR_PARALLEL is not significant. For example, it takes about 9 seconds with -j15 to walk all of src/ for 'make depend' now on my system. A .depend file is still generated with the various rules that apply to the final target, or custom rules. Otherwise there are now per-built-object-file .depend files, such as .depend.filename.o. These are included directly by make rather than populating .depend with a loop and .depend lines, which only added overhead to the now almost-NOP 'make depend' phase. Before this I experimented with having mkdep(1) called in parallel per-file. While this improved the kernel and lib/libc 'make depend' phase, it resulted in slower build times overall. The -M flags are removed from CFLAGS when linking since they have no effect. Enabling this by default, for src or out-of-src, can be done once more testing has been done, such as a ports exp-run, and with more compilers. The system I used for testing was: WITNESS Build options: -j20 WITH_LLDB=yes WITH_DEBUG_FILES=yes WITH_FAST_DEPEND=yes DISK: ZFS 3-way mirror with very slow disks using SSD l2arc/log. The arc was fully populated with src tree files. 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 buildworld: x buildworld-before + buildworld-fastdep +-------------------------------------------------------------------------------+ |+ | |+ | |+ xx x| | |_MA___|| |A | +-------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 3744.13 3794.31 3752.25 3763.5633 26.935139 + 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-fastdep +-------------------------------------------------------------------------------+ |+ x | |++ xx| | A|| |A| | +-------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 571.57 573.94 571.79 572.43333 1.3094401 + 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) Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks Relnotes: yes
| * Correct a comment which appears to be mistakingly mechanically changed in ↵bdrewery2015-11-051-1/+1
| | | | | | | | | | | | | | r265420. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
| * Allow 'make buildenv' to work anywhere in the src tree.bdrewery2015-11-052-0/+13
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
| * Rename libohash to libopenbsd.rodrigc2015-11-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | libopenbsd is an internal library which to bring in compatibility stuff from OpenBSD. This will allow us to bring in more OpenBSD utilities into the FreeBSD base system. We similarly use libnetbsd for bringing in stuff from NetBSD. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D4078
* | Merge from headbapt2015-11-019-166/+190
|\ \ | |/
| * Don't hide stderr when checking ${CC} --version.bdrewery2015-10-311-1/+1
| | | | | | | | | | | | | | | | This can have important debugging information such as 'cc: not found' or 'ccache: error: Could not find compiler "cc" in PATH'. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking thengie2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | "one of many" targets, e.g. `make hello_world`, where hello_world is a C program Tested with: PROGS and PROGS_CXX MFC after: 1 week X-MFC with: r289289 Sponsored by: EMC / Isilon Storage Division
| * Fix regression from using .USEBEFORE in _SUBDIR in r289705.bdrewery2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | Using .USEBEFORE had the unintended side-effect of changing the directory for the real target ran in the current directory. For example this meant that the 'make clean' would run in one of the SUBDIR. Sponsored by: EMC / Isilon Storage Division Pointyhat to: bdrewery
| * Use proper CONFDIR after r289148bdrewery2015-10-271-1/+1
| |
| * Spell CONFGROUPS properly.bdrewery2015-10-271-1/+1
| |
| * META MODE: Fix after addition of bsd.confs.mk: Stage in "files" set.bdrewery2015-10-271-5/+7
| | | | | | | | | | | | | | | | The "files" staging name is not the same as "bsd.files.mk" but seems to just be a group of extra files that are not the essential includes or libraries, which include . Sponsored by: EMC / Isilon Storage Division
| * META MODE: Fix FILESNAME not being respected sans other FILES_group overrides.bdrewery2015-10-261-1/+1
| | | | | | | | | | | | This was fixed in bsd.incs.mk in r242801 already. Sponsored by: EMC / Isilon Storage Division
| * META MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is nobdrewery2015-10-262-2/+0
| | | | | | | | | | | | need to set STAGE_SYMLINKS_DIR.${STAGE_SET}. Sponsored by: EMC / Isilon Storage Division
| * Sort properly.bdrewery2015-10-241-1/+1
| | | | | | | | | | MFC after: 1 week X-MFC-With: r289870
| * Add bsd.crunchgen.mk to bsd.README.bdrewery2015-10-242-0/+3
| | | | | | | | MFC after: 1 week
| * Slightly rework the comments and logic for default Clang/GCC.bdrewery2015-10-241-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | This is because the previous version was very obscure about the fact that despite having Clang "on by default" for architectures such as powerpc, it does not actually build due to the GCC it uses not having C++11 support. Using an external compiler that supports C++11 does allow this to work. This whole block should be rethought more given "on by default" is not really default without extra work which could actually be surprising for why Clang is showing up when using a newer GCC. Sponsored by: EMC / Isilon Storage Division
| * Configs should not be under MK_INCLUDES control.bdrewery2015-10-241-3/+0
| | | | | | | | | | | | | | | | 'buildconfig' is connected to 'all', but 'installconfig' is only called manually. There is not much need to conditionalize this file right now due to how it is hooked up and its impact on various build phases. Sponsored by: EMC / Isilon Storage Division
| * Rework r289778 to always parallelize known targets, without ordering.bdrewery2015-10-231-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rather than allow 'make clean*' to ignore dependencies, make a static list of targets in STANDALONE_SUBDIR_TARGETS that are known to be safe. This allows a user to override them if needed and avoids adding this feature to user-defined targets that are in ${SUBDIR_TARGETS}. [1] - This now also allows to force SUBDIR_PARALLEL when calling these targets, since no dependencies are needed. Reported by: ian [1] Sponsored by: EMC / Isilon Storage Division MFC after: 3 weeks X-MFC-With: r289778
| * Fix regression from r289734 that caused crunchgen "subdirs" to not bebdrewery2015-10-231-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | properly recursed. The .for loop was defining a ${__dir} variable that was being set at a different evaluation time than the target itself, so every 'cd ${__dir}' became the last value that was in ${__dir}. This resulted in 'make obj' not properly being ran in the tree that would leave .depend files scattered around when 'make all' was ran in rescue/. To fix this, define a CRUNCH_SRCDIR_* for every prog if it does not already have one and then use that variable in every relevant place. This allows simplifying some logic as well. Reported by: emaste X-MFC-With: r289734 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
| * For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need tobdrewery2015-10-221-0/+11
| | | | | | | | | | | | | | respect SUBDIR_DEPEND_* or .WAIT. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Fix installation of manpages with WITHOUT_COMPRESS broken since r284685.bdrewery2015-10-221-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts r284685. An attempt was made in r285295 to fix this but was not enough. There were still $${} vars in the code that should have been using the ${_page} and ${_sect} vars, but the bigger problem was that .for cannot be used on .ALLSRC as it is not defined when the .for is evaluated. Using ${MAN} here in a .for loop doesn't work either as the paths are not expanded right for lib/libc/ subdirs despite having a .PATH set for all of them. Add some comments around long .else and .endif as well. Sponsored by: EMC / Isilon Storage Division
| * Fix incorrect defined() usage from style clean up in r289735.bdrewery2015-10-221-2/+2
| | | | | | | | | | | | | | Submitted by: ngie MFC after: 2 weeks X-MFC-With: r289735 Sponsored by: EMC / Isilon Storage Division
| * Fix style. Namely use {} rather than ().bdrewery2015-10-221-53/+54
| | | | | | | | | | MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Rewrite crunchgen target handling for progs so that it can be parallelized.bdrewery2015-10-221-23/+13
| | | | | | | | | | | | | | | | | | | | | | This covers 'clean', 'cleandepend', 'cleandir', 'obj', 'objlink' and 'build-tools'. This uses the same method as bsd.subdir.mk. MFC after: 2 weeks X-MFC-With: r289731 Sponsored by: EMC / Isilon Storage Division
| * Clean up some bsd.crunchgen.mk issues.bdrewery2015-10-221-17/+18
| | | | | | | | | | | | | | | | | | - Remove handling of 'make -P' since that is for fmake only. - Add '+' where appropriate for sub-make calls. - Pass MK_TESTS=no to all of the sub-makes to prevent recursing into test directories for targets such as 'obj', 'clean', 'depend', etc. Sponsored by: EMC / Isilon Storage Division
| * Remove indirection of _sub target for using _SUBDIR.bdrewery2015-10-211-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts r266473 as the need for it, working around .MAKE and '+' issues, is no longer needed after r289460. This avoids extra log output in -j builds of '-- _sub.TARGET --' that are redundant with the '-- TARGET --' and '-- TARGET_subdir_DIR --' entries already showing. r266473 also made a subtle change in the ordering of _SUBDIR handling. Before the change, SUBDIRS were recursed into after building the TARGET due to the .USE of _SUBDIR *appending* the commands onto the TARGET. After the change though the indirection caused TARGET to depend on _sub.TARGET which had the _SUBDIR handling in it. This TARGET would run after recursing. However, the SUBDIR_PARALLEL handling from r263778 has this ordering as well. Since this has so far not been a problem, for now make this behavior for non-SUBDIR_PARALLEL use of _SUBDIR explicit by using .USEBEFORE. Further research may change this back to .USE as well as the SUBDIR_PARALLEL handling and bsd.progs.mk recursing. Sponsored by: EMC / Isilon Storage Division
| * Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL.bdrewery2015-10-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop. The old code here for recursing was setting SUBDIR= as a make *argument*. The SUBDIR= replacement was not actually handled until after the .for loop was unrolled. This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which showed an empty ${SUBDIR} and a set ${dir}. Setting NO_SUBIDR= before calling ${MAKE} as an *environment* variable handles the case fine and is a more proper mechanism for disabling subdir handling. This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Improve safety of caching from r289659 by only importing of none of thebdrewery2015-10-201-0/+9
| | | | | | | | | | | | | | | | | | variables are already set. This should cover odd cases such as the COMPILER_TYPE override in lib/csu/powerpc64. X-MFC-With: r289659 MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
| * Pass COMPILER_TYPE and COMPILER_VERSION to sub-makes to avoid redundantbdrewery2015-10-201-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lookups. This uses a special variable name based on a hash of ${CC}, ${PATH}, and ${MACHINE} to ensure that a cached value is not used if any of these values changes to use a new compiler. Before this there were 34,620 fork/exec from bsd.compiler.mk during a buildworld. After this there are 608. More improvement is needed to cache a value from the top-level before descending into subdirs in the various build phases. Reviewed by: brooks (earlier version) MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3898
| * Replace all of the duplicated logic for recursing into a subdir with onebdrewery2015-10-191-30/+17
| | | | | | | | | | | | | | implementation. It is duplicated at run-time but is more easily maintainable now. Sponsored by: EMC / Isilon Storage Division
| * Add missing .PHONY for parallel subdir target.bdrewery2015-10-191-1/+1
| | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* | Merge from headbapt2015-10-1913-44/+76
|\ \ | |/
| * Make libxo depend on libutil because it uses humanize_number after r287111ngie2015-10-181-0/+1
| | | | | | | | | | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division
| * Only enable -fstack-protector-strong on gcc 4.9+ and default to ↵ngie2015-10-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -fstack-protector when -fstack-protector-strong is not available, like it was implicitly before r288669 As noted by antoine@, devel/gcc (which is 4.8.5) lacks -fstack-protector-strong support, whereas 4.8.4i (devel/gcc48) has the support. Until a version is available which has -fstack-protector-strong support, be conservative and only enable support with 4.9+. Reviewed by: pfg X-MFC with: r288669, r289465 Differential Revision: https://reviews.freebsd.org/D3924
| * Only use -fstack-protector-strong with supported compilersngie2015-10-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.4+ This allows me to do subdirectory makes again after setting MAKESYSPATH on 10.2-RELEASE as it comes with clang 3.4.1. As a sidenote: this isn't technically correct for all vintages of gcc 4.2.1, but will be correct when gcc is rebuilt/reinstalled after r286074, so this version check should be good enough. X-MFC with: r288669 Differential Revision: https://reviews.freebsd.org/D3924 Reviewed by: emaste, pfg
| * Rework the 'make -n -n' feature such that '-n' recurses and '-N' does not.bdrewery2015-10-171-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bmake has a documented feature of '-N' to skip executing commands which is specifically intended for debugging top-level builds and not recursing into sub-directories. This matches the older 'make -n' behavior we added which made '-n -n' the recursing target and '-n' a non-recursing target. Removing the '-n -n' feature allows the build to work as documented in the bmake manpage with '-n' and '-N'. The older '-n -n' feature was also not documented anywhere that I could see. Note that the ${_+_} var is still needed as currently bmake incorrectly executes '+' commands when '-N' is specified. The '-n' and '-n -n' features were broken for several reasons prior to this. r251748 made '_+_' never expand with '-n -n' which resulted in many sub-directories not being visited until fixed 2 years later in r288391, and many targets were given .MAKE over the past few years which resulted in non-sub-make commands, such as rm and ln and mtree, to be executed. This should also allow removing some indirection hacks in bsd.subdir.mk and other cases of .USE that have a .MAKE by using '+'. Sponsored by: EMC / Isilon Storage Division Discussed on: arch@ (mostly silence)
| * Similar to r289355, /usr/tests is within the base system so put the symbolsbdrewery2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into /usr/lib/debug. This covers some missing files: /usr/tests/libexec/rtld-elf/.debug /usr/tests/libexec/rtld-elf/.debug/libpythagoras.so.0.debug /usr/tests/lib/libc/tls/.debug /usr/tests/lib/libc/tls/.debug/libh_tls_dynamic.so.1.debug /usr/tests/lib/libc/tls/.debug/h_tls_dlopen.so.debug /usr/tests/lib/libthr/dlopen/.debug /usr/tests/lib/libthr/dlopen/.debug/h_pthread_dlopen.so.1.debug /usr/tests/lib/libxo/.debug /usr/tests/lib/libxo/.debug/libenc_test.so.debug Sponsored by: EMC / Isilon Storage Division
| * Make installing to a non-existent directory an error.bdrewery2015-10-157-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, if a file was installed to DESTDIR/some/dir and that directory was missing due to not having ran 'make distrib-dirs' yet, the file would be installed as 'some/dir'. For something like bsd.incs.mk with INCLUDEDIR being a sub-directory of /usr/include, this could result in all of the headers being installed to a file rather than getting a directory of them. Now it will error that the file/directory does not exist rather than hide the issue. Another option being discussed is to implement GNU's install -D flag which would auto create any missing directories. This is a mitigation of the problem. The proper order to the build is to run 'make distrib-dirs' first, but that can be forgotten if building from a sub-directory after updating the source code to the latest revision. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
| * Fix wrong use of .for; the iteration variable is not used in the loop.bdrewery2015-10-151-2/+2
| | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
| * Remove excess .elsebdrewery2015-10-151-1/+0
| | | | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
| * /usr/tests is part of the base system (for *.debug files)emaste2015-10-151-1/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation
| * Add missing targets to PHONY_NOTMAIN.bdrewery2015-10-141-7/+7
| | | | | | | | | | | | | | - buildconfig, installconfig (missed in r289085) - files (missed in r241298) Sponsored by: EMC / Isilon Storage Division
| * Recurse on 'buildconfig' and 'installconfig'. Remove the 'config' pseudo ↵bdrewery2015-10-141-4/+5
| | | | | | | | | | | | | | | | | | | | | | target. The 'config' target isn't really needed right now so just remove it to avoid any clashes with config(8) building. It's also likely misspelled and should be 'configs' if we decide to add it back. This was just a convenience target recently added. Sponsored by: EMC / Isilon Storage Division
OpenPOWER on IntegriCloud