aboutsummaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Use TARGET_ARCH=riscv64 when TARGET=riscvWarner Losh2017-11-211-1/+1
| | | | | | | | | | The supported targets are riscv64 and riscv64sf. Use the former when building with a bare TARGET=riscv and it is the more common one. Sponsored by: Netflix Notes: svn path=/head/; revision=326071
* Move top-level AUTO_OBJ logic to Makefile.sys.inc.Bryan Drewery2017-11-181-28/+1
| | | | | | | Sponsored by: Dell Notes: svn path=/head/; revision=325973
* Remove build system support for lint.Warner Losh2017-11-171-1/+1
| | | | | | | Differential Revision: https://reviews.freebsd.org/D13124 Notes: svn path=/head/; revision=325954
* Rework r325568 so all 'make LINT' targets work.Bryan Drewery2017-11-131-1/+1
| | | | | | | | Reported by: ngie Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325776
* META_MODE: Avoid some logic if disabled and allow enabling with make argument.Bryan Drewery2017-11-111-3/+11
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325698
* AUTO_OBJ: Disable in non-build targets.Bryan Drewery2017-11-111-0/+27
| | | | | | | | | | | | | | | There's no reason to create object directories for targets like 'installworld' or 'distributeworld', and the others in this list. Specifying MK_AUTO_OBJ as a make argument allows circumventing this if needed for some reason. This fixes mergemaster creating a full object tree due to doing a 'make installconfig' tree walk. Reported by: Mark Millard Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325697
* Remove rerelease target that was added in r38978.Bryan Drewery2017-11-101-1/+1
| | | | | | | | | | I'm not sure what this target is but it doesn't exist now and doesn't seem to have existed before. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325682
* native-xtools: Fix for GCC archs.Bryan Drewery2017-11-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | - This also adds in a _cleanobj step as needed. - This redirects TARGET/TARGET_ARCH to NXB_TARGET/NXB_TARGET_ARCH in Makefile.inc1 as the main build needs to be for MACHINE rather than TARGET. First build the toolchain and then use that as an external toolchain to build the needed directories and NXB_TARGET-toolchain, all as MACHINE files though via TARGET_TRIPLE=MACHINE_TRIPLE. The NXBDIRS is evaluated in the 'everything' submake as it needs to be based on TARGET's src.opts.mk values, such as MK_GCC=yes when building on a MK_CLANG=yes MACHINE. This can likely be changed to a specific _native-xtools-everything target later and the funky late evaluation of SUBDIR_OVERRIDE removed. X-MFC-With: r325001 Pointyhat to: bdrewery MFC after: 2 months Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325673
* Deal with src.conf for top-level MAKEOBJDIRPREFIX guard.Bryan Drewery2017-11-101-1/+2
| | | | | | | | | | | - Don't discard SRCCONF value since it may incorrectly have MAKEOBJDIRPREFIX in it. - Add note about src.conf not being a suitable place for MAKEOBJDIRPREFIX. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325627
* universe: Fix creating LINT files with AUTO_OBJ.Bryan Drewery2017-11-081-1/+2
| | | | | | | | | | These are expected to be created in .CURDIR. Reported by: kib Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325568
* AUTO_OBJ: Don't create TARGET. directories during 'make universe'.Bryan Drewery2017-11-081-1/+1
| | | | | | | | Reported by: rpokala Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325529
* Simplify location of bootstrap make.Bryan Drewery2017-11-051-2/+5
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325413
* AUTO_OBJ is unsafe at the moment as it is for some reason removing /etc with ↵Bryan Drewery2017-11-021-1/+0
| | | | | | | _cleanobj. Notes: svn path=/head/; revision=325348
* Something is very wrongBryan Drewery2017-11-021-0/+1
| | | | Notes: svn path=/head/; revision=325347
* Add a 'make cleanuniverse'.Bryan Drewery2017-11-011-0/+1
| | | | | | | | | | This will remove all build files for the source directory when MK_UNIFIED_OBJDIR is enabled. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325289
* Suggest TARGET/TARGET_ARCH, XDEV/XDEV_ARCH are depcrecated in r269031.Bryan Drewery2017-10-291-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325083
* Change native-xtools to not install by default; add a native-xtools-install.Bryan Drewery2017-10-291-4/+8
| | | | | | | | | | | | | | | Without this the user has to mess with 'make -f Makefile.inc1 ...' to figure out where the files are installed in the OBJDIR and then they need to copy them to where they really wanted them. Using DESTDIR may be problematic after r325001 as well. The files will be installed to DESTDIR/NXTP where NXTP defaults to /nxb-bin. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325082
* build(7): Document native-xtools.Bryan Drewery2017-10-291-1/+3
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325080
* Fix xdev TARGET/TARGET_ARCH assertion and expand to native-xtools.Bryan Drewery2017-10-291-0/+16
| | | | | | | | | | | | The top of Makefile.inc1 requires TARGET/TARGET_ARCH be defined. Just building 'make xdev' would already set them, so this error was never triggered. Moving it to Makefile fixes the problem. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325079
* Disable AUTO_OBJ as a make argument to ensure it really is disabled.Bryan Drewery2017-10-291-1/+1
| | | | | | | | | | If the user sets this to yes as a make argument too we still want to ensure these do not get enabled. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325078
* Support armv7 builds for userlandWarner Losh2017-10-051-1/+1
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=324340
* Quote ${MAKE} when passing in env in case it contains spaces.Bryan Drewery2017-08-161-1/+1
| | | | | | | | | | Downstream we are wrapping MAKE with a limits(1) call which interferes with these non-quoted cases. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=322585
* Make _TO_CPUARCH macro for ARCH to CPUARCH conversionsWarner Losh2017-08-121-2/+7
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=322429
* genericize target exclusion for missing external toolchainEd Maste2017-07-271-7/+15
| | | | | | | | | | | | | Previously we excluded riscv from make universe / tinderbox if the required xtoolchain package was not installed. Make that logic generic so that we can loop over multiple architectures, in preparation to test patches to have other architectures rely on external toolchain. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11652 Notes: svn path=/head/; revision=321616
* Add some .ORDER for distrib-dirs, distribute, distribution and distributeworld.Bryan Drewery2017-07-241-0/+10
| | | | | | | | | Reported by: Mark Millard MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=321434
* Expose only the create-packages-* targets since they set needed DEST/DIRDIR.Bryan Drewery2017-06-231-1/+1
| | | | | | | | | | The other targets just fail confusingly otherwise. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320285
* Allow ALWAYS_BOOTSTRAP_MAKE to force bmake bootstrapping.Bryan Drewery2017-06-231-1/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=320273
* By popular demand: change MAKE_GENERIC_KERNELS to MAKE_LINT_KERNELS.Ian Lepore2017-06-131-2/+2
| | | | | | | | | | It appears that the same arches that lack GENERIC kernel configs also lack LINT. But enough different arches get built to ensure a kernel change should build everywhere (32 and 64 bit, clang and old gcc, little and big endian). Notes: svn path=/head/; revision=319888
* Add support for "make universe_kernels -DMAKE_GENERIC_KERNELS" to buildIan Lepore2017-06-121-0/+2
| | | | | | | | | | | | | | | just the GENERIC kernels for each arch (including variations such as GENERIC-NODEBUG, GENERIC64, etc). This helps with quickly doing a test build for all[*] arches without building dozens of variant kernels for the arches that have lots of hardware/board/system variations. [*] Not all arches have a generic kernel (but they probably should for test-building purposes, even if it can't boot on any real hardware). Notes: svn path=/head/; revision=319859
* META_MODE: Add framework to force rebuilding for major ABI changes.Bryan Drewery2017-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Normally META_MODE ignores host files for "meta mode" decisions on whether a file should be rebuilt or not. This is because a simple installworld can update timestamps and cause the next build to rebuild all host tools, when the previous ones may not have any changes in the source tree. These tools are normally still ABI compatible. They are only rebuilt if NO_META_IGNORE_HOST is set from the workaround/hack in r301467. One of the major problems with this is when a host tool has objects spread across many revisions that have mixed-ABI. For example, if struct stat were to change on the host, some objects for a tool may have different ideas of that struct's definition. If just 1 source file were modified and rebuilt and linked into the tool, then that toll will have mixed-ABI objects and crash. This exact thing happened with the ino64 commit in r301467 followed by a trivial update to libbfd in r318750. The resulting binary would crash in buildworld. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319593
* Cache compiler metadata and reuse it at installworld time.Bryan Drewery2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right after cross-tools, a compiler-metadata.mk file is created that stores all of the bsd.compiler.mk metadata. It is then read in with a fail-safe during installworld time. The file is explicitly removed when invoking cross-tools to ensure that a stale file is not left around from odd manual 'make _cross-tools' -> 'make installworld' invocations. This fixes several issues: - With WITH_SYSTEM_COMPILER (default yes on head and no on releng/11.0): If you build on a system where the bootstrap compiler does not build due to the host compiler matching the in-tree one, but then installworld on another system where that logic fails (a bootstrap compiler is needed), the installworld immediately fails with: sh: cc: not found Note that fixing this logic may then hit a case where a rebuild is attempted in installworld. Normally cc would be ran with 'CFLAGS+=ERROR-tried-to-rebuild-during-make-install' to cause an error such as: cc: error: no such file or directory: 'ERROR-tried-to-rebuild-during-make-install' However, now it will just fail with the 'cc: not found' error. Inspection of the compile line will show 'ERROR-tried-to-rebuild-during-make-install'; It's not useful to set CC to anything other than 'cc' during install as it is more helpful to see the attempted compile rather than some other bogus error. - This now avoids running bsd.compiler.mk (cc executions) even more during installworld. There are compiler-dependent SUBDIR in the tree which required having a compiler during install. There is at least 1 case where CC is still executed in the install, such as from a LOOKUP!= in secure/lib/libcrypto/Makefile.inc checking for 'vzeroall' support. This is not significant for installworld as the lookup has a fallback (and hides its error) and only modifies CFLAGS, thus it's not worth fixing. PR: 212877 MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=316794
* Include RISC-V target to universe build.Ruslan Bukin2017-04-121-1/+15
| | | | | | | | | | | | Check if RISC-V external toolchain package is installed, otherwise skip build. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10344 Notes: svn path=/head/; revision=316730
* Unconditionally include arm64 in make universe / tinderboxEd Maste2017-04-081-10/+0
| | | | | | | | | | As of r316629 FreeBSD/arm64 uses the in-tree LLD linker by default, and does not require an external an aarch64-binutils port or package. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=316645
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-281-3/+2
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Add full softfloat and hardfloat support for RISC-V.Ruslan Bukin2016-11-161-1/+1
| | | | | | | | | | | Hardfloat is now default (use riscv64sf as TARGET_ARCH for softfloat). Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8529 Notes: svn path=/head/; revision=308731
* Add full softfloat and hardfloat support for MIPS.Ruslan Bukin2016-10-311-2/+2
| | | | | | | | | | | | | | This adds new target architectures for hardfloat: mipselhf mipshf mips64elhf mips64hf. Tested in QEMU only. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D8376 Notes: svn path=/head/; revision=308130
* Create a new MACHINE_ARCH for Freescale PowerPC e500v2Justin Hibbits2016-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=307761
* Add a 'make print-dir' that simply traverses all directories and prints them.Bryan Drewery2016-08-311-2/+7
| | | | | | | | | | This is useful for finding connected directories. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=305147
* Avoid showing the bootstrap make command for check-old, etc.Bryan Drewery2016-08-121-1/+2
| | | | | | | | | Reported by: koobs MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=304006
* make world: Allow installworld to be ran in parallel.Bryan Drewery2016-08-081-1/+1
| | | | | | | | | This has been safe for a while. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303844
* SYSTEM_COMPILER: Rework the logic to allow a 'make test-system-compiler'.Bryan Drewery2016-07-241-2/+4
| | | | | | | | | | | | | | 1. Always calculate what the expected values are. 2. Add 'make test-system-compiler' to show all of the computed values vs the wanted values. 3. Extend the .info line to buildkernel/kernel-toolchain/toolchain/_cross-tools. 4. Consolidate all of the logic to one condition. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303272
* Revert r302670 and r302671 for now.Bryan Drewery2016-07-131-1/+1
| | | | | | | | MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which has it backwards. Notes: svn path=/head/; revision=302690
* Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.Bryan Drewery2016-07-121-1/+1
| | | | | | | | | | | | | This also adds missing s/aarch64/arm64 to the sys.mk version and also adds back armv6hf for universe since it was added to the sys.mk version in r300438. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7159 Notes: svn path=/head/; revision=302670
* WITH_META_MODE: Whitelist 'make kernel-toolchain'Bryan Drewery2016-06-221-3/+3
| | | | | | | | Approved by: re (blanket, META_MODE) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=302088
* Fix top-level builds with fmake / 9.x.Bryan Drewery2016-06-211-1/+3
| | | | | | | | | Reported by: allanjude Approved by: re (marius) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=302067
* WITH_META_MODE: Whitelist 'make kernel' and 'make world'.Bryan Drewery2016-06-151-2/+2
| | | | | | | | | | | | | | installkernel is technically META_MODE safe but doesn't need an explicit approval to use it since it's all disabled via .PHONY. world uses 'make -B installworld' which already will disable META_MODE via the -B (.MAKE.MODE=compat) usage. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301940
* tinderbox/universe: Only show arm64 warning if it was in the TARGETS list.Bryan Drewery2016-06-151-2/+2
| | | | | | | | | | | | This was a flaw in my change in r287903 but also in the original change in r282156 since it used empty(${TARGETS}) rather than empty(TARGETS). Reported by: lidl Approved by: re (gjb) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301938
* Fix makeman showing dependency of DIRDEPS_BUILD->META_MODE.Bryan Drewery2016-06-141-2/+2
| | | | | | | | | | | This broke in r301887 with the meta mode whitelist. 'make showconfig' still needs WITH_META_MODE support. Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301894
* Fix build from stable/10 with fmake.Bryan Drewery2016-06-141-1/+1
| | | | | | | | | | | | | | This was broken in r301888. fmake does not look in share/mk by default and thus does not yet have MK_META_MODE set with default. Pointyhat to: bdrewery Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301893
* WITH_META_MODE: Lessen the filemon(4) requirement scope.Bryan Drewery2016-06-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | - Move the sys.mk filemon requirement to bsd.init.mk as a warning. This is intended only to show when building directly in a subdirectory without filemon loaded. - Move the error into Makefile and only apply it when building from the META_TGT_WHITELIST target list. -DNO_FILEMON can be used to suppress both the warning and the error but makes WITH_META_MODE less useful. It will only compare build commands in this mode rather than track all dependencies. This fixes installing from a jail which doesn't need filemon in this phase [1]. Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com> [1] Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301888