summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.post.mk
Commit message (Collapse)AuthorAgeFilesLines
* MFC r320174,r320204:bdrewery2017-06-231-3/+3
| | | | | | | | | | r320174: Fix 'make clean all' to work again. r320204: Fix various 'make *clean *all *install' combinations. PR: 219819 Approved by: re (gjb)
* MFC r314054: Exclude -flto when building *genassym.oemaste2017-05-151-1/+1
| | | | | | | | | | | The build process generates *assym.h using nm from *genassym.o (which is in turn created from *genassym.c). When compiling with link-time optimization (LTO) using -flto, .o files are LLVM bitcode, not ELF objects. This is not usable by genassym.sh, so remove -flto from those ${CC} invocations. Sponsored by: The FreeBSD Foundation
* MFC r314372:ngie2017-03-301-1/+1
| | | | | | | | | | | | | Use "build" instead of "all" when building ports modules "all" in ports currently means "stage the ports", which requires root today, and brings to light other potential issues, like ENAMETOOLONG with staged directories (bug 161481, etc). This fixes buildkernel for me when run as a non-root user, assuming all of the prerequisites have been installed beforehand and are up-to-date. Discussed with: swills (IRC)
* MFC r310430:ian2017-03-011-1/+1
| | | | | | | Use ${.OBJDIR} to refer to the kernel build object dir, instead of trying to recreate it from ${MAKEOBJDIRPREFIX} and ${SRC_BASE} and ${KERNCONF}, the latter being especially problematic when KERNCONF is set to the names of multiple kernel configs.
* Add WITH_REPRODUCIBLE_BUILD src.conf(5) knobemaste2017-01-251-1/+4
| | | | | | | | | | | | | | | | MFC r310128: Add WITH_REPRODUCIBLE_BUILD src.conf(5) knob to disable kernel metadata The kernel builds reproducibly, except for the time, date, user, and hostname baked into the kernel (reported at startup and via the kern.version sysctl for uname). Add a build knob to disable the inclusion of this metadata. MFC r310268: Build loaders reproducibly when WITH_REPRODUCIBLE_BUILD When WITH_REPRODUCIBLE_BUILD=yes is set in src.conf(5), eliminate the time, user, and host from the loader's version information. This allows builds to produce bit-for-bit identical output.
* MFC r305855, r306297, r306300, r306312-r306313marcel2016-12-111-3/+3
| | | | | | | | | | | | | | When MAKEOBJDIRPREFIX points to a case-insensitive file system, the build can break when different source files create the same object files (case-insensitivity speaking). This is the case for object files compiled with -fpic and shared libraries. The former uses an extension of ".So", and the latter an extension ".so". Rename shared object files from *.So to *.pico to match what NetBSD does. Also: o Compile _Exit.c as C99_Exit.c, as it conflicts with _exit.s o Add entry to UPDATING o Document .pico extension
* MFC r304697:bdrewery2016-08-241-3/+4
| | | | | FAST_DEPEND: Fix 'make all install' not properly rebuilding based on .depend.* files.
* MFC r304005:bdrewery2016-08-191-0/+4
| | | | PORTS_MODULES: Don't leak in CC/CXX/CPP.
* META_MODE: Don't generate or read _EXTRADEPEND dependencies when using filemon.bdrewery2016-06-211-6/+6
| | | | | | | | | The DPADD data in .depend will be redundant with what is in the .meta file. Also extend NO_EXTRADEPEND support to bsd.prog.mk. Approved by: re (blanket, META_MODE) Sponsored by: EMC / Isilon Storage Division
* WITH_META_MODE: Do include headers for specific guessed dependenciesbdrewery2016-06-151-2/+4
| | | | | | | | | | | | This is a follow-up to r300343. This is important for the OBJS_DEPEND_GUESS usage in gnu/usr.bin/cc/cc_tools. See comments for more details. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division
* Change the default build behavior so we don't compile extra TCP modules byjtl2016-06-101-0/+4
| | | | | | | | | | | | | | | | | | | | | default. At least initially, the feature to support multiple TCP stacks is aimed at supporting advanced use cases and TCP development, but it is not necessarily aimed at a wide audience. Therefore, there is no need to build and install the extra TCP stacks by default. Instead, the people who are using or developing this functionality can add the extra option to build/ install the extra TCP stacks. However, we do want to build the extra TCP stacks as part of test builds (e.g. LINT or tinderbox) to ensure that developers who are testing their changes will know that their changes do not break the additional TCP stack modules. After this change, a user will need to add WITH_EXTRA_TCP_STACKS=1 to make.conf or the kernel config in order to build the extra TCP modules. Differential Revision: https://reviews.freebsd.org/D6795 Reviewed by: sjg Approved by: re (kib)
* Revert r301079.bdrewery2016-06-031-19/+19
| | | | | | | | This breaks cross-building with WITH_META_MODE since it will rebuild 'build-tools' during the 'everything' phase. A more proper fix is coming to bmake to implicitly require .META unless .NOMETA (and other restrictions) are in place.
* WITH_META_MDE: Fix machine/include and x86/include issues.bdrewery2016-05-311-1/+1
| | | | | | | - Fixes 'ln: File exists' errors. - Fixes creating include directories in the source directory as well. Sponsored by: EMC / Isilon Storage Division
* WITH_META_MODE: Resolve SYSDIR to avoid changed build commands.bdrewery2016-05-311-1/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* WITH_META_MODE: Mitigate switching from without to with META_MODE.bdrewery2016-05-311-19/+19
| | | | | | | | | | | | | Adding .META to targets-to-build will ensure that they will rebuild if there is no .meta file. Adding it to all SUFFIXES and objects ensures that at least objects will rebuild if there is no .meta file. This will be reverted if bmake's behavior changes to rebuild on missing .meta files. Sponsored by: EMC / Isilon Storage Division
* Add some missing .PHONY.bdrewery2016-05-261-1/+1
| | | | | | | These are relevant for WITH_META_MODE to ensure they are always reran and don't generate a .meta file. Sponsored by: EMC / Isilon Storage Division
* WITH_META_MODE: Fix suffix transformation rules with guessed dependencies.bdrewery2016-05-211-0/+8
| | | | | | | | | This is the same problem as r290629. With META_MODE we do not generate .depend files, so there is no proper dependency to lookup. Guessed dependencies must be used. If this proves to be a problem then we will have to generate and use .depend files even with META_MODE. Sponsored by: EMC / Isilon Storage Division
* Revert r298357wma2016-04-201-8/+0
| | | | Revert workaround fixed by r298361
* Update comment added in r298357emaste2016-04-201-3/+2
| | | | | | | The additional regex replacements are actully required due to an elfcopy bug which is now fixed (by r298361), not a Clang/GCC issue. Sponsored by: The FreeBSD Foundation
* Fix MFS symbol redefinition with clang 3.8.0wma2016-04-201-0/+9
| | | | | | | | | | | Newest CLANG objcpy uses different name parsing. Modify regexp to match (i.e. avoid substitution of "/" or "-" with "_"). Obtained from: Semihalf Sponsored by: Juniper Networks Reviewed by: hselasky, zbb Differential Revision: https://reviews.freebsd.org/D5873
* Implement the dependency condition more safely.bdrewery2016-04-141-1/+1
| | | | | | Nested : are not handled well without "". Sponsored by: EMC / Isilon Storage Division
* Remove the old depend (mkdep) code and make FAST_DEPEND the one true way.bdrewery2016-03-301-49/+0
| | | | | | | Reviewed by: emaste, hselasky (partial), brooks (brief) Discussed on: arch@ Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5742
* FAST_DEPEND: Use .dinclude to enable full .depend logic in bmake.bdrewery2016-03-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | The inclusion of .MAKE.DEPENDFILE (.depend) has special logic in make to ignore stale/missing dependencies. bmake 20160220 added a '.dinclude' directive that uses the special logic for .depend when including the file. This fixes a build error when a file is moved or deleted that exists in a .depend.OBJ file. This happened in r292782 when sha512c.c "moved" and an incremental build of lib/libmd would fail with: make: don't know how to make /usr/src/lib/libcrypt/../libmd/sha512c.c. Stop Now this will just be seen as a stale dependency and cause a rebuild: make: /usr/obj/usr/src/lib/libmd/.depend.sha512c.o, 13: ignoring stale .depend for /usr/src/lib/libcrypt/../libmd/sha512c.c --- sha512c.o --- ... This rebuild will only be done once since the .depend.sha512c.o will be updated on the build with the -MF flags. This also removes -MP being passed for the .depend.OBJ generation (which would create fake targets for system headers) since the logic is no longer needed to protect from missing files. Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Prefer .OBJDIR depend files.bdrewery2016-02-291-1/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* Remove hack from r2408 that is no longer needed.bdrewery2016-02-241-3/+0
| | | | Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Always run depend via beforebuild which removes many hacks.bdrewery2016-02-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will generate dependencies rather than depending on the previous behavior of depending on the guessed OBJS: *.h dependecies or a user running 'make depend'. Experimentation showed that depending only on headers was not enough and prone to .ORDER errors. Downstream users may also have added dependencies into beforedepend or afterdepend targets. The safest way to ensure dependencies are generated before build is to run 'make depend' beforehand rather than just depending on DPSRCS+SRCS. Note that the OBJS_DEPEND_GUESS mechanism (a.k.a .if !exists(.depend) then foo.o: *.h) is still useful as it improves incremental builds with missing .depend.* files and allows 'make foo.o' to usually work, while this 'beforebuild: depend' ensures that the build will always find all dependencies. The 'make foo.o' case has no means of a 'beforebuild' hook. This also removes several hacks in the DIRDEPS_BUILD: - NO_INSTALL_INCLUDES is no longer needed as it mostly was to work around .ORDER problems with building the needed headers early. - DIRDEPS_BUILD: It is no longer necesarry to track "local dependencies" in Makefile.depend. These were only in Makefile.depend for 'clean builds' since nothing would generate the files due to skipping 'make depend' and early dependency bugs that have been fixed, such as adding headers into SRCS for the OBJS_DEPEND_GUESS mechanism. Normally if a .depend file does not exist then a dependency is added by bsd.lib.mk/bsd.prog.mk from OBJS: *.h. However, meta.autodep.mk creates a .depend file from created meta files and inserts that into Makefile.depend. It also only tracks *.[ch] files though which can miss some dependencies that are hooked into 'make depend'. This .depend that is created then breaks incremental builds due to the !exists(.depend) checks for OBJS_DEPEND_GUESS. The goal was to skip 'make depend' yet it only really works the first time. After that files are not generated as expected, which r288966 tried to address but was using buildfiles: rather than beforebuild: and was reverted in r291725. As noted previously, depending only on headers in beforebuild: would create .ORDER errors in some cases. meta.autodep.mk is still used to generate Makefile.depend though via: gendirdeps: Makefile.depend .END: gendirdeps This commit allows removing all of the "local dependencies" in Makefile.depend which cuts down on churn and removes some of the arch-dependent Makefile.depend files. The "local dependencies" were also problematic for bootstrapping. Sponsored by: EMC / Isilon Storage Division
* Hook the meta/nofilemon build into using FAST_DEPEND.bdrewery2016-02-241-11/+24
| | | | | | | | | | | | | | | | 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
* FAST_DEPEND: Don't waste time generating an empty .depend file.bdrewery2016-02-241-2/+0
| | | | | | | | The .depend file will still be generated if _EXTRADEPEND is used. The target is kept with a dependency on DPSRCS though so that 'make depend' will generate all files. Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Rework how guessed dependencies are handled.bdrewery2016-02-241-5/+15
| | | | | | | | | | | | | | | Rather than depend on .depend not existing, check the actual .depend.OBJ file that will be used for that object. If it doesn't exist then use the guessed dependencies. FAST_DEPEND may never have a .depend file. Not having one means all of the previous logic would over-depend all object files on all headers which is not what we wanted. It also means that if a .depend is generated before a build is done for _EXTRADEPEND (such as for PROG or LIB) then all of these dependencies would not be used since the .depend wasn't generated from mkdep and the real .depend.* files are not generated until the build. Sponsored by: EMC / Isilon Storage Division
* Support beforebuild in the kernel.bdrewery2016-02-241-1/+2
| | | | Sponsored by: EMC / Isilon Storage Division
* Always remove .depend.* in case switching between FAST_DEPEND on/off.bdrewery2016-02-221-2/+1
| | | | | | This was missed in r295666. Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Apply conditional -MF from r291945 to kernel as well.bdrewery2016-02-191-0/+7
| | | | Sponsored by: EMC / Isilon Storage Division
* Avoid reading .depend.* in simple cases where not needed.bdrewery2016-02-191-1/+10
| | | | | | | | | | This will speed up some tree-walks with FAST_DEPEND which otherwise would include length(SRCS) .depend files. This also uses a trick suggested by sjg@ to still read them in when specifying _V_READ_DEPEND=1 in the env/make args. Sponsored by: EMC / Isilon Storage Division
* Use built-in :tA here rather than realpath(1).bdrewery2016-02-161-1/+1
| | | | Sponsored by: EMC / Isilon Storage Division
* Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specifiedadrian2016-02-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | MD_ROOT_SIZE and embed_mfs.sh were basically retired as part of https://reviews.freebsd.org/D2903 . However, when building a kernel with 'options MD_ROOT_SIZE' specified, this results in a non-working MFS, as within sys/dev/md/md.c we fall within the wrong # ifdef. This patch implements the following: * Allow kernels to be built without the MD_ROOT_SIZE option, which results in a kernel built as per D2903. * Allow kernels to be built with the MD_ROOT_SIZE option, which results in a kernel built similarly to the pre-D2903 way, with the following differences: * The MFS is now put in a separate section within the kernel (oldmfs, so it differs from the mfs section introduced by D2903). * embed_mfs.sh is changed, so it looks up the oldmfs section within the kernel, gets its size and offset, sees if the MFS will fit within the allocated oldmfs section and only if all is well does a dd of the MFS image into the kernel. Submitted by: Stanislav Galabov <sgalabov@gmail.com> Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D5093
* Fix generation of dependency rules for the LinuxKPI, the MLX5 driverhselasky2016-01-271-4/+23
| | | | | | | and all of OFED except MLX4[EN/IB]. Sponsored by: Mellanox Technologies MFC after: 1 week
* FAST_DEPEND: Apply missed nofilemon fix from r294351.bdrewery2016-01-271-1/+2
| | | | Sponsored by: EMC / Isilon Storage Division
* FAST_DEPEND: Fix incremental builds leading to kernel panics.bdrewery2016-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This fixes .depend.genassym.o not being included. genassym.o depends on all of the system headers and when rebuilt regenerates assym.s which lists offsets for critial .S files to utilize. By having a struct in a system header change its offsets and not have generassym.o be rebuilt, this would lead to panics. The flaw in the initial commit was seeing ${OBJS} in ${SYSTEM_OBJS} and assuming it had all of ${SRCS} in it. This is not the case though. The older mkdep code splits out all of the various SRC lists for generating the .depend file. It also includes ${GEN_CFILES}, which had genassym.c and was the only significant file lacking from ${SYSTEM_OBJS} upon inspection, since it is not linked in. Rather than duplicate the likely soon-to-be-removed mkdep lists, just add genassym.o to the DEPENDOBJS list. Using ${SRCS} as bsd.dep.mk does would be nice but there are many files in the build that are only added to ${OBJS} and not ${SRCS}, such as bf_enc.o derived from bf_enc.S for i386. Sponsored by: EMC / Isilon Storage Division Reported by: dhw (several panics on current@) Pointyhat to: bdrewery
* FAST_DEPEND: Rework optimization for r290524.bdrewery2016-01-151-4/+4
| | | | | | | | The .MAKEFLAGS check inside of the .for loop is extremely slow for some reason. Just moving it out of the loop trimmed -V lookup time from 11 seconds to 1 second in the kernel obj directory. Sponsored by: EMC / Isilon Storage Division
* Add built-in ccache build support via WITH_CCACHE_BUILD option.bdrewery2015-11-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a FAST_DEPEND option, off by default, which speeds up the build ↵bdrewery2015-11-061-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Do as r289391 did for share/mk and make installing to a non-existent directorybdrewery2015-10-171-5/+5
| | | | | | | | | | | an error. Most of these do a 'mkdir -p' or 'install -d' before installing, but add the trailing / here for consistency with the userland install. MFC after: 2 weeks X-MFC-With: r289391 Sponsored by: EMC / Isilon Storage Division
* Build changes that allow the modules on arm64.kib2015-10-081-1/+1
| | | | | | | | | | | | | | | - Move the required kernel compiler flags from Makefile.arm64 to kern.mk. - Build arm64 modules as PIC; non-PIC relocations in .o for shared object output cannot be handled. - Do not try to install aarch64 symlink. - A hack for arm64 to avoid ld -r stage. See the comment for the explanation. Some functionality is lost, like ctf handling, but hopefully will be restored after newer linker is available. Reviewed by: andrew, emaste Tested by: andrew (on real hardware) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3796
* Install kernel debug data under /usr/lib/debugemaste2015-09-241-7/+19
| | | | | | | | | | | | | | | | | | | | | | This avoids needing a large boot partition / file system in order to accommodate multiple kernels, and provides consistency with userland debug. This also simplifies the process of moving kernel debug files to a separate package and installing them on demand. In addition, change kernel debug file extension to .debug, to match userland debug files. When using the supported kernel installation method the /usr/lib/debug/boot/kernel directory will be renamed (to kernel.old) as is done with /boot/kernel. Developers wishing to maintain the historical behavior of installing debug files in /boot/kernel/ can set KERN_DEBUGDIR="" in src.conf(5). Reviewed by: bdrewery, brooks, imp, markj Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1006
* sys/conf: pass NMFLAGS to nm(1) via genassym.sh.rpaulo2015-08-141-1/+1
|
* Change md(4) to use weak symbols as start, end and size for the embeddedmarcel2015-08-131-4/+22
| | | | | | | | | | | | | | root disk. The embedded image is linked into the kernel in the .mfs section. Add rules and variables to kern.pre.mk and kern.post.mk that handle the linking of the image. First objcopy is used to generate an object file. Then, the object file is linked into the kernel. Submitted by: Steve Kiernan <stevek@juniper.net> Reviewed by: brooks@ Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2903
* Allow DTrace to be compiled-in to the kernel.br2015-06-101-10/+10
| | | | | | | | This will require for AArch64 as we dont have modules yet. Sponsored by: HEIF5 Sponsored by: ARM Ltd. Differential Revision: https://reviews.freebsd.org/D1997
* Truncate the ctfmerge command line, like we do with SYSTEM_LD.imp2014-08-121-1/+2
|
OpenPOWER on IntegriCloud