Binutils has already been reduced to installing ld only on powerpc32
and as only on amd64. (Also objdump on every arch supported by binutils
2.17.50.) Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there
is no reason to have a special case for it.
Sponsored by: The FreeBSD Foundation
Summary:
With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each
time we make a change that requires re-bootstrapping, but with the
linker variant, we instead take the entire part after "FreeBSD", as in
this example version output:
LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers)
E.g., LINKER_FREEBSD_VERSION is currently being set to
"c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006". This means that
*any* new upstream lld version will cause re-bootstrapping.
We should only look at the numerical field we append after a dash
instead. This review attempts to make it so.
The only thing I am not happy about is the post-processing of awk output
in Makefile.inc1. I notice that our awk does not have gensub(), so it
can't substitute a numbered sub-regex with \1, \2, etc. Suggestions
welcome. :)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D23691
Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS as deprecated in 2014 with a warning added for each one
found. Turn these into error in preperation for removal of compatability
support before FreeBSD 13.
This was previously committed in r354909 and reverted in r355011 due to
unforseen impacts on ports. I've since corrected all amd64 and i386
ports reported in prior runs as well as instance of these variables I
found via grep.
As explained in the comment; GOOGLETEST cannot currently be compiled on any
mips variant at the moment due to the cross toolchain seemingly using the
wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at
which point this should be reverted most expeditiously.
libssp_nonshared.a defines one symbol, __stack_chk_fail_local. This
is used only on i386 and powerpc; other archs emit calls directly to
__stack_chk_fail. Simplify linking on other archs by omitting it.
PR: 242941 [exp-run]
simple_httpd was granted a reprieve from the picobsd removal based on having
some reported user; it turns out this user isn't actually using the version
in base and merging their changes would be difficult at this point, so the
version in base will simply continue to rot. Retire it now, it may make a
comeback to ports with the improved version.
No notice issued because its current visibility has only been for ~3
months, and a notice has been previously issued about picobsd removal.
Disable new clang 10.0.0 warnings about misleading indentation in flex.
As this is contributed code with very messy indentation, which will
almost certainly never be upgraded, just disable the warning.
MFC after: 3 days
Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.
The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
void operator=(const CartesianProductHolder3& other);
^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
Combine(Bool(), /* async read */
^
For now, silence the warning using -Wno-deprecated-copy.
The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:
contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
^
For now, silence the warning using -Wno-signed-unsigned-wchar.
MFC after: 3 days
solved upstream in the mean time.
The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
void operator=(const CartesianProductHolder3& other);
^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
Combine(Bool(), /* async read */
^
For now, silence the warning using -Wno-deprecated-copy.
The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:
contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
^
For now, silence the warning using -Wno-signed-unsigned-wchar.
MFC after: 3 days
This should fix linker errors when building with clang+lld.
After this change the lib32 compat libraries are now buildt with
-mhard-float instead of -msoft-float
Reviewed By: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D23229
x86 needs bootstrap GNU as for assembling a few files, and powerpc needs
GNU ld.bfd for linking 32-bit objects. All other targets either fully
use in-tree Clang and lld, or rely on external toolchain.
Sponsored by: The FreeBSD Foundation
dma(8) depends on OpenSSL unconditionally.
Reported by: Michael Dexter's Build Options Survey run
MFC after: 1 weeks
Sponsored by: The FreeBSD Foundation
Filemon will add the ability to ignore the cookie if the installed file is
missing. Without filemon that's not possible though so if the cookie is present
an the command unchanged then the install wouldn't run.
Sponsored by: DellEMC
MFC after: 2 weeks
Profiling library archives are part of the development environment; they
don't need to be in separate -profile packages.
(In fact we can probably just eliminate the _p.a archives assuming that
profiling will be done using hwpmc etc., but that is a change for later.)
Discussed with: bapt, manu
Sponsored by: The FreeBSD Foundation
arichardson has an actual fix for the same issue that this was working
around; given that we don't build with llvm today, go ahead and revert the
workaround in advance.
Explicitly setting WITHOUT_KERBEROS implies WITHOUT_KERBEROS_SUPPORT,
but previously other cases that forced KERBEROS off (such as
WITHOUT_CRYPT) did not also set KERBEROS_SUPPORT off. Because the
_SUPPORT dependent options (KERBEROS/KERBEROS_SUPPORT) are processed
before other dependencies (CRYPT/KERBEROS) it's not easy to make this
happen automatically. Instead just explicitly set KERBEROS_SUPPORT
off where we set KERBEROS off.
Reported by: Michael Dexter's Build Option Survey run
hard use floating point hardware, pass registers to functions in
floating point registers.
softfp use floating point hardware, but pass registers to functions
in integer registers.
soft do floating point calcuations without using floating point
hardware. Pass arguments in integer registers.
FreeBSD 11 and newer assumes hard. 10 and earlier assumed softfp. We have no
real support, at the moment, for soft. It's untested, though, if softfp still
works.
Add a note here since this is a whack-a-doodle combination relative to all other
platforms.
softfp is likely to go away in the future because it was retained for people
using FreeBSD 10 + armv6 needing to transition more slowly from softfp -> hard
than the project. It likely is no longer needed, and may be getting in the
way of people needing 'soft' support.
Only sparc64 did not enable LLVM_LIBUNWIND. After r356513 LLVM_LIBUNWIND
should at least build on sparc64. The old DWARF unwinder will be removed
along with GCC 4.2.1 in the near future, so switch sparc64 to use LLVM's
unwinder in advance of the removal. Someone with access to the obsolete
sparc64 hardware supported by FreeBSD will have to test, and investigate
any failures. I will gladly help, but I don't have any suitable hardware
myself.
PR: 233405
bsd.cpu.mk is included by bsd.init.mk before bsd.linker.mk, so it
was always setting the flag since LINKER_FEATURES wasn't defined.
Reported by: mhorne
Reviewed by: imp, mhorne
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23076
- Enable clang and lld as system toolchains.
- Don't use external GCC for universe by default.
- Re-enable riscv64sf since it builds fine with clang + lld.
Reviewed by: emaste, mhorne
Relnotes: yes
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23089
This re-enables building the googletest suite by default on mips and instead
specifically doesn't build fusefs tests for mips+clang builds. clang will
easily spent >= 1.5 hours compiling a single file due to a bug in
optimization (see LLVM PR 43263), so turn these off for now while that's
hashed out.
GCC builds are unaffected and build the fusefs tests as-is. Clang builds
only happen by early adopters attempting to hash out the remaining issues.
The comment has been updated to reflect its new position and use less strong
wording about imposing on people.
Discussed with: ngie, asomers
Reviewed by: ngie
Extend r356379 to include 32-bit mips and sparc64. Using a decade-old
binutils linker with a contemporary compiler (either Clang or GCC) is
a combination unlikely to be used by anyone else, and it's not going
to be a good use of our time investigating and addressing any issues
that arise. Expect that all architectures newly migrated to external
GCC will also use external binutils.
After GCC was disabled by default in r356367, mips and sparc64 started
relying external GCC. However, the in-tree Binutils ld 2.17.50 is not
compatible with GCC for some mips64 targets, so turn off
BINUTILS_BOOTSTRAP and rely on external binutils (linker) as well.
For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
abort built into it.
For libssp_nonshared.a, steal stack_protector_compat.c from
^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
is a hidden symbol.
libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
build environment, and the gcclibs version has been disconnected from the
build in favor of this one.
PR: 242950 (exp-run)
Reviewed by: kib, emaste, pfg, Oliver Pinter (earlier version)
Also discussed with: kan
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D22943
Use "mipsel" instead of "mips" as the 32-bit MACHINE_ARCH when
building lib32 for little-endian 64-bit MIPS targets. This fixes an
error where some objects were compiled as LE and others compiled as BE
causing a link error for rtld32.
Reviewed by: emaste
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23028
More MACHINE_CPUARCH/MACHINE_ARCH cases enable these options than
disable them, and several of them have work in progress to switch over.
Thus, invert the sense of the test and list cases not using LLD as the
exceptions.
There were a few special cases for arm v5, such as disabling LLDB due to
the lack of 64-bit atomic operations. Now that arm has been retired (as
of r356263) we can simplify the options logic somewhat.
We use the BSDL devicetree compiler as long as we have a C++11 compiler.
dtc is not needed as a build tool on the platforms that are still using
GCC 4.2.1 (and it is being disabled very soon, anyhow).
Discussed with: imp, kevans
PowerPC switched to LLVM_LIBUNWIND along with the switch to Clang/LLVM
in r356111. This leaves only 32-bit Arm and sparc64 not using LLVM's
unwinder, so switch the sense to opt-out.
I elected to list the individual arm MACHINE_ARCHs so future changes
are more clear if LLVM_LIBUNWIND is enabled for one or two but not all
32-bit Arm targets (see PR 233664).
After PowerPC switched in r356111, the list of targets using LLVM as the
default toolchain is much longer than those not using it. Switch the
sense of the test to exclude those not using LLVM.
Targets not using LLVM is currently mips, riscv5, and sparc64; work is
in progress to migrate the first two to LLVM.
This enables LLVM as the default compiler for powerpc, powerpc64, and
powerpcspe, as well as LLD as the default linker for powerpc64.
LLD is not yet ready for prime time for powerpc and powerpcspe, but work is
continuing on it.
Submitted by: alfredo.junior_eldorado.org.br
Relnotes: YES
Differential Revision: https://reviews.freebsd.org/D20378
Summary:
This patch is to support ongoing work for replacing "GCC/BFD" by "CLANG/LLD" on
target PowerPC64 [1], by proposing a way to specify and/or locate a secondary
ld.bfd linker.
This is necessary as LLD currently doesn't support PowerPC 32 bits, so we keep
using BFD for the 32 bit stuff on PowePC64(LIB32 compatibility and
STAND/slof/loader.)
- creates LD_BFD variable pointing to ld.bfd
- use LD_BFD as linker for LIB32/compat
- Default behavior for other platforms aren't changed.
[1] https://wiki.freebsd.org/powerpc/llvm-elfv2
Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D20261
Disable the warning for WARNS <= 3. This is lame, but it's what we
already do for the clang build.
Reviewed by: dim
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D22889
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo". That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.
Updating the vendor area to match this layout is next.
libmagic only depend on mkmagic if not DIRDEPS_BUILD
libpmc fix -I for libpmcstat
local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS
Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D22872
The env space consumed by exporting all libc's .meta files
left little room for command line,
so unexport when done.
Update dirdeps.mk to latest and add
dirdeps-targets.mk to simplify/update targets/Makefile
Makefile changes to go with Makefile.depend changes in D22494
Reviewed by: bdrewery
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22495