Commit Graph

1246 Commits

Author SHA1 Message Date
Bryan Drewery
b4dd422926 Follow-up r301287: Pass external compiler metadata when used.
This fixes WITH_SYSTEM_COMPILER, WITHOUT_CROSS_COMPILER, external compiler, to
pass the external compiler metadata rather than the ${CC} metadata.  On
a build host that has clang as CC it was passing the clang metadata rather than
GCC metadata during the build.
2016-06-04 17:17:10 +00:00
Bryan Drewery
bbfcc681bc WITHOUT_CROSS_COMPILER: Fix installworld.
Since no WORLDTMP/usr/bin/cc is created, cc cannot be found
during installworld time since /usr/bin is not in the PATH.
Pass along the known compiler metadata to allow installworld
to work.  The same fix was used for WITH_SYSTEM_COMPILER.

A better route would be to store a cookie in buildworld
containing this compiler metadata and then using that
at install time, rather than rerunning cc.

Reported by:	Mark Millard
Sponsored by:	EMC / Isilon Storage Division
2016-06-03 20:49:49 +00:00
Dimitry Andric
c371433e4a For clang, move the definition of FREEBSD_CC_VERSION into its own header
file, lib/clang/freebsd_cc_version.h, instead of reusing Version.inc.
The header is only included from one .cpp file in the clang tree.

This minimizes the number of .cpp files that need to be rebuilt if the
version is bumped.

Discussed with:	bdrewery
2016-06-03 16:17:36 +00:00
Bryan Drewery
f661dbee81 GCC External: Revert r300886, r300904, r300917, r300918
The fix in r300873 is mostly enough.  A fix for lib32 will be
committed.separately.
2016-05-29 06:20:15 +00:00
Bryan Drewery
ce00342bb2 Move external GCC compiler hacks to bsd.sys.mk.
This allows respecting -nostdinc, -nostdinc++ and -nostdlib before
making the decision to add in -isystem, etc.  The -isystem flags
are problematic for building lib/libc++ and lib/libcxxrt which wants
to only use its own headers.

More information the need of these flags can be found at
https://gcc.gnu.org/ml/gcc/2016-03/msg00219.html

This also reverts r300873.

Sponsored by:	EMC / Isilon Storage Division
2016-05-27 23:03:44 +00:00
Glen Barber
5929ee2961 Make PKG_VERSION aware of '-ALPHA*'.
Submitted by:	Ben Woods
Sponsored by:	The FreeBSD Foundation
2016-05-27 20:33:14 +00:00
Bryan Drewery
eb9b07bb77 WITH_AUTO_OBJ: Fix crunchgen builds.
Passing MAKEOBJDIRPREFIX to the main prog build (rescue) would confuse
WITH_AUTO_OBJ and cause it to create a recursed object directory that
then broke the actual prog build.  This is normally not a problem since
we do not call 'make -f prog.mk obj' before building anything in it.

Crunchgen(1) also assumes that if -o is not passed then if an object
directory does not already exist then it should build in the source
directories.  The normal buildworld process will have already ran 'make
obj' in each of the component directories so this is not a problem.
With WITH_AUTO_OBJ though this is not the case.  So we must tell
crunchgen(1) that MK_AUTO_OBJ=yes will create the directory and to not
require it be present before generating its Makefile.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:36 +00:00
Bryan Drewery
016448a507 WITH_META_MODE: Move the kernel support to kern.pre.mk.
This allows using META_MODE directly from the kernel build directory.
This also allows removing a hack from the DIRDEPS_BUILD kernel target.

Sponsored by:	EMC / Isilon Storage Division
2016-05-26 23:20:01 +00:00
Bryan Drewery
2d86a958e2 Remove leftover _crunchide from r283108 2016-05-26 23:19:57 +00:00
Dimitry Andric
9729cf0934 Update libc++ to 3.8.0. Excerpted list of fixes (with upstream revision
numbers):

r242679 Implement the plugin-based version of std::search. There are no
        searchers yet; those are coming soon.
r242682 Implement the default searcher for std::experimental::search.
r243728 Add <experimental/any> v2.
r245330 implement more of N4258 - Cleaning up noexcept in the standard
        library. Specifically add new noexcept stuff to vector and
	string's move-assignment operations
r245334 Fix PR22606 - Leak pthread_key with static storage duration to
        ensure all of thread-local destructors are called.
r245335 Fix PR23589: std::function doesn't recognize null pointer to
        varargs function.
r247036 Implementation of Boyer-Moore and Boyer-Moore-Horspool
        searchers for the LFTS.
r249325 Implement LWG#2063, and update the issues links to point to the
        github generated pages
r249738 Split <ctype.h> out of <cctype>.
r249739 Split <errno.h> out of <cerrno>.
r249740 Split <float.h> out of <cfloat>.
r249741 Split <inttypes.h> out of <cinttypes>.
r249742 Split <math.h> out of <cmath>.
r249743 Split <setjmp.h> out of <csetjmp>.
r249761 Split <stddef.h> out of <cstddef>.
r249798 Split <stdio.h> out of <cstdio>.
r249800 Split <stdlib.h> out of <cstdlib>.
r249889 Split <wchar.h> out of <cwchar>.
r249890 Split <wctype.h> out of <cwctype>.
r249929 Split <string.h> out of <cstring>.
r250254 ABI versioning macros for libc++.
r251246 Fix LWG#2244: basic_istream::seekg
r251247 Fix LWG#2127: Move-construction with raw_storage_iterator.
r251253 Fix LWG#2476: scoped_allocator_adaptor is not assignable
r251257 Fix LWG#2489: mem_fn() should be noexcept
r251618 Implement P0004R1 'Remove Deprecated iostreams aliases'
r251766 Implement the first part of P0006R0: Adopt Type Traits Variable
        Templates for C++17.
r252195 Implement P0092R1 for C++1z
r252350 Allow deque to handle incomplete types.
r252406 More of P0006R0: type traits variable aliases for C++17.
r252407 Implement LWG#2353: std::next is over-constrained
r252905 Implement P0074: Making owner_less more flexible
r253215 Implement P0013R1: Logical Operator Type Traits.
r253274 Implement P0007: Constant View: A proposal for a std::as_const
        helper function template.
r254119 Add static_assert to set/multiset/map/multimap/forward_list/deque
        that the allocator's value_type match the container's value_type.
r254283 Implement more of P0006; Type Traits Variable Templates.
r255941 LWG2485: get() should be overloaded for const tuple&&.
r256325 Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default
        constructors.
r256652 Fix for ALL undefined behavior in <list>.
r256859 First half of LWG#2354: 'Unnecessary copying when inserting
        into maps with braced-init syntax'

Exp-run:	antoine
Relnotes:	yes
2016-05-26 18:52:49 +00:00
Bryan Drewery
7e1b3c5e2c Move binutils handling after src.opts.mk.
This fixes the arm64 build after r300348.

Sponsored by:	EMC / Isilon Storage Division
2016-05-23 16:24:34 +00:00
Bryan Drewery
6120aabd32 Opportunistically skip building a cross-compiler with SYSTEM_COMPILER set.
This will still build the compiler for the target but will not build the
bootstrap cross-compiler in the cross-tools phase.  Other toolchain
bootstrapping, such as elftoolchan and binutils, currently still occurs.

This will utilize the default CC (cc, /usr/bin/cc) as an external compiler.

This is planned to be on-by-default eventually.

This will utilize the __FreeBSD_cc_version compiler macro defined in the
source tree and compare it to CC's version.  If they match then the
cross-compiler is skipped.  If [X]CC is an external compiler (absolute
path) or WITHOUT_CROSS_COMPILER is already set, then this logic is skipped.
If the expected bootstrap compiler type no longer matches the found CC
compiler type (clang vs gcc), then the logic is skipped.  As an extra
safety check the version number is also compared from the compiler to
the tree version.

Clang:
  The macro FREEBSD_CC_VERSION is defined in:
    lib/clang/include/clang/Basic/Version.inc
  For clang -target will be used if TARGET_ARCH != MACHINE_ARCH.  This
  is from the current external toolchain logic.  There is currently an
  assumption that the host compiler can build the TARGET_ARCH.  This
  will usually be the case since we don't conditionalize target arch
  support in clang, but it will break when introducing new
  architectures.  This problem is mitigated by incrementing the version
  when adding new architectures.

GCC:
  The macro FBSD_CC_VER is defined in:
    gnu/usr.bin/cc/cc_tools/freebsd-native.h
  For GCC there is no simple -target support when TARGET_ARCH !=
  MACHINE_ARCH.  In this case the opportunistic skip is not done.  If we
  add proper support for this case in external toolchain logic then it
  will be fine to enable.

This relies on the macros being incremented whenever any change occurs
to these compilers that warrant rebuilding files.  It also should never
repeat earlier values.

Reviewed by:	brooks, bapt, imp
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6357
2016-05-21 01:32:23 +00:00
Bryan Drewery
76286f4bc5 Enable external compiler logic if both bootstrap compilers are disabled.
Reviewed by:	brooks
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6358
2016-05-21 01:32:16 +00:00
Bryan Drewery
c1b9d0022d Enable and utilize WITHOUT_CROSS_COMPILER logic for external CC.
This is a NOP.

Reviewed by:	brooks, bapt
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6354
2016-05-21 01:32:07 +00:00
Bryan Drewery
34fb4407a8 Move external toolchain support earlier.
This is to consolidate external toolchain and WITHOUT_CROSS_COMPILER support.

Reviewed by:	brooks, bapt
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6353
2016-05-21 01:32:04 +00:00
Bryan Drewery
bf0c0f96cf WITH_META_MODE: Use META_MODE rather than .MAKE.MODE for buildkernel.
This is mostly a style change so that other code does not duplicate
it.  The problem is when META_MODE needs to be disabled but it has
been overridden by .MAKE.MODE.

Sponsored by:	EMC / Isilon Storage Division
2016-05-21 01:31:51 +00:00
Warner Losh
e873d4db28 Turns out, mipsn32el worked at one point, so add it back in.
Pointed out by: jmallet@
2016-05-19 02:58:30 +00:00
Warner Losh
14e5b32daf Fix negative logic error. We want gnueabihf ABI when we're NOT
requesting soft float ABI.

Noticed by: bdrewery
2016-05-18 22:50:25 +00:00
Warner Losh
631dbc3b78 mipsn32el is not a thing, remove it from the list of valid
architectures. There's no definition for it, nobody uses it
and it is unlikely to ever work. We can put it back when someone
demonstrates it running...

The new default for armv6 is hard float, so extend that default
to the external toolchain support.
2016-05-18 20:49:09 +00:00
Bryan Drewery
ecb92e2d47 Combine restage/reinstall in a safe way.
Sponsored by:	EMC / Isilon Storage Division
2016-05-18 17:08:29 +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
396f5ab6ee Support libsoft for restage.
This is essentially fixing a merge conflict.
2016-05-13 17:44:20 +00:00
Glen Barber
d4ca548306 Revert r299292, which was not a mismerge. It has an additional horrible
side effect of replacing /etc/{master.,}passwd and /etc/group.

Submitted by:	O. Hartmann
Pointyhat to:	gjb (myself)
Sponsored by:	The FreeBSD Foundation
2016-05-10 05:47:25 +00:00
Glen Barber
381fcf101d Combine the 'reinstall' and 'restage' targets, which appears to have
been a mismerge.

Sponsored by:	The FreeBSD Foundation
2016-05-10 00:47:49 +00:00
Enji Cooper
79ccc589d2 Default NO_INSTALLEXTRAKERNELS to yes, not no
The old (^/stable/9) default was yes, not no ("no" was the new default
introduced recently that broke POLA). Restore it to keep POLA like
glebius intended in r299077

MFC after: 3 days
X-MFC with: r299086
Pointyhat to: ngie (research before assuming and committing next time)
Sponsored by: EMC / Isilon Storage Division
2016-05-04 21:15:28 +00:00
Enji Cooper
c0fd425526 Default NO_INSTALLEXTRAKERNELS to "no" to unbreak the build
MFC after: soon (was insta-MFCed -_-..)
Pointyhat to: glebius
Sponsored by: EMC / Isilon Storage Division
2016-05-04 21:00:41 +00:00
Gleb Smirnoff
f4ae78bd4e Make it possible to override NO_INSTALLEXTRAKERNELS.
Reviewed by:	gjb
2016-05-04 17:21:34 +00:00
Pedro F. Giffuni
a1ff7af013 Misc. build: minor spelling fixes.
No functional change.
2016-05-03 22:01:48 +00:00
Bryan Drewery
561e173f7e WITH_META_MODE: Allow buildkernel to create .meta files with curdir==objdir.
Without this the incremental build was broken since .depend.* are not
generated with .MAKE.MODE=meta and .meta files were not created to
track dependencies.  Typically meta mode does not create .meta files
when building with curdir==objdir but the kernel build is special.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-26 18:08:51 +00:00
Bryan Drewery
75a6cb4f34 Fix unset variables from r298417.
Pointyhat to:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:50:45 +00:00
Bryan Drewery
40cf3344dc Add more missing .PHONY
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:43:36 +00:00
Bryan Drewery
59e2f057b6 Remove redundant logic from the pkg-base merge.
These will be set from the logic right above it.

Reviewed by:	gjb
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:30:28 +00:00
Bryan Drewery
ae00149999 Fix 'make -n' for new packaging targets.
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:30:25 +00:00
Bryan Drewery
c943a53eb4 Add more missing .PHONY.
This also protects them from trying to create .meta files
with WITH_META_MODE.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:30:16 +00:00
Ed Maste
97c316c68c Adjust BOOTSTRAPPING test after MFC of kbdcontrol's -P option 2016-04-21 13:14:55 +00:00
Glen Barber
fcede88bbd Add MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
created to avoid creating ${.OBJDIR}.

The duplicate REVISION/BRANCH/VERSION evaluation will be addressed
separately.

Sponsored by:	The FreeBSD Foundation
2016-04-18 19:27:51 +00:00
Glen Barber
0edd2576c0 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-16 02:32:12 +00:00
Bryan Drewery
473fda75dd META_MODE+filemon: Default -DNO_CLEAN enabled.
When using meta mode with filemon, the build is reliably incremental
safe.  Bmake will use the meta files, along with filemon information,
to rebuild targets when their dependencies change, commands change,
or files they generate are missing.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 22:00:33 +00:00
Bryan Drewery
fdff4951ca META_MODE: Pass along the default sysroot in bootstrap-tools to avoid rebuilds later.
Some of the clang libraries build in this phase and the cross-tools
phase.  Later in the cross-tools phase when they build with a default
TOOLS_PREFIX, they see a changed build command in meta mode due to
the changed DEFAULT_SYSROOT.  This is avoided by passing along
TOOLS_PREFIX earlier.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:09:03 +00:00
Bryan Drewery
d1dd034d07 META_MODE: Don't rebuild build-tools targets during normal build.
This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build.  Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:06:10 +00:00
Bryan Drewery
a561b1060c Mark some more .PHONY targets.
Sponsored by:	EMC / Isilon Storage Division
2016-04-14 21:04:37 +00:00
Bryan Drewery
7cbd0a2953 Simplify building libpam and fix libpam.a not containing the modules since r284345.
The change in r284345 moved the creation of openpam_static_modules.o to
lib/libpam/static_modules but never managed to get them into libpam.a.

Move this logic to lib/libpam/static_libpam and have it create a static
library for libpam.a  The main lib/libpam/libpam will only create a
shared library.  No redundancy in compilation or installation exists
in this solution.

This avoids requiring a pass with -D_NO_LIBPAM_SO_YET.

Sponsored by:	EMC / Isilon Storage Division
2016-04-14 01:17:03 +00:00
Glen Barber
9c831bbd69 MFH
Sponsored by:	The FreeBSD Foundation
2016-04-13 02:04:09 +00:00
Steve Wills
d13c461400 Try harder to find svn
While here, elliminate last references to CVS_UPDATE and SUP_UPDATE

Reviewed by:	gjb
Approved by:	gjb
2016-04-13 01:47:04 +00:00
Glen Barber
14cda706cb Set explicit ordering to prevent packaging failures with parallel
(-jN) make(1) jobs.

Sponsored by:	The FreeBSD Foundation
2016-04-11 18:10:20 +00:00
Glen Barber
7a888f325e Avoid using DESTDIR in packaged-base targets, which can
cause bizarre packaging failures with non-default OBJDIR
and/or MAKEOBJDIRPREFIX and REPODIR set to a location not
within OBJDIR.

Reported by:	many
Tested by:	sef
Sponsored by:	The FreeBSD Foundation
2016-04-08 01:57:40 +00:00
Glen Barber
2263fb580e MFH
Sponsored by:	The FreeBSD Foundation
2016-04-06 01:44:21 +00:00
Glen Barber
31f3abb19c Fix errors packaging the base system when using non-default DESTDIR
and MAKEOBJDIRPREFIX.

Sponsored by:	The FreeBSD Foundation
2016-04-05 23:24:17 +00:00
Bryan Drewery
91da76981b Remove leftover _LDSCRIPTROOT missed in r297270.
Sponsored by:	EMC / Isilon Storage Division
2016-04-05 21:12:03 +00:00
Glen Barber
d60840138f MFH
Sponsored by:	The FreeBSD Foundation
2016-04-04 23:55:32 +00:00