Commit graph

5118 commits

Author SHA1 Message Date
John Baldwin
b52bfacc1e Remove redundant OLD_FILES entries for debug symbols.
Entries for foo.debug files matching an existing entry in OLD_FILES or
OLD_LIBS are unnecessary as they are auto-generated.

Reviewed by:	imp, emaste
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33777

(cherry picked from commit ebc1c24695)
2022-07-13 08:22:24 -07:00
Thomas Munro
cc4c1e916a Update tools/regression/poll/sockpoll.c for POLLRDPOLL.
Add a POLLRDHUP example to this tool, for comparison with other
operating systems.  Also record current output on FreeBSD and Linux.

Reviewed by:    kib
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D29757

(cherry picked from commit 18f21f0355)
2022-06-17 22:22:13 +03:00
Dimitry Andric
862668c487 Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR:		261742
MFC after:	3 days

(cherry picked from commit 56f451bb3b)
2022-06-15 22:45:08 +02:00
Mark Johnston
a897f30685 src.conf.5: Update the WITHOUT_ZFS description
... to take into account programs and libraries which might implement
some ZFS-specific features without being exclusive to ZFS.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f7f387730e)
2022-06-13 08:43:17 -04:00
Dimitry Andric
40bbef56c9 Merge llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.4-0-g29f1039a7285, aka 14.0.4 release.

PR:		261742
MFC after:	3 days

(cherry picked from commit 2a66634d1b)

Bump versions llvm-project release/14.x llvmorg-14.0.4-0-g29f1039a7285

Somehow git rebase made this squashed commit disappear. Restore it.

PR:		261742
MFC after:	3 days

(cherry picked from commit ab9d54731f)

Update rest of llvm-project build glue for 14.0.4

I completely forgot about updating the generated llvm-project config
files, which also contain version numbers, etc. Sorry for the churn.

PR:		261742
Fixes:		ab9d54731f
MFC after:	3 days

(cherry picked from commit 809922b010)

Add more old clang files to (Optional)ObsoleteFiles.inc

There were a few more libclang_rt libraries added recently, but not yet
listed in the ObsoleteFiles.inc lists.

MFC after:	3 days

(cherry picked from commit 5e383e3603)
2022-06-09 20:14:08 +02:00
Dimitry Andric
36c1a99ff4 Add several sanitizer ignore lists under /usr/lib/clang
Some of the sanitizers from compiler-rt can use ignore lists, which are
loosely modeled on valgrind's example. Upstream provides default lists
for AddressSanitizer, CFI, and MemorySanitizer, so install these in the
expected location, /usr/lib/clang/14.0.3/share.

Reviewed by:	emaste
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D35338

(cherry picked from commit 7b6f5ebef6)
2022-06-04 14:00:20 +02:00
Dimitry Andric
a13b6fc619 Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.3-0-g1f9140064dfb.

PR:		261742
MFC after:	2 weeks

(cherry picked from commit 3a9a9c0ca4)
2022-06-04 14:00:08 +02:00
Dimitry Andric
67eec5325a Merge llvm-project main llvmorg-14-init-18294-gdb01b123d012
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-18294-gdb01b123d012, the last commit before
the upstream release/14.x branch was created.

PR:		261742
MFC after:	2 weeks

(cherry picked from commit 1fd87a682a)
2022-06-04 13:59:26 +02:00
Dimitry Andric
390adc38fc Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-17616-g024a1fab5c35.

PR:		261742
MFC after:	2 weeks

(cherry picked from commit 04eeddc0aa)
2022-06-04 13:59:19 +02:00
Dimitry Andric
574b7079b9 Merge llvm-project main llvmorg-14-init-11187-g222442ec2d71
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-11187-g222442ec2d71.

PR:		261742
MFC after:	2 weeks

(cherry picked from commit 4824e7fd18)
2022-06-04 13:59:04 +02:00
Dimitry Andric
1f6fd64fe9 Merge llvm-project main llvmorg-14-init-10223-g401b76fdf2b3
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14-init-10223-g401b76fdf2b3.

PR:		261742
MFC after:	2 weeks

(cherry picked from commit 5e801ac66d)
2022-06-04 13:58:59 +02:00
Alex Richardson
3c01fdcfc1 cross-build: fix some redeclaration warnings during bootstrap
MFC after:	3 days

(cherry picked from commit a89410ef91)
2022-05-07 13:09:56 +01:00
Ed Maste
c25c8d621e Remove stray .Pp from WITH_LOADER_EFI_SECUREBOOT description
MFC after:	3 days
Fixes:		13ea0450a9 ("Extend libsecureboot(old libve) to...")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 729ee78911)
2022-05-06 21:13:58 -04:00
Ed Maste
1ce2670170 Correct markup in WITH_/WITHOUT_UNIFIED_OBJDIR descriptions
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 60b08330a5)
2022-05-06 21:13:58 -04:00
Ed Maste
2103ecdad8 Update UNIFIED_OBJDIR descriptions
src.conf(5) previously stated they would be removed before FreeBSD 12.0,
but that did not happen.  Change it to "a future version of FreeBSD."

Also pick up LOADER_KBOOT change (enabled on x86) in src.conf regen.

Reported by:	jhb
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit b7f53cdcf8)
2022-05-06 21:11:37 -04:00
Ed Maste
8feaf3506d Update WITH_PROFILE description as it is yet removed
GCC still wants to link against (for example) libc_p.a when -pg is in
use, and it's unclear when and how this will be addressed.  Change the
WITH_PROFILE option description to claim that it may be removed from an
unspecified future version of FreeBSD, rather than FreeBSD 14.

Reported by:	Steve Kargl
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f768ecf247)
2022-05-06 21:09:48 -04:00
Ed Maste
e5f1a45b24 Clean up warnings in pthread tests
I intend to move these into lib/libthr/tests/ and connect to kyua.  This
is a first step to address warnings emitted when building using standard
make infrastructure.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34306

(cherry picked from commit ef135466f8)
(cherry picked from commit 7bfe5e4515)
2022-05-03 14:20:43 -04:00
John Baldwin
f0e7c59d30 cryptocheck: Add aliases for algs with multiple key sizes.
Previously algorithms such as AES-CBC would provide an algorithm
without a key size for the smallest key size and additional algorithms
with an explicit key size, e.g. "aes-cbc" (128 bits), "aes-cbc192",
and "aes-cbc256".

Instead, always make the key size name explicit and reuse the
"generic" name to request running tests against all of the key sizes.
For example, for AES-CBC this means "aes-cbc128" is now the name of
the variant with a 128-bit key and "aes-cbc" runs tests of AES-CBC
with all three key sizes.

This makes it easier to run tests on all combinations of ciphers like
AES-GCM or AES-CCM with -z in a single invocation.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33759

(cherry picked from commit 78beb051a2)
2022-04-29 15:53:14 -07:00
John Baldwin
b1c38f0407 cryptocheck: Test Camellia-CBC cipher and RIPEMD-160 HMAC.
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33518

(cherry picked from commit a62478aa05)
2022-04-29 14:10:19 -07:00
John Baldwin
1367dcbfef Only use OLD_LIBS with shared libraries.
Use OLD_FILES for a few symbolic links and static libraries previously
included in OLD_LIBS.

Add a missing shared library major number to an old libroken entry.

(cherry picked from commit 60a8277413)
2022-04-29 13:50:04 -07:00
John Baldwin
b47e48d2f5 Add lib32 entries for WITHOUT_PROFILE.
Reported by:	Mark Millard

(cherry picked from commit 610d908f8a)
2022-04-29 13:50:04 -07:00
John Baldwin
f5c9fb1069 Trim a couple of duplicate entries from WITHOUT_PROFILE.
(cherry picked from commit 07c2b29b6e)
2022-04-29 13:50:04 -07:00
John Baldwin
d53a247f86 Add various profiled libraries missing from the WITHOUT_PROFILE list.
Reported by:	Mark Millard

(cherry picked from commit 99188582cc)
2022-04-29 13:50:04 -07:00
Mark Johnston
3681c4f065 ctf: Import ctf.h from OpenBSD
Use it instead of the existing ctf.h from OpenSolaris.  This makes it
easier to use CTF in the core kernel, and to extend the CTF format to
support wider type IDs.

The imported ctf.h is modified to depend only on _types.h, and also to
provide macros which use the "parent" bit of a type ID to refer to types
in a parent CTF container.

No functional change intended.

Reviewed by:	Domagoj Stolfa, emaste
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 2d5d2a986c)
2022-04-06 20:30:44 -04:00
Gordon Bergling
0954cb209c pkgbase: Fix a typo in a source code comment
- s/begining/beginning/

(cherry picked from commit eec4f5c034)
2022-04-02 15:32:27 +02:00
Hans Petter Selasky
90afe1886f usbtest: Fix issue when multiple devices are sharing same USB vendor and product ID.
When there are multiple devices sharing the same USB vendor and product ID,
the wrong device may be selected. Fix this by also matching the bus and
device address, ugen<X>.<Y> .

Sponsored by:	NVIDIA Networking

(cherry picked from commit 16346e1401)
2022-03-17 10:54:52 +01:00
John Baldwin
b2127b6f1a Install unwind.h into /usr/include
Install headers from LLVM's libunwind in place of the headers from
libcxxrt and allow C applications to use the library.

As part of this, remove include/unwind.h and switch libthr over to
using the installed unwind.h.

Reviewed by:	dim, emaste
MFC after:	10 days
Differential Revision: https://reviews.freebsd.org/D34065

(cherry picked from commit c00d345665)
2022-02-20 13:29:44 +01:00
Ed Maste
8464ad72e0 ssh: update to OpenSSH v8.8p1
OpenSSH v8.8p1 was motivated primarily by a security update and
deprecation of RSA/SHA1 signatures.  It also has a few minor bug fixes.

The security update was already applied to FreeBSD as an independent
change, and the RSA/SHA1 deprecation is excluded from this commit but
will immediately follow.

MFC after:	1 month
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit e9e8876a4d)
(cherry picked from commit 2ffb13149c)
2022-02-10 13:09:57 -05:00
Ed Maste
a613d68fff ssh: enable FIDO/U2F keys
Description of FIDO/U2F support (from OpenSSH 8.2 release notes,
https://www.openssh.com/txt/release-8.2):

  This release adds support for FIDO/U2F hardware authenticators to
  OpenSSH. U2F/FIDO are open standards for inexpensive two-factor
  authentication hardware that are widely used for website
  authentication.  In OpenSSH FIDO devices are supported by new public
  key types "ecdsa-sk" and "ed25519-sk", along with corresponding
  certificate types.

  ssh-keygen(1) may be used to generate a FIDO token-backed key, after
  which they may be used much like any other key type supported by
  OpenSSH, so long as the hardware token is attached when the keys are
  used. FIDO tokens also generally require the user explicitly
  authorise operations by touching or tapping them.

  Generating a FIDO key requires the token be attached, and will
  usually require the user tap the token to confirm the operation:

    $ ssh-keygen -t ecdsa-sk -f ~/.ssh/id_ecdsa_sk
    Generating public/private ecdsa-sk key pair.
    You may need to touch your security key to authorize key generation.
    Enter file in which to save the key (/home/djm/.ssh/id_ecdsa_sk):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/djm/.ssh/id_ecdsa_sk
    Your public key has been saved in /home/djm/.ssh/id_ecdsa_sk.pub

  This will yield a public and private key-pair. The private key file
  should be useless to an attacker who does not have access to the
  physical token. After generation, this key may be used like any
  other supported key in OpenSSH and may be listed in authorized_keys,
  added to ssh-agent(1), etc. The only additional stipulation is that
  the FIDO token that the key belongs to must be attached when the key
  is used.

To enable FIDO/U2F support, this change regenerates ssh_namespace.h,
adds ssh-sk-helper, and sets ENABLE_SK_INTERNAL (unless building
WITHOUT_USB).

devd integration is not included in this change, and is under
investigation for the base system.  In the interim the security/u2f-devd
port can be installed to provide appropriate devd rules.

Reviewed by:	delphij, kevans
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32509

(cherry picked from commit e9a994639b)
2022-02-09 19:03:21 -05:00
Ed Maste
c437ff145c Add libfido2 to the build
From https://github.com/Yubico/libfido2:

    libfido2 provides library functionality and command-line tools to
    communicate with a FIDO device over USB, and to verify attestation
    and assertion signatures.

    libfido2 supports the FIDO U2F (CTAP 1) and FIDO 2.0 (CTAP 2)
    protocols.

libfido2 will be used by ssh to support FIDO/U2F keys. It is currently
intended only for use by ssh, and so is installed as a PRIVATELIB and is
placed in the ssh pkgbase package.

This is currently disabled for the 32-bit library build as libfido2 is
not compatible with the COMPAT_32BIT hack in usb_ioctl.h.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32448

(cherry picked from commit 7b1e19ad78)
(cherry picked from commit 93942379cc)
2022-02-09 16:24:54 -05:00
Ed Maste
e610bb4a85 Add libcbor to the build
From https://github.com/PJK/libcbor:

    libcbor is a C library for parsing and generating CBOR, the general-
    purpose schema-less binary data format.

libcbor will be used by ssh to support FIDO/U2F keys.  It is currently
intended only for use by ssh, and so is installed as a PRIVATELIB and is
placed in the ssh pkgbase package.

cbor_export.h and configuration.h were generated by the upstream CMake
build.  We could create them with bmake rules instead (as NetBSD has
done) but this is a fine start.

This is currently disabled for the 32-bit library build as libfido2 is
not compatible with the COMPAT_32BIT hack in usb_ioctl.h, and there is
no need for libcbor without libfido2.

Reviewed by:	kevans
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32347

(cherry picked from commit 2e85df652c)
2022-02-09 16:24:32 -05:00
Ed Maste
bbe50accc9 Belatedly track private lib renaming for OptionalObsoleteFiles.inc
Reviewed by:	kevans
Fixes:		5551c57355 ("Rework PRIVATELIB")
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32384

(cherry picked from commit 032448cd2c)
2022-02-09 12:39:51 -05:00
Ed Maste
b5ed0dcc83 OptionalObsoleteFiles.inc: remove MK_CXX rule for usr/bin/c++
In fact MK_CXX does not control whether /usr/bin/c++ is built -- it is
installed as a link to Clang (which is always a C/C++ compiler), and it
already exists in OptionalObsoleteFiles under MK_TOOLCHAIN.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit c3f345ae3c)
2022-02-09 12:39:51 -05:00
Ed Maste
77a3ace8fe OptionalObsoleteFiles: move /usr/bin/CC to MK_TOOLCHAIN section
/usr/bin/CC is installed by usr.bin/clang/clang/Makefile, as with
/usr/bin/cc, /usr/bin/cpp, etc., and is not controlled by MK_CXX.
Move it to the same section as those tools.

(It may be that these should all be under
MK_TOOLCHAIN == no || MK_CLANG_IS_CC == no, but that seems like
unnecessary complexity.)

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f7ea22e211)
2022-02-09 12:39:50 -05:00
Ed Maste
1a9aca594a OptionalObsoleteFiles: remove GCC remnants
g++ and cc1plus were GCC components that are already removed
unconditionally in ObsoleteFiles.inc.

Reported by:	jhb (in review D33108)
Fixes:		57f804675e ("remove GCC 4.2.1 build infrastructure")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 1b9344add4)
2022-02-09 12:39:50 -05:00
Ed Maste
e12d36cfab Remove unused GNUCXX option descriptions
Missed from 57f804675e

Reported by:	arhchardson in D27974
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 6955737522)
2022-02-09 12:28:41 -05:00
Ed Maste
0f5c3053ac Drop 'Set to' from most src.conf(5) knobs
The description is clearly what effect the knob has when set, so the
additional text was unnecessary.

Reviewed by:	jhb, se
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29583

(cherry picked from commit 9d178c925f)
2022-02-08 15:50:31 -05:00
Andriy Gapon
eee25e8417 schedgraph.py: port to Python 3
The change does not preserve compatibility with Python 2.7.

(cherry picked from commit 7e8ed296e1)
2022-02-08 18:15:24 +02:00
Mark Johnston
2faefc48c7 tools/build: Fix the error message used when a host tool is not present
(cherry picked from commit ddf312e8d7)
2022-02-01 20:28:12 -05:00
Jessica Clarke
62b958cb94 cross-build: Add comment missing from 9e5b0d9eac
Whilst the commit message documented some of the details, I had intended
to include this comment in the actual header, but failed to amend the
commit properly.

Fixes:		9e5b0d9eac ("cross-build: Fix bmake bootstrap with glibc 2.34")
MFC after:	1 week

(cherry picked from commit aee99ab4fe)
2022-01-24 23:59:44 +00:00
Jessica Clarke
e8a6686252 cross-build: Fix bmake bootstrap with glibc 2.34
As of glibc 2.34, our unistd.h wrapper's inclusion of stdlib.h exposes
fragility in glibc's sys/wait.h and corresponding part of stdlib.h,
leading to "error: use of undeclared identifier 'WNOHANG'" and similar
errors when bootstrapping bmake.

Work around this by wrapping sys/wait.h to force stdlib.h's inclusion
first before it's implicitly included during the problematic window in
sys/wait.h.

MFC after:	1 week

(cherry picked from commit 9e5b0d9eac)
2022-01-24 23:59:42 +00:00
Jessica Clarke
b65517ccd7 cross-build: Add __weak_symbol definition for libdwarf bootstrap
Fixes:		3aa0bc89c6 ("libdwarf: Add a weak uncompress() symbol")
MFC after:	1 week

(cherry picked from commit d752d10e53)
2022-01-24 23:59:40 +00:00
Jessica Clarke
102717f773 cross-build: Provide _PASSWORD_EFMT1 for libcrypt on Linux
Linux's pwd.h does not define _PASSWORD_EFMT1 (macOS's does), so we need
to define it in order to be able to bootstrap libcrypt (crypt-des.c uses
it) on non-FreeBSD, which will be done in a subsequent commit.

MFC after:	1 week

(cherry picked from commit e0cb1fe7dd)
2022-01-24 23:59:24 +00:00
Jessica Clarke
94b6c9bab7 cross-build: Define crypt_data in unistd.h for libcrypt
This is where it's defined in the base system, so is where libcrypt
expects it to exist when being built, and will be needed when being
bootstrapped in a subsequent commit.

MFC after:	1 week

(cherry picked from commit 8ceba27a5d)
2022-01-24 23:59:21 +00:00
Jessica Clarke
6318e220e3 Bootstrap libz when cross-building from non-FreeBSD
This is needed now libdwarf depends on libz.

Fixes:		dbf05458e3 ("libdwarf: Support consumption of compressed ELF sections")
MFC after:	1 week

(cherry picked from commit 8d5d329553)
2022-01-24 23:59:14 +00:00
Jessica Clarke
e06a24658a tools: Also create ${WORLDTMP}/legacy/usr/libdata/pkgonfig
This is needed for the next commit which will make libz a bootstrap
library as needed by ctfconvert. We could just not install the .pc file
as it's not needed, but that requires a per-library hack every time a
bootstrap library gains a .pc file, so this keeps bootstrap-tools
looking as much like a normal build as possible.

MFC after:	1 week

(cherry picked from commit 7ba31d58f0)
2022-01-24 23:59:12 +00:00
Jessica Clarke
cd7a83084e Makefile.boot: Fix copy/paste error in LIBNV's crossbuild override
Only noticed due to needing to change the surrounding lines, so
presumably nothing currently needs this.

MFC after:	1 week

(cherry picked from commit 5022d54e06)
2022-01-24 23:59:05 +00:00
Jessica Clarke
29665d68e2 Makefile.boot: Make -Wno-typedef-redefinition Clang-specific
GCC doesn't have this warning and so also doesn't have the flag to
disable it, resulting in it spewing a bunch of warnings about the
command line option being unrecognised.

MFC after:	1 week

(cherry picked from commit 05066fad68)
2022-01-24 23:59:02 +00:00
Mark Johnston
b1ecdb70c9 depend-cleanup.sh: Make the output message more precise
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 73db11a4d1)
2021-12-13 08:27:31 -05:00
Mark Johnston
18ae2f6f4b depend-cleanup.sh: Handle commit cbdec8db18
That commit changed libc to use the MI pdfork implementation, but with
an incremental build the object file for the pdfork.S stub lingers and
causes a linker error.

Cleaning the depend file is not enouch, so modify clean_deps() to remove
object files as well, and add a call to ensure that pdfork.*o is
cleaned.  The new file is _pdfork.o.

Reported by:	jhb
Reviewed by:	emaste
Fixes:		cbdec8db18 ("libc: Add pdfork to the list of interposed system calls")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 187fe192ce)
2021-12-13 08:27:24 -05:00