Commit Graph

9175 Commits

Author SHA1 Message Date
Ed Maste
deef4b8ce8 readelf: document that -u / --unwind is not yet implemented
ELF tool chain readelf accepts -u / --unwind but just ignores the
option.  This was previously undocumented, which could be confusing for
someone encountering `readelf -u` (in a script or GNU readelf example).

Reported by:	markj (in D32003)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-09-17 10:22:05 -04:00
Ed Maste
f161abf9f2 readelf: include notes (-n) and unwind (-u) in --all/-a
This matches the GNU and LLVM versions of readelf.

As markj noted in the review -u is not actually implemented yet and has
no effect.  The option is accepted and just ignored.

Reported by:	andrew
Reviewed by:	andrew, markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32003
2021-09-17 09:51:59 -04:00
Edward Tomasz Napierala
6f43f86bf3 tzcode: Fix operation without WITH_DETECT_TZ_CHANGES
Reviewed By:	bdrewery, kevans, cy
Reported By:	lwhsu, bdrewery
Fixes:		ddedf2a11e
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31961
2021-09-14 20:17:50 +00:00
Edward Tomasz Napierala
ddedf2a11e tzcode: Implement timezone change detection
Implement optional timezone change detection for local time libc
functions.  This is disabled by default; set WITH_DETECT_TZ_CHANGES
to build it.

Reviewed By:	imp
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
X-NetApp-PR:	#47
Differential Revision:	https://reviews.freebsd.org/D30183
2021-09-12 03:07:58 +00:00
Alan Somers
71a1ae7ceb Import atf 0.22 snapshot 55c21b2c5fb189bbdfccb2b297bfa89236502542
The main improvement is the ability to skip a test that is expected to
fail.
2021-09-10 17:08:42 -06:00
Simon J. Gerraty
3b96abbab0 make: fix MAKE_JOB_ERROR_TOKEN
The rework of GetBooleanVar to GetBooleanExpr requires
we add "${" and ":U}" around the expression so it can be directly
evaluated.

Reported by: mjg
MFC after: 1 week

#
#                                                         72 columns --|
#
# Uncomment and complete these metadata fields, as appropriate:
#
# PR:		<If and which Problem Report is related.>
# Reported by:	<If someone else reported the issue.>
# Reviewed by:	<If someone else reviewed your modification.>
# Approved by:	<If you needed approval for this commit.>
# Obtained from:	<If the change is from a third party.>
# MFC after:	<N [day[s]|week[s]|month[s]].  Request a reminder email>
# MFH:		<Ports tree branch name.  Request approval for merge.>
# Relnotes:	<Set to 'yes' for mention in release notes.>
# Security:	<Vulnerability reference (one per line) or description.>
# Sponsored by:	<If the change was sponsored by an organization.>
# Pull Request:	<https://github.com/freebsd/<repo>/pull/###>
# Differential Revision:	<https://reviews.freebsd.org/D###>
#
# "Pull Request" and "Differential Revision" require the *full* GitHub or
# Phabricator URL.  The commit author should be set appropriately, using
# `git commit --author` if someone besides the committer sent in the change.
#
# Uncomment and complete these metadata fields, as appropriate:
#
# PR:
# Reported by:	<If someone else reported the issue.>
# Reviewed by:	<If someone else reviewed your modification.>
# Approved by:	<If you needed approval for this commit.>
# Obtained from:	<If the change is from a third party.>
# MFC after:	<N [day[s]|week[s]|month[s]].  Request a reminder email>
# MFH:		<Ports tree branch name.  Request approval for merge.>
# Relnotes:	<Set to 'yes' for mention in release notes.>
# Security:	<Vulnerability reference (one per line) or description.>
# Sponsored by:	<If the change was sponsored by an organization.>
# Pull Request:	<https://github.com/freebsd/<repo>/pull/###>
# Differential Revision:	<https://reviews.freebsd.org/D###>
#
# "Pull Request" and "Differential Revision" require the *full* GitHub or
# Phabricator URL.  The commit author should be set appropriately, using
# `git commit --author` if someone besides the committer sent in the change.
#
2021-09-10 13:11:28 -07:00
Dimitry Andric
efe67f33c3 compiler-rt: add aarch64 init function for LSE atomics
As reported by Ronald, adding the out-of-line LSE atomics helpers for
aarch64 to compiler-rt was not sufficient to link programs using these,
as they also require a __aarch64_have_lse_atomics global. This is
initialized in compiler-rt's lib/builtins/cpu_model.c, roughly similar
to the x86 CPU model and feature detection in that file.

Since upstream does not yet have a FreeBSD specific implementation for
getting the required information, add a simple one that should work for
now, while I try to get it sorted with the LLVM people.

Reported by:	Ronald Klop <ronald-lists@klop.ws>
Fixes:		cc55ee8009
PR:		257392
MFC after:	2 weeks
2021-09-06 21:24:01 +02:00
Alfredo Dal'Ava Junior
f21fcae487 llvm: Revert "[HardwareLoops] Change order of SCEV expression construction for InitLoopCount."
Reverts llvm commit 42eaf4fe0adef3344adfd9fbccd49f325cb549ef, pointed
from bisect as source of regression that causes liblzma to compress/
uncompress incorrectly. It's know to affect powerpc64 BE only.

The patch unbreaks FreeBSD powerpc64 installation media, since
bsdinstall can't uncompress the *.txz produced by FreeBSD CI. It's
probably miscompiling other software bas well.

Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=51714

Reviewed by:	dim
MFC after:	2 days
Sponsored by:	Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D31804
2021-09-03 13:31:54 -03:00
Cy Schubert
c1d255d3ff wpa: Import wpa_supplicant/hostapd commits up to b4f7506ff
Merge vendor commits 40c7ff83e7,
efec822389, and
2f6c3ea960.

Tested by:	philip
MFC after:	2 months
2021-09-03 06:08:41 -07:00
Cy Schubert
213ceba977 wpa: Enclose FreeBSD specific defines
FreeBSD only defines are specific only to FreeBSD. Document them as such.
It is our intention to push this change to w1.fi.

MFC after:	1 week
2021-08-30 06:59:18 -07:00
Alfredo Dal'Ava Junior
9a4d48a645 llvm/powerpc64*: fix broken binaries generated by clang12
Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that
was pointed as the source of regression on LLVM12.

This affects powerpc64*, making binaries crash with segmentation fault
due to bad code generation around "__stack_chk_guard"

Root cause and/or proper fix is under investigation by:
    https://bugs.llvm.org/show_bug.cgi?id=51590

Reviewed by:    dim
MFC after:      2 days
Sponsored by:   Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:  https://reviews.freebsd.org/D31698
2021-08-27 11:47:11 -03:00
Martin Matuska
c577bdfce6 libarchive: import bugfix from upstream
Reworked bugfix for upstream issue #1566:
  Do not follow symlinks when processing the fixup list

MFC after:	2 weeks
2021-08-27 12:51:01 +02:00
Martin Matuska
ddce862ad8 libarchive: import changes from upstream
Libarchive 3.5.2

New features:
  PR #1502: Support for PWB and v7 binary cpio formats
  PR #1509: Support of deflate algorithm in symbolic link decompression
            for ZIP archives

Important bugfixes:
  IS #1044: fix extraction of hardlinks to symlinks
  PR #1480: Fix truncation of size values during 7zip archive
            extraction on 32bit architectures
  PR #1504: fix rar header skiming
  PR #1514: ZIP excessive disk read - fix location of central directory
  PR #1520: fix double-free in CAB reader
  PR #1521: Fixed leak of rar before ending with error
  PR #1530: Handle short writes from archive_write_callback
  PR #1532: 7zip: Use compression settings from file also for file header
  IS #1566: do not follow symlinks when processing the fixup list

MFC after:	2 weeks
Relnotes:	yes
2021-08-23 03:07:36 +02:00
Martin Matuska
9aa5476184 Update vendor/libarchive/dist to libarchive/libarchive@1b2c437b9
Libarchive 3.5.2

New features:
  PR #1502: Support for PWB and v7 binary cpio formats
  PR #1509: Support of deflate algorithm in symbolic link decompression
            for ZIP archives

Important bugfixes:
  IS #1044: fix extraction of hardlinks to symlinks
  PR #1480: Fix truncation of size values during 7zip archive
            extraction on 32bit architectures
  PR #1504: fix rar header skiming
  PR #1514: ZIP excessive disk read - fix location of central directory
  PR #1520: fix double-free in CAB reader
  PR #1521: Fixed leak of rar before ending with error
  PR #1530: Handle short writes from archive_write_callback
  PR #1532: 7zip: Use compression settings from file also for file header
  IS #1566: do not follow symlinks when processing the fixup list

Obtained from:		libarchive
Libarchive commit:	1b2c437b99b361c7692538fa373e99955e9b93ae
Libarchive tag:		v3.5.2
2021-08-23 02:24:04 +02:00
Dimitry Andric
efa485d5c3 Apply clang fix for assertion failure compiling multimedia/minitube
Merge commit 79f9cfbc21e0 from llvm git (by Yaxun (Sam) Liu):

  Do not merge LocalInstantiationScope for template specialization

  A lambda in a function template may be recursively instantiated. The recursive
  lambda will cause a lambda function instantiated multiple times, one inside another.
  The inner LocalInstantiationScope should not be marked as MergeWithParentScope
  since it already has references to locals properly substituted, otherwise it causes
  assertion due to the check for duplicate locals in merged LocalInstantiationScope.

  Reviewed by: Richard Smith

  Differential Revision: https://reviews.llvm.org/D98068

Reported by:	yuri
PR:		257978
MFC after:	3 days
2021-08-21 23:03:50 +02:00
Cy Schubert
5469a99530 unbound: Vendor import 1.13.2
Merge commit '625f1c1312fb7defbd148c8ba121a0cf058707ef'

MFC after:	1 month
2021-08-17 02:32:56 -07:00
Cy Schubert
625f1c1312 unbound: Vendor import 1.13.2 2021-08-16 16:57:03 -07:00
Dimitry Andric
c1a540709a Apply upstream lldb fix for unhandled Error causing abort
Merge commit 5033f0793fe6 from llvm git (by Dimitry Andric):

  [lldb] Avoid unhandled Error in TypeSystemMap::GetTypeSystemForLanguage

  When assertions are turned off, the `llvm::Error` value created at the
  start of this function is overwritten using the move-assignment
  operator, but the success value is never checked. Whenever a TypeSystem
  cannot be found or created, this can lead to lldb core dumping with:

      Program aborted due to an unhandled Error:
      Error value was Success. (Note: Success values must still be checked prior to being destroyed).

  Fix this by not creating a `llvm::Error` value in advance, and directly
  returning the result of `llvm::make_error` instead, whenever an error is
  encountered.

  See also: <https://bugs.freebsd.org/253881> and
  <https://bugs.freebsd.org/257829>.

  Reviewed By: teemperor

  Differential Revision: https://reviews.llvm.org/D108088

Reported by:	dmgk, ota@j.email.ne.jp
PR:		253881, 257829
MFC after:	3 days
2021-08-16 18:57:24 +02:00
Stefan Eßer
44d4804d19 usr.bin/ghä-bc, contrib/bc: update to version 5.0.0
Merge commit 2f57ecae4b

This is a new major release with a number of changes and extensions:

- Limited the number of temporary numbers and made the space for them
  static so that allocating more space for them cannot fail.
- Allowed integers with non-zero scale to be used with power, places,
  and shift operators.
- Added greatest common divisor and least common multiple to lib2.bc.
- Made bc and dc UTF-8 capable.
- Added the ability for users to have bc and dc quit on SIGINT.
- Added the ability for users to disable prompt and TTY mode by
  environment variables.
- Added the ability for users to redefine keywords.
- Added dc's modular exponentiation and divmod to bc.
- Added the ability to assign strings to variables and array elements
  and pass them to functions in bc.
- Added dc's asciify command and stream printing to bc.
- Added bitwise and, or, xor, left shift, right shift, reverse,
  left rotate, right rotate, and mod functions to lib2.bc.
- Added the functions s2u(x) and s2un(x,n), to lib2.bc.

MFC after:	1 week
2021-08-13 11:28:06 +02:00
Cy Schubert
ce92f5a91b wpa: Add wpa_cli action file event
Yan Zhong at FreeBSD Foundation is working on a wireless network
configuratior for an experimental FreeBSD installer. The new installer
requires an event to detect when connecting to a network fails due to a
bad password. When this happens a WPA-EVENT-TEMP-DISABLED event is
triggered. This patch passes the event to an action file provided by
the new experimental installer.

Submitted by:	Yang Zhong <yzhong () freebsdfoundation.org>
Reviewed by:	assumed to be reviewed by emaste (and cy)
MFC after:	1 week
2021-08-12 07:13:25 -07:00
Mark Johnston
b2da103239 ncurses: Apply a tputs() fix from patch 20210403
From the (substantially larger) upstream commit:
+ call delay_output_sp to handle BSD-style padding when tputs_sp is
  called, whether directly or internally, to ensure that the SCREEN
  pointer is passed correctly (reports by Henric Jungheim, Juraj
  Lutter).

This fixes bison segfaults observed when colourized output is enabled.
Thanks to jrtc27@ for identifying the upstream fix.

PR:		256731
MFC after:	3 days
2021-08-11 13:08:23 -04:00
Dimitry Andric
d69d07569e Apply upstream lld fix for compressed input sections on BE targets
Merge commit c6ebc651b6fa from llvm git (by Simon Atanasyan):

  [LLD] Support compressed input sections on big-endian targets

  This patch enables compressed input sections on big-endian targets by
  checking the target endianness and selecting an appropriate `Chdr`
  structure.

  Fixes PR51369

  Differential Revision: https://reviews.llvm.org/D107635

Reported by:	emaste
MFC after:	3 days
2021-08-07 13:14:11 +02:00
Alex Richardson
31ba4ce889 Allow bootstrapping llvm-tblgen on macOS and Linux
This is needed in order to build various LLVM binutils (e.g. addr2line)
as well as clang/lld/lldb.

Co-authored-by: Jessica Clarke <jrtc27@FreeBSD.org>
Test Plan:	Compiles on ubuntu 18.04 and macOS 11.4
Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D31057
2021-08-02 14:36:03 +01:00
Warner Losh
fd2a4a31d9 awk: document updating
Fill in all the details to the standard process so they are hand in one
place and don't need to be re-remembered or rediscovered for the next
import.

Sponsored by:		Netflix
2021-08-01 11:31:50 -06:00
Warner Losh
23f24377b1 awk: Merge 20210729 from One True Awk upstream (0592de4a)
July 27, 2021:
	As per IEEE Std 1003.1-2008, -F "str" is now consistent with
	-v FS="str" when str is null. Thanks to Warner Losh.

July 24, 2021:
	Fix readrec's definition of a record. This fixes an issue
	with NetBSD's RS regular expression support that can cause
	an infinite read loop. Thanks to Miguel Pineiro Jr.

	Fix regular expression RS ^-anchoring. RS ^-anchoring needs to
	know if it is reading the first record of a file. This change
	restores a missing line that was overlooked when porting NetBSD's
	RS regex functionality. Thanks to Miguel Pineiro Jr.

	Fix size computation in replace_repeat() for special case
	REPEAT_WITH_Q. Thanks to Todd C. Miller.

Also, included the tests from upstream, though they aren't yet connected
to the tree.

Sponsored by:		Netflix
2021-08-01 10:22:39 -06:00
Warner Losh
4e52f5db35 awk: Flag -Ft as deprecated behavior
Upstream is poised to deprecate the -Ft wart in one true awk. None of
the other awks do this, and the gawk maintainer says that he's had no
requests for it in gawk in 30 years maintaining it. github can find a
few instances of it in the wild. As such, warn that it's deprecated and
will go away in the future.

MFC After:		3 days
Sponsored by:		Netflix
2021-07-30 23:33:37 -06:00
Jilles Tjoelker
0c47338023 libc/tests: Correctly compare si_status from wait6()
Fix erroneous = that was meant to be ==.

Revision 1.10 from NetBSD t_wait.c

Obtained from:	NetBSD
2021-07-25 22:19:18 +02:00
Warner Losh
a2e3e11873 awk: Make -F '' and -v FS="" behave the same
IEEE Std 1003.1-2008 mandates that -F str be treated the same as -v
FS=str. For a null string, this was not the case. Since awk(1) documents
that a null string for FS has a specific behavior, make -F '' behave
consistently with -v FS="".

PR:			241441
Upstream issue:		https://github.com/onetrueawk/awk/issues/127
Upstream pull request:	https://github.com/onetrueawk/awk/pull/128
MFC After:		2 weeks
Sponsored by:		Netflix
2021-07-24 09:08:16 -06:00
Warner Losh
5ab82b00cc awk: Remove last markings we have on awk
We normally don't add $FreeBSD$ to contrib software. However, these
changes date back to the CVS era of source code management and have been
overlooked. Now that all these files are back to the same as the
upstream bsd-features branch, remove the FreeBSD specific changes, which
are now just $FreeBSD$ and the (FreeBSD) in the version string.

MFC After:		2 weeks
Sponsored by:		Netflix
2021-07-21 20:24:57 -06:00
Warner Losh
628bd30ab5 awk: revert to upstream behavior for ranges for gawk compatibility
In 2005, FreeBSD changed one-true-awk to honor the locale's collating
order. This was billed as a temporary patch. It was also compatible with
the then-current behavior of gawk. That temporary patch has lasted 16
years now.

However, IEEE Std 1003.1-2008 changed the behaivor of ranges in regular
expressions outside of the "C" and "POSIX" locales to be undefined.

Starting in 2011, gawk 4.0 stopped using the locale for the range
regular expressions and used the traditional behavior only. The
maintainer had grown weary of answering why '[A-Z]' would sometimes
match lower-case expressions. The details about are explained here:
https://www.gnu.org/software/gawk/manual/html_node/Ranges-and-Locales.html

To restore compatibility with other implementaitons of awk, revert this
patch. FreeBSD is the odd-system out. It also has the nice side effect
of eliminating the last of our differences with upstream one-true-awk.

Reviewed by:		cy, rgrimes
MFC After:		2 weeks
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D31114
2021-07-21 20:22:43 -06:00
Warner Losh
2929813c4f Revert "awk: Issue a warning for old hex behavior."
This reverts commit acf9cf323f. It warns
about too many false positive cases.

Sponsored by:		Netflix
2021-07-21 20:17:50 -06:00
Warner Losh
acf9cf323f awk: Issue a warning for old hex behavior.
Since FreeBSD has allowed "0x" hex strings to be converted to integers
for a long time, and since upstream has killed that behavior, warn about
this issue. This will allow us to deprecate this behavior for 14.0 while
giving our users of 12.x and 13.x fair warning.

Sponsored by:		Netflix
2021-07-21 20:03:35 -06:00
Warner Losh
0c92d88c91 awk: remove proctab.c
proctab.c is a generated file and never should have been committed to
the tree. This file has been added and removed a couple of times, most
recently added by me in my 2019 updates.

Sponsored by:		Netflix
2021-07-19 22:34:37 -06:00
Alex Richardson
8ef98a8045 Allow building usr.bin/vi with MK_ASAN
We have to namespace the regex functions to avoid duplicate symbol errors.
This also ensures that vi doesn't define the libc reg* functions with
mismatched signatures.

ld: error: duplicate symbol: regcomp
>>> defined at sanitizer_common_interceptors.inc:7519 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7519)
>>>            asan_interceptors.o:(__interceptor_regcomp) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a
>>> defined at regcomp.c
>>>            .../regex/regcomp.c.o:(.text+0x0)

ld: error: duplicate symbol: regerror
>>> defined at sanitizer_common_interceptors.inc:7543 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7543)
>>>            asan_interceptors.o:(__interceptor_regerror) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a
>>> defined at regerror.c
>>>            .../regex/regerror.c.o:(.text+0x0)

ld: error: duplicate symbol: regexec
>>> defined at sanitizer_common_interceptors.inc:7530 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7530)
>>>            asan_interceptors.o:(__interceptor_regexec) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a
>>> defined at regexec.c
>>>            .../regex/regexec.c.o:(.text+0x0)

ld: error: duplicate symbol: regfree
>>> defined at sanitizer_common_interceptors.inc:7553 (/usr/src/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:7553)
>>>            asan_interceptors.o:(__interceptor_regfree) in archive /usr/lib/clang/10.0.1/lib/freebsd/libclang_rt.asan-x86_64.a
>>> defined at regfree.c
>>>            .../regex/regfree.c.o:(.text+0x0)

Committed upstream as https://github.com/lichray/nvi2/pull/92

Reviewed By:	bapt
Differential Revision: https://reviews.freebsd.org/D31050
2021-07-19 15:04:19 +01:00
Xin LI
30a1828c51 less: upgrade to v590.
MFC after:	2 weeks
2021-07-17 22:20:44 -07:00
Dimitry Andric
4652422eb4 Merge llvm-project 12.0.1 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release.

PR:		255570
MFC after:	6 weeks
2021-07-16 18:29:42 +02:00
Warner Losh
d4d252c499 awk: revert upstream's attempt to disallow hex strings
Upstream one-true-awk decided to disallow hex strings as numbers. This
is in line with awk's behavior prior to C99, and allowed by the POSIX
standard. The standard, however, allows them to be treated as numbers
because that's what the standard said in the 2001 through 2004 editions.
Since 2001, the nawk in FreeBSD has treated them as numbers, so restore
that behavior, allowed by the standard.

A number of scripts in the FreeBSD tree depend on this interpretation,
including scripts to build the kernel which had mysteriously started
failing for some people and not others. By re-allowing 0x hex numbers,
this fixes those scripts and restores POLA.

Upstream issue:		https://github.com/onetrueawk/awk/issues/126
Sponsored by:		Netflix
Reviewed by:		kevans
MFC After:		asap due to regression alrady merged to stable
Differential Revision:	https://reviews.freebsd.org/D31199
2021-07-15 17:08:03 -06:00
Luiz Otavio O Souza
3f240bdf36 tcpdump: decode packets on pfsync interfaces
Reviewed by:	kp, scottl
Obtained from:	pfsense
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31153
2021-07-13 13:29:52 +02:00
Warner Losh
f68a53dba9 awk: Reduce diffs with upstream to almost nothing.
In the merge of 20210215, I left two merge conflicts #if 0'd by mistake
to check later rather than resolve them as part of the merge.  This code
turns out to be from the original one-true-awk import and not FreeBSD
specific, so remove them.

Remove a extra definition of HAT.

Remove a stylistic change that also appears to be a mismerge along the
way.

Remove FREEBSD-upgrade. Nobody has updated it since the original 2007
cvs import. It talks about old CVS branches that never made it into svn,
let alone git. New imports will follow the standard practices now, so
there's nothing left to document.

Move README to README.md and copy the README.md from upstream over.

This leaves just the $FreeBSD$ lines (which remain for the stable/12
merge) and the strcoll part of ru@'s r201989/d98dd8e5f94c as the only
diffs with upstream. FreeBSD also still has its own man page, which I
don't plan on changing. Once this commit is merged to stable/12, I plan
no further merges to stable/12. Sometime after that I'll remove the
$FreeBSD$ lines to reduce the diffs even more (though i want to make
sure plans won't change first). I also plan to talk to upstream about
this change...

MFC After:		2 weeks
Sponsored by:		Netflix
2021-07-08 23:05:13 -06:00
Warner Losh
f39dd6a978 one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Import the latest bsd-features branch of the one-true-awk upstream:

o Move to bison for $YACC
o Set close-on-exec flag for file and pipe redirects that aren't std*
o lots of little fixes to modernize ocde base
o free sval member before setting it
o fix a bug where a{0,3} could match aaaa
o pull in systime and strftime from NetBSD awk
o pull in fixes from {Net,Free,Open}BSD (normalized our code with them)
o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly a nop)

Also revert a few of the trivial FreeBSD changes that were done slightly
differently in the upstreaming process. Also, our PR database may have
been mined by upstream for these fixes, and Mikolaj Golub may deserve
credit for some of the fixes in this update.

Suggested by:		Mikolaj Golub <to.my.trociny@gmail.com>
PR:			143363,143365,143368,143369,143373,143375,214782
Sponsored by:		Netflix
2021-07-07 19:25:43 -06:00
Alex Richardson
31914882fc Import Arm Optimized Routines v21.02
This is the new replacement for the existing cortex-strings code which will
be replaced in a follow-up commit.
We should also be able to use some of the math functions to allow the
tests to pass on AArch64 (and other architectures) instead of just x86.
We might also be able to reuse some of the tests for the kyua testsuite.

Imported using
```
curl -L e823e3abf5 | tar --strip-components=1 -xvzf -
git add .
```

Differential Revision: https://reviews.freebsd.org/D29035
git-subtree-dir: contrib/arm-optimized-routines
git-subtree-mainline: e34c713b0e
git-subtree-split: f9f37c002a
2021-07-06 11:05:34 +01:00
Dimitry Andric
5866c369e4 Revert libunwind change to fix backtrace segfault on aarch64
Revert commit 22b615a96593 from llvm git (by Daniel Kiss):

  [libunwind] Support for leaf function unwinding.

  Unwinding leaf function is useful in cases when the backtrace finds a
  leaf function for example when it caused a signal.
  This patch also add the support for the DW_CFA_undefined because it marks
  the end of the frames.

  Ryan Prichard provided code for the tests.

  Reviewed By: #libunwind, mstorsjo

  Differential Revision: https://reviews.llvm.org/D83573

  Reland with limit the test to the x86_64-linux target.

Bisection has shown that this particular upstream commit causes programs
using backtrace(3) on aarch64 to segfault. This affects the lang/rust
port, for instance. Until we can upstream to fix this problem, revert
the commit for now.

Reported by:	mikael
PR:		256864
2021-07-03 00:35:49 +02:00
Kristof Provost
8923ea6c86 ftp-proxy: Revert incorrect migration to libpfctl
libpfctl supports creating rules, but not (yet) adding addresses to a
pool. Adding addresses certainly does not work through adding a rule.

PR:		256917
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-07-01 21:34:40 +02:00
Ed Maste
b762974cf4 clang: stop linking _p libs for -pg as of FreeBSD 14
In FreeBSD 14 we will stop providing _p libraries (compiled with -pg).

Reviewed by:	dim (upstream)
Obtained from:	LLVM 699d47472c3f
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30861
2021-06-27 13:12:12 -04:00
Simon J. Gerraty
68c4481aac Update to bmake-20210621
MFC after:	1 week
2021-06-25 16:02:40 -07:00
Simon J. Gerraty
b0c40a00a6 Merge commit 'ee914ef902ae018bd4f67192832120f9bf05651f' into new_merge 2021-06-25 14:31:14 -07:00
Dimitry Andric
014a40f8f6 Disable llvm generating 128-bit multiply libcalls on 32-bit ARM
Merge commit 789708617d20 from llvm git (Koutheir Attouchi):

  Do not generate calls to the 128-bit function __multi3() on 32-bit ARM

  Re-applying this patch after bots failures. Should be fine now.

  The function __multi3() is undefined on 32-bit ARM, so a call to it should
  never be emitted. Instead, plain instructions need to be generated to
  perform 128-bit multiplications.

  Differential Revision: https://reviews.llvm.org/D103906

Reported by:	mmel
MFC after:	3 days
2021-06-22 22:26:13 +02:00
Warner Losh
15fccd86b9 Merge tag 'vendor/NetBSD/vis/20210621' into vis
Bring in NetBSD's vis as of 2021-06-21

Man page fixes, -M, -N and -S support for shell meta characters (all or some)
and no locale.

Discussed with:		emaste@
Differential Revision:	https://reviews.freebsd.org/D25358
2021-06-21 18:04:17 -06:00
Dimitry Andric
e7e517981a Fix clang assertion while building recent www/chromium
Merge commit c8227f06b335 from llvm git (by Arthur Eubanks):

  [clang] Don't assert in EmitAggregateCopy on trivial_abi types

  Fixes PR42961.

  Reviewed By: rnk

  Differential Revision: https://reviews.llvm.org/D97872

PR:		256721, 255570
Reported by:	jbeich
MFC after:	3 days
2021-06-21 20:48:37 +02:00
Edward Tomasz Napierala
224c772ca5 telnet(1): add quiet mode ("telnet -Q")
Reviewed By:	imp, phk
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
X-NetApp-PR:	#54
Differential Revision:	https://reviews.freebsd.org/D30819
2021-06-21 17:11:57 +01:00