It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).
Reviewed by: dteske
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7969
There were a few issues.
- In-tree GCC won't have X_COMPILER_TYPE defined but will have
WANT_COMPILER_TYPE==gcc set from the SYSTEM_COMPILER logic that can
be used. Make the clang check specific to clang as well to ensure
-target doesn't leak into a GCC build.
- When using a cross-compiler GCC (with a default sysroot or arch) and also
passing --sysroot, it basically forgets all internal paths for
libraries. We've already worked around this quite a bit for
the external toolchains. Now for the in-tree bootstrap cross-compiler
GCC, also pass in the needed -B${WORLDTMP}/usr/lib to find the crt
object files, but also -isystem and -L to fix the paths. This creates
quite a spammy build log, but it is clear and still achieves the goals
and stays consistent between internal and external build flags.
Reducing the spam by using the '=' prefix feature will help and be
done later.
MFC after: 3 days
X-MFC-With: r304681
Reported by: bz
Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division
The internal bootstrap compiler has a default sysroot set by TOOLS_PREFIX
and target set by TARGET/TARGET_ARCH. However, there are several needs to
always pass an explicit --sysroot and -target.
- External compiler needs sysroot and target flags.
- External ld needs sysroot.
- To be clear about the use of a sysroot when using the internal compiler.
- Easier debugging.
- Allowing WITH_SYSTEM_COMPILER+WITH_META_MODE to work together due to
the flip-flopping build command when sometimes using external and
sometimes using internal.
- Allow using no lld which has support for default paths.
The default sysroot in the bootstrap compiler is not changed. The
buildenv compiler will still work with its default and will also
include -target/--sysroot from CC in the environment.
MFC after: 3 days
Discussed with: emaste, brooks (BSDCam)
Reviewed by: emaste
Sponsored by: EMC / Isilon Storage Division
Previously, librtld_db just hardcoded /libexec/ld-elf.so, which isn't
correct for processes that aren't using the native ABI. With this change,
librtld_db can be used to inspect non-native processes; in particular,
dtrace -c now works for 32-bit executables on amd64.
MFC after: 1 month
It was added to sys.mk relatively recently (r274503) for EFI builds
but is no longer used by the base system. The in-tree binutils are
outdated, will not be updated, and will be removed in the future.
Remove it from the toolchain build now to slightly simplify the build
and make sure we don't grow an accidental dependency.
Note that this affects only the toolchain build, and does not affect
/usr/bin/objdump in the built world.
Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6460
This was a regression from r300349.
Setting MK_CROSS_COMPILER=no forces the compiler bootstraping *and* the
binutils/elftoolchain bootstrapping to be disabled in share/mk/src.opts.mk.
The only intent with using an external compiler is to disable bootstrapping of
the compiler. The binutils/elftoolchain bootstrapping must still occur unless
XAS is set. This did not affect WITH_SYSTEM_COMPILER.
Now that setting an external compiler sets both MK_CLANG_BOOTSTRAP and
MK_GCC_BOOTSTRAP to no, and MK_CROSS_COMPILER does the same via
share/mk/src/opts.mk, remove redundant logic that checks for
MK_CROSS_COMPILER. It will not always be true now that MK_CROSS_COMPILER==no
when an external compiler is used and --sysroot/-target is needed.
Reported by: sbruno
Pointyhat to: bdrewery
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
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
Previously it was conditional on MK_MAN. It's possible to build
FreeBSD with man pages but without man page tools. MK_MAN_UTILS
is the conditional used in share/man/Makefile for determining whether
makewhatis is executed at install time, so it is the proper one for
ITOOLS as well.
PR: 210142
MFC after: 1 week
files will produce an error and buildkernel will fail. Previously missing
KERNCONF files silently failed giving no indication as to why, only to
subsequently discover during installkernel that the desired kernel was
never built in the first place.
Reviewed by: ngie@
MFC after: 1 week
Differential Revision: D7167
As the XXX notes, these should really be checking MK_GNUCXX since there is
already a version check in share/mk/src.opts.mk to disable it. Fixing that
here is more complex though. This could also be using X_COMPILER_FEATURES
but uses X_COMPILER_VERSION to keep in sync with the src.opts.mk logic.
Tested by: andreast
Sponsored by: EMC / Isilon Storage Division
Approved by: re (gjb)
- This was broken by r300350 and r300885.
- Add some comments around the external GCC logic since it is spread out
and in need of some cleanup.
- The problem was that X_COMPILER_TYPE is always defined from CC->XCC's
default, so if /usr/bin/cc is GCC (as it is on native powerpc64) then
X_COMPILER_TYPE was getting GCC and triggering the external logic in
Makefile.libcompat. It was intended to always provide -isystem with
GCC since --sysroot is used into the lib32 sysroot which won't modify
the header path without the -isystem. The use of the libc++/std=c++11
override was only intended to be used for external compilers though
(more accurately GCC 4.8+ but that's a separate assumption to
cleanup). Apply the same logic from Makefile.inc1 to Makefile.libcompat
to only add the libc++ override when needed for external compilers.
Pointyhat to: bdrewery
Tested with: native ppc64 (swills), universe, ppc64 xtoolchain,
amd64 xtoolchain, sparc64 cross-build of ppc64 (host GCC 4.2)
Reported by: andreast, swills
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
In order to allow using utimensat() in install(1), add futimens() and
utimensat() to -legacy.
The files futimens.c and utimensat.c are modified copies of the files under
lib/libc/sys/ since the libc versions use symbols that do not exist in the
libc on the build system (sys_futimens and sys_utimensat) . I expect the
next non-sweeping change to both sets of files to be to delete them, anyway.
This will allow reverting r299942 (which is a revert of r299850) enabling
nanosecond timestamps in install(1).
Reviewed by: bdrewery
This is actually a revision in the stable/9 branch released as 9.1. The
localedef build requires xlocale from this period.
Sponsored by: EMC / Isilon Storage Division
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.
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
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
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
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
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
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
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
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
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.