Commit graph

9503 commits

Author SHA1 Message Date
Dimitry Andric 0c85e2760f Merge llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-16003-gfc5f51cf5af4.

PR:		276104
MFC after:	1 month

(cherry picked from commit 647cbc5de8)
2024-04-19 23:24:24 +02:00
Dimitry Andric 92d4d6f1f6 Revert commit 0e46b49de433 from llvm-project (by Matt Arsenault):
Reapply "RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG"

  This reverts commit c398fa009a47eb24f88383d5e911e59e70f8db86.

  PPC backend was fixed in 2f82662ce901c6666fceb9c6c5e0de216a1c9667

Since it causes an assertion failure building /sys/dev/fb/vga.c:
https://github.com/llvm/llvm-project/issues/76416

PR:		276104
MFC after:	1 month

(cherry picked from commit edc2dc17b1)
2024-04-19 23:23:59 +02:00
Dimitry Andric a205596100 Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month

(cherry picked from commit cb14a3fe51)
2024-04-19 23:23:58 +02:00
Dimitry Andric b168c9a3e5 Tentatively apply https://github.com/llvm/llvm-project/pull/76175
This fixes libsa including compiler-rt builtins.

PR:		276104
MFC after:	1 month

(cherry picked from commit 3d68ee6cbd)
2024-04-19 23:23:57 +02:00
Dimitry Andric bdbe302c33 Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month

(cherry picked from commit 5f757f3ff9)
2024-04-19 23:23:40 +02:00
Kristof Provost 02ea70eff3 tcpdump: fix build
Apply the change that was supposed to be in bf0700716a
2024-04-18 17:55:34 +02:00
Kristof Provost bf0700716a tcpdump: cope with incorrect packet lengths
It's possible for the capture buffer to be smaller than indicated by the
header length. However, pfsync_print() only took the header length into
account. As a result we could read outside of the buffer.

Check that we have at least the expected amount of data before we start
parsing.

PR:		278034
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D44580

(cherry picked from commit 4848eb3af2)
2024-04-18 09:41:28 +02:00
Dimitry Andric 17e32453b8 Merge commit eb8f379567e8 from llvm-project (by Florian Hahn):
[DSE] Remove malloc from EarliestEscapeInfo before removing. (#84157)

  Not removing the malloc from earliest escape info leaves stale entries
  in the cache.

  Fixes https://github.com/llvm/llvm-project/issues/84051.

  PR: https://github.com/llvm/llvm-project/pull/84157

This fixes a crash in clang (usually a bus error, but can also be
another memory error) when compiling the science/siconos port.

PR:		278174
Reported by:	yuri
MFC after:	3 days

(cherry picked from commit aaabed1dea)
2024-04-08 09:42:20 +02:00
Xin LI 728293e74c Backport export of lzma_mt_block_size symbol.
This restores binary compatibility against liblzma 5.6.0 library.

PR:		278127

(cherry picked from commit 5ffb19ac36)
2024-04-07 21:06:13 -07:00
Xin LI 6b55e41b3f Revert "MFV: xz 5.6.0"
This commit reverts 8db56defa7,
rolling back the vendor import of xz 5.6.0 and restoring the
package to version 5.4.5.

The revert was not directly due to the attack (CVE-2024-3094):
our import process have removed the test cases and build scripts
that would have enabled the attack. However, reverting would
help to reduce potential confusion and false positives from
security scanners that assess risk based solely on version
numbers.

Another commit will follow to restore binary compatibility with
the liblzma 5.6.0 library by making the previously private
symbol (lzma_mt_block_size) public.

PR:		278127

(cherry picked from commit 2f9cd13d6c)
2024-04-07 21:06:12 -07:00
Ed Maste a2ce5a2dc9 tar: make error reporting more robust and use correct errno
Apply upstream pull request 2101.

(cherry picked from commit d68c68693e)
(cherry picked from commit bade279b81)
2024-04-07 12:58:50 -04:00
Dag-Erling Smørgrav 16349f296b Update tzcode to 2024a.
MFC after:	3 weeks
Sponsored by:	Klara, Inc.

(cherry picked from commit 46c599340f)
2024-04-04 11:47:10 +02:00
Cy Schubert 0fb7c4a38c hostapd: Work around lack of MLME support
hostap MLME uses Linux data structures and definitions not available
in FreeBSD. The ability for hostapd to select the frequency (channel)
depends Linux MLME, though strictly it's not required. Work around the
Linux MLME requirement to configure device frequency.

The detailed description is: hostapd will only set the channel (frequency)
when Linux MLME is configured. Enabling NEED_AP_MLME will result in
numerous build errors due do Linux data structures and definitions not
available under FreeBSD. The code to set the frequency from the selected
channel is only within the NEED_AP_MLME code path because without MLME,
hostapd_get_hw_features() is an inline that always returns -1 whereas with
MLME hostapd_get_hw_features() will obtain hardware features from the
kernel. Until such time we simply set the frequency as configured.

PR:		276375

(cherry picked from commit 84ed86380a)
2024-04-02 17:29:13 -07:00
Cy Schubert e59ac68e25 unbound: Vendor import 1.19.3
Release notes at
	https://www.nlnetlabs.nl/news/2024/Mar/14/unbound-1.19.3-released/

Merge commit '5a33598e88ad8fbc0affa74dee0a2d8cc4010fbc' into main

(cherry picked from commit b7c0c8c18e)
2024-03-23 19:22:47 -07:00
Dimitry Andric 07839ae99c Merge commit bbb8a0df7367 from llvm-project (by Shafik Yaghmour):
[Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision

  ResolveConstructorOverload needs to check properly if we are going to use copy
  elision we can't use a conversion function.

  This fixes:

  https://github.com/llvm/llvm-project/issues/39319
  https://github.com/llvm/llvm-project/issues/60182
  https://github.com/llvm/llvm-project/issues/62157
  https://github.com/llvm/llvm-project/issues/64885
  https://github.com/llvm/llvm-project/issues/65568

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

This should fix 'Assertion failed: (isa<To>(Val) && "cast<Ty>() argument
of incompatible type!")' errors when building devel/boost-libs,
specifically libs/url/src/segments_view.cpp.

Bump __FreeBSD_version so this fix can easily be detected from
devel/boost-all/compiled.mk.

PR:		273335
(cherry picked from commit bcd401b5a3)
2024-03-23 13:02:23 +01:00
Gordon Bergling 550eedaee1 OpenBSM: Remove $FreeSBD$ tags from the configuration files
In e61dc6cac4 the configuration
files were taken off the vendor branch to help mergemaster
comparing them.

Since mergemaster will be deprecated and $FreeBSD$ tags aren't
used anymore, remove them.

While here, sync audit_filter with upstream commit 5e6da76 (typo).

Reviewed by:	imp
Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D44318

(cherry picked from commit 6a6ec90681)
2024-03-21 06:51:52 +01:00
Cy Schubert 6b073e0ec6 sqlite3: Vendor import of sqlite3 3.45.1
Release notes at https://www.sqlite.org/releaselog/3_45_1.html.

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450100.tar.gz

Merge commit '1e59a00476c9801952e7319719fcdb095a0cd007' into main

(cherry picked from commit 937a005585)
2024-03-19 09:13:15 -07:00
Xin LI b810e56eff MFC: MFV: xz 5.6.0.
(cherry picked from commit 8db56defa7)
2024-03-09 19:58:18 -08:00
Dimitry Andric 961271f952 Merge commit f800c1f3b207 from llvm-project (by Arthur Eubanks):
[PEI] Don't zero out noreg operands

  A tail call may have $noreg operands.

  Fixes a crash.

  Reviewed By: xgupta

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

This should fix an assertion failure building qemu, specifically those
parts using -fzero-call-used-regs.

Reported by:	Daniel Berrangé <dan-freebsd@berrange.com>
PR:		277474
MFC after:	3 days

(cherry picked from commit a39b3aa463)
2024-03-08 09:19:10 +01:00
Dag-Erling Smørgrav beb958dca0 tzcode: Fix overflow handling in TZ parser.
Obtained from:	upstream 9fc11a27
MFC after:	1 week
PR:		276281
Approved by:	re (cperciva)

(cherry picked from commit 1365bb722a)
2024-02-21 21:59:26 +01:00
Xin LI 60cfaec917 MFC: MFV: expat 2.6.0.
(cherry picked from commit 4543ef5166)
2024-02-20 22:57:35 -08:00
Bartosz Sobczak a4510dafa8
irdma(4): Upgrade to 1.2.36-k
Update Intel irdma driver to version 1.2.36-k.

Notable changes:

- Start using ib_sge directly instead of irdma_sge
- Turn off flush completion generator for libirdma
- Minor formatting changes

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	erj@
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D43567

(cherry picked from commit 5b5f7d0e77)
2024-02-20 22:00:00 -08:00
Bjoern A. Zeeb 97186b5cf5 wpa: ctrl_iface set sendbuf size
In order to avoid running into the default net.local.dgram.maxdgram
of 2K currently when calling sendto(2) try to set the sndbuf size to
the maximum ctrl message size.
While on 14 and 15 this does not actually raise the limit anymore (and
be7c095ac9 raised it for syslogd and this),
FreeBSD 13 still requires this change and it will work as expected there.
In addition we always ensure a large enough send buffer this way
independent of kernel defaults.
The problem occured, e.g., when the scan_list result had enough BSSIDs
so the text output would exceed 2048 bytes.

Sponsored by:	The FreeBSD Foundation
PR:		274990
Reviewed by:	cy, adrian (with previous comment)
Differential Revision: https://reviews.freebsd.org/D42558

(cherry picked from commit 1edc20b769)
2024-02-19 08:01:59 +00:00
Cy Schubert abe4ced2b9 unbound: Vendor import 1.19.1
Release notes at
    https://www.nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/

Security:	CVE-2023-50387, CVE-2023-50868
MFC after:	3 days

(cherry picked from commit b76ef9a7cb)
2024-02-17 05:47:29 -08:00
Dimitry Andric 42ceb92e6a lld: work around elftoolchain bug which causes bloated RISCV binaries
The elftoolchain strip(1) command appears to have trouble with the new
.riscv.attributes sections being added by lld 17 to RISCV binaries. This
causes huge 'holes' in the files, making them larger than necessary.

Since nothing in the base system uses the new section yet, patch lld to
leave it out for now.

Direct commit to stable/13, since this intended to go into the 13.3
release, while the elftoolchain bug is being investigated.

Reported by:	karels
Submitted by:	jrtc27
Approved by:	re (cperciva)
2024-02-14 20:42:21 +01:00
Dimitry Andric 2292dffacf Merge commit f577bfb99528 from llvm-project (by Alexander Potapenko):
[sanitizer][msan] fix AArch64 vararg support for KMSAN (#70660)

  Cast StackSaveAreaPtr, GrRegSaveAreaPtr, VrRegSaveAreaPtr to pointers to
  fix assertions in getShadowOriginPtrKernel().

  Fixes: https://github.com/llvm/llvm-project/issues/69738

  Patch by Mark Johnston.

Requested by:	markj
MFC after:	3 days

(cherry picked from commit cf67576852)
2024-02-13 18:51:47 +01:00
Dimitry Andric 134580c103 Merge libcxxrt master 03c83f5a57be8c5b1a29a68de5638744f17d28ba
Interesting fixes (* were already cherry-picked):
- 03c83f5 add __cxa_init_primary_exception (#23)
* 5d8a158 Fix two bugs in __cxa_end_cleanup()
* b00c6c5 Insert padding in __cxa_dependent_exception
* 45ca8b1 Insert padding in __cxa_exception struct for compatibility
* f2e5509 Fix unlock in two-word version and add missing comment.
- 6229590 Add an option for disabling emergency buffers. (#14)

MFC after:	2 weeks

(cherry picked from commit ecf4106237)
2024-02-08 20:27:44 +01:00
Dimitry Andric d5d6b3938d Merge commit 4a39d0890894 from llvm-project (by Mark Johnston):
[libc++] Fix filesystem::remove_all() on FreeBSD (#79540)

  remove_all_impl() opens the target path with O_NOFOLLOW, which fails if
  the target is a symbolic link. On FreeBSD, rather than returning ELOOP,
  openat() returns EMLINK. This is unlikely to change for compatibility
  reasons, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214633 .

  Thus, check for EMLINK as well.

Reported by:	markj
PR:		276632
MFC after:	3 days

(cherry picked from commit ee14a9725d)
2024-02-08 20:27:38 +01:00
Gregory Neil Shapiro a64caf2cb2 Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
Merge vendor sendmail 8.18.1 into HEAD

(cherry picked from commit d39bd2c138)

Add new source file for sendmail 8.18.1

(cherry picked from commit 19d4fb85bf)

New sendmail 8.18.1 cf file

(cherry picked from commit 1b6a5580c1)

Minor change to update these files so new freebsd*.cf files are
generated

(cherry picked from commit 2c191ba6b0)

Belatedly update version and date for sendmail 8.18.1 upgrade

(cherry picked from commit 31fbc98c94)

Add a note about sendmail 8.18.1's stricter SMTP protocol enforcement
(akin to commit 21c1f1deb6 in main)

Update import date for stable/14

Relnotes:	Yes
Security:	CVE-2023-51765
2024-02-07 02:47:40 +00:00
Cy Schubert 84d4438252 sqlite3: Vendor import of sqlite3 3.45.0
Release notes at https://www.sqlite.org/releaselog/3_45_0.html

Obtained from:  https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz

Merge commit 'cdad538768db9e2c8258d19e9282fb5aaae80e46'

(cherry picked from commit c19fb1f963)
2024-02-04 16:37:14 -08:00
Philip Paeps f4256acec1 contrib/tzdata: import tzdata 2024a
Changes: https://github.com/eggert/tz/blob/2024a/NEWS

(cherry picked from commit 2723c7ffb7)
2024-02-05 08:30:26 +08:00
Dimitry Andric 3bd3724e4c Merge commit 16a1ef86cbc5 from llvm-project (by David CARLIER):
[compiler-rt] remove hexdump interception. (#79378)

  a freebsd dev member reported a symbol conflict and intercepting this
  had little value anyway.

This is one part of fixing the WITH_ASAN build. Some executables in the
base system define their own hexdump() symbol, which would otherwise
conflict with the ASan-intercepted one.

Reported by:	markj
PR:		276597
MFC after:	3 days

(cherry picked from commit 31aedef26f)
2024-01-30 18:53:39 +01:00
Stefan Eßer c1e3f1fd11 vendor/bc: MFC upgrade from version 6,6.0 to 6.7.5
This is a squashed updated consisting of:

vendor/bc: upgrade to version 6.7.2

This update improves the implementation of the power function p() and
adds 3 new functions to the extended math library: min(), max(), and
i2rand().

(cherry picked from commit aa339f1d5d)

vendor/bc: upgrade to version 6.7.4

Documentation updates only, no functional changes to the software.

(cherry picked from commit e6857bd4d7)

vendor/bc: upgrade to version 6.7.5

This update fixes a bug where line breaks in printed numbers may not
match the line length set by the user. The value is printed correctly,
just not split as specified in some situations.

(cherry picked from commit f4fbc49d20)
2024-01-18 18:39:29 +01:00
Mateusz Guzik 7a658756b2 llvm: Support: don't block signals around close if it can be avoided
Signal blocking originally showed up in 51c2afc4b65b2782 ("Support:
Don't call close again if we get EINTR"), but it was overzealous --
there are systems where the error is known to be fine.

This commit elides signal blocking for said systems (the list is
incomplete though).

Note close() can still fail for other reasons (like ENOSPC), in which
case an error will be returned while the fd slot is cleared up.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D42984

(cherry picked from commit 3358108a38)
2024-01-08 00:04:43 +01:00
Dimitry Andric af05e5589d Merge commit 158f4f30adb4 from llvm git (by Corentin Jabot):
[Clang] Do not change the type of captured vars when checking lambda constraints

  When checking the constraint of a lambda, we need to respect the constness
  of the call operator when establishing the type of capture variables.

  In D124351, this was done by adding const to the captured variable...
  However, that would change the type of the variable outside of the scope
  of the lambda, which is clearly not the desired outcome.

  Instead, to ensure const-correctness, we need to populate
  a LambdaScopeInfo with the capture variables before checking the
  constraints of a generic lambda.

  There is no changelog as I'd like to tentatively propose we backport
  this change to RC3 as it is a regression introduced in the Clang 17
  cycle.

  Fixes #61267

  Reviewed By: aaron.ballman, #clang-language-wg

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

Merge commit 3ed9e9e3ace6 from llvm git (by Corentin Jabot):

  [Clang] Add captures to the instantiation scope of lambda call operators

  Like concepts checking, a trailing return type of a lambda
  in a dependent context may refer to captures in which case
  they may need to be rebuilt, so the map of local decl
  should include captures.

  This patch reveal a pre-existing issue.
  `this` is always recomputed by TreeTransform.

  `*this` (like all captures) only become `const`
  after the parameter list.

  However, if try to recompute the value of `this` (in a parameter)
  during template instantiation while determining the type of the call operator,
  we will determine  it to be const (unless the lambda is mutable).

  There is no good way to know at that point that we are in a parameter
  or not, the easiest/best solution is to transform the type of this.

  Note that doing so break a handful of HLSL tests.
  So this is a prototype at this point.

  Fixes #65067
  Fixes #63675

  Reviewed By: erichkeane

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

This fixes 'Assertion failed: (isa<LabelDecl>(D) && "declaration not
instantiated in this scope"), function findInstantiationOf' error when
building databases/mongodb44.

PR:		273753
MFC after:	1 month

(cherry picked from commit feb5b0c76f)
2024-01-08 00:04:41 +01:00
Dimitry Andric ef2ab9afdc Merge llvm-project release/17.x llvmorg-17.0.6-0-g6009708b4367
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.6-0-g6009708b4367.

PR:		273753
MFC after:	1 month

(cherry picked from commit 5c16e71d30)
2024-01-08 00:04:41 +01:00
Dimitry Andric cf22cca352 Merge llvm-project release/17.x llvmorg-17.0.5-0-g98bfdac5ce82
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.5-0-g98bfdac5ce82.

PR:		273753
MFC after:	1 month

(cherry picked from commit b121cb0095)
2024-01-08 00:04:40 +01:00
Dimitry Andric 22dc259bb4 Merge llvm-project release/17.x llvmorg-17.0.3-0-g888437e1b600
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.3-0-g888437e1b600.

PR:		273753
MFC after:	1 month

(cherry picked from commit bdb86d1a85)
2024-01-08 00:04:40 +01:00
Dimitry Andric 27485d5542 Merge llvm-project release/17.x llvmorg-17.0.2-0-gb2417f51dbbd
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.2-0-gb2417f51dbbd.

PR:		273753
MFC after:	1 month

(cherry picked from commit 3bd749dbd9)
2024-01-08 00:04:40 +01:00
Dimitry Andric 80a1bcb529 Merge llvm-project release/17.x llvmorg-17.0.1-25-g098e653a5bed
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.1-25-g098e653a5bed.

PR:		273753
MFC after:	1 month

(cherry picked from commit 4542f901cb)
2024-01-08 00:04:39 +01:00
Dimitry Andric bbb0bdafca Merge llvm-project release/17.x llvmorg-17.0.0-rc4-10-g0176e8729ea4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-17.0.0-rc4-10-g0176e8729ea4.

PR:		273753
MFC after:	1 month

(cherry picked from commit 8a4dda33d6)
2024-01-08 00:04:39 +01:00
Dimitry Andric 0e1e0ce556 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR:		273753
MFC after:	1 month

(cherry picked from commit 06c3fb2749)
2024-01-08 00:04:38 +01:00
John Baldwin c3eb0b7c19 Merge commit 3537338d1ab9 from llvm git (by Nikolas Klauser):
[libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++

    These are changes to allow GCC 13 to successfully compile the runtimes stack.

    Reviewed By: ldionne, #libc, #libunwind, MaskRay

    Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits

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

Reviewed by:	imp, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D42578

(cherry picked from commit ab43851b0c)
2024-01-08 00:04:34 +01:00
Mike Karels a2e0c77f94 arm64 lib32: change clang to allow -m32 on arm64
The FreeBSD driver support for clang tested explicitly for 32-bit
Intel, MIPS, or PowerPC targets where /usr/lib32/libcrt1.o was
present to decide whether -m32 should use /usr/lib32.  At jrtc27's
suggestion, simply test for a 32-bit platform rather than adding
arm to the list.  Upstreamed as
3450272fc2
Bump the freebsd version to force a bootstrap build.  This is one
step in adding support for -m32 on arm64.

Reviewed by:	jrtc27, brooks, dim
Differential Revision:	https://reviews.freebsd.org/D40943

(cherry picked from commit f1d5183124)
2024-01-08 00:04:33 +01:00
Ed Maste 104cc21de8 lldb: dereference stoppcbs based on target kernel version
As of 9fb6718d1b / __FreeBSD_version 1400089 stoppcbs is a pointer to
the pcbs array.  Dereference stoppcbs on sufficiently new kernels.

Reviewed by:	markj (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39939

(cherry picked from commit 0f2bb40bc7)
2024-01-08 00:04:33 +01:00
Konstantin Belousov d850efed89 ofed: use ANSI C functions definitions in opensm/sm.c
(cherry picked from commit bf7830d79d)
2024-01-02 02:42:13 +02:00
Dimitry Andric 1eaec69134 Merge commit c97a7675eea4 from llvm git (by Qiu Chaofan):
[PowerPC] Expand FSINCOS of fp128 (#76494)

This fixes "fatal error: error in backend: Cannot select: 0x6d420285c0:
f128,f128 = fsincos 0x6d4202b6f0" when compiling s_cpowl.c for
powerpc64le.

Upstream ticket: https://github.com/llvm/llvm-project/issues/76442

Reported by:	pkubaj
MFC after:	3 days

(cherry picked from commit 7963968640)
2024-01-01 17:42:09 +01:00
Dimitry Andric f4cff561ae Minimize libc++ errno-related header diffs with upstream
In commit 88640c0e8b the new EINTEGRITY errno value was added, and
this caused us to carry a patch for upstream libc++ since that time.
Because it can cause merge conflicts when importing libc++ code from
upstream, I have submitted an upstream pull request to get most of that
patch integrated.

It turns out that we do not need the errno.h part of it at all, since
all supported FreeBSD versions define EOWNERDEAD and ENOTRECOVERABLE,
and therefore the block that juggles with ELAST values is never used in
FreeBSD. At the moment it only applies to older versions of Linux, or
possibly other platforms.

Therefore the only part that needs to stay is the definition of a enum
errc value for EINTEGRITY, and this is made optional upon EINTEGRITY
being defined, to make it suitable for upstreaming.

No functional change is intended.

MFC after:	1 week

(cherry picked from commit 1ff41cad71)
2024-01-01 17:41:58 +01:00
Dimitry Andric 4f3aa626f6 Fix snprintf truncation in telnet
Building telnet with clang 18 results in the following warning:

  contrib/telnet/telnet/telnet.c:231:5: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 11 [-Werror,-Wformat-truncation]
    231 |     snprintf(temp2, sizeof(temp2), "%c%c%c%c....%c%c", IAC, SB, TELOPT_COMPORT,
	|     ^

The temp2 buffer is 10 chars, while the format string also consists of
10 chars. Therefore, snprintf(3) will truncate the last character, 'SE'
(end sub negotation) in this case.

Bump the buffer to 11 chars to avoid truncation.

MFC after:	3 days

(cherry picked from commit c794d18822)
2023-12-24 15:01:29 +01:00
Dimitry Andric 0bb3806932 Merge commit 989879f8fded from llvm git (by Paul Walker):
[Clang] Allow C++11 style initialisation of SVE types.

  Fixes https://github.com/llvm/llvm-project/issues/63223

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

Requested by:	andrew
MFC after:	3 days

(cherry picked from commit 641efdd10c)
2023-12-24 14:59:50 +01:00