summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
2022-01-13add a dummy -t flag to llvm-ranlib to match binutils' ranlib's -t flag whichRobert Nagy
is a no-op; ok millert@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2021-12-28lld: restore upstream default for --[no-]allow-shlib-undefinedChristian Weisgerber
ok patrick@ kettenis@
2021-12-28lld: do not report undefined weak references in shared librariesChristian Weisgerber
https://github.com/llvm/llvm-project/commit/52bfd2c1ccd86ff813ee6df5a6700690acdd912f This fixes an issue introduced in D101996. A weak reference in a shared library could be incorrectly reported if there is another library that has a strong reference to the same symbol. Differential Revision: https://reviews.llvm.org/D115041 ok patrick@ kettenis@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2021-12-28Compile out-of-line helpers for atomic operations which can be enabledPatrick Wildt
through -moutline-atomics. These are included by default in this updated version of compiler-rt, we just haven't enabled them yet. Some ports start to make use of that option, so it makes sense to provide these helpers. The helpers would make use of the ARMv8.1 LSE instructions, if we flagged that the running system supports those. As we do not yet have a mechanism to show support for LSE, the code will always fall back to regular atomics. Issue raised by jca@ Tested by phessler@ Input from jsg@ ok kettenis@
2021-12-25Sync DF_1_* flag definitions with llvm 13, including support inPhilip Guenther
readelf -d for displaying them. (lld 13 sets DF_1_PIE on most our binaries) ok jsg@
2021-12-22Avoid GNU printf extension to use 'L' length modifier with a intJonathan Gray
conversion specifier to mean 'll'. Found by an ok deraadt@
2021-12-17Avoid errors about clang13-only options here, to ease transitionJeremie Courreges-Anglas
As pointed out by deraadt@ we can do better than ask people to follow instructions. Note that you still need an up-to-date clang if you update your kernel Makefiles, as those use clang13-only options. Also -Werror doesn't bring much in binutils context. It's an outdated codebase with lots of warts, which frequently breaks due to -Werror during clang updates. "This is the right fix" deraadt@
2021-12-17Disable a few warning flags that were introduced and enabled by defaultPatrick Wildt
with LLVM 13.
2021-12-17Update build infrastructure for LLVM 13.0.0.Patrick Wildt
2021-12-17Merge LLVM 13.0.0.Patrick Wildt
2021-12-17Import LLVM 13.0.0 release.Patrick Wildt
2021-01-02Import libc++ 10.0.1 release.Patrick Wildt
2020-08-10Import compiler-rt 10.0.1 release.Patrick Wildt
ok kettenis@
2020-08-09Import LLVM 10.0.1 including clang, lld and lldb.Patrick Wildt
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2021-11-24install /usr/bin/llvm-ar as /usr/bin/ar directly without adding anotherRobert Nagy
binary to /usr/bin and do the same with the manpage as well and make sure that we only build llvm-ar on architectures where it is actually enabled discussed with deraadt@
2021-11-23add llvm-ar(1) to the build with its two dependencies libLLVMDlltoolDriverRobert Nagy
and libLLVMLibDriver; switch LLD_ARCHs to llvm-ar(1) by skipping the installation of binutils' ar(1) and linking llvm-ar(1) to ar(1) tested on amd64, i386, arm64 and mips64 ok patrick@, kettenis@
2021-11-12Teach binutils enough about RELR relocations to not break them and forPhilip Guenther
readelf to display them in a way compatible with llvm-readelf, including the --raw-relr debugging option ok kettenis@
2021-11-12backport https://reviews.llvm.org/D107127 to fix shared libraries using emutlsRobert Nagy
Our emulated TLS implementation relies on local state (e.g. for the pthread key), and if we duplicate this state across different shared libraries, accesses to the same TLS variable from different shared libraries will yield different results (see https://github.com/android/ndk/issues/1551 for an example). __emutls_get_address is the only external entry point for emulated TLS, and by making it default visibility and weak, we can rely on the dynamic linker to coalesce multiple copies at runtime and ensure a single unique copy of TLS state. This is a best effort; Also bump the libc++abi minor because now it picks up the __emutls_get_address symbol. ok kettenis@
2021-10-27backport a perl patch to avoid excessive warnings with llvm 13 clangJonathan Gray
originally from Tony Cook in skip using gcc brace groups for STMT_START/END 7169efc77525df70484a824bff4ceebd1fafc760 looks fine millert@ ok afresh1@
2019-02-13Import perl-5.28.1Andrew Fresh
looking good sthen@, Great! bluhm@
2021-10-12Do not extend PT_DYNAMIC segment on mips64Visa Hankala
The IRIX-specific extension of the PT_DYNAMIC segment is not needed by the dynamic linker on OpenBSD/mips64. Disable it so that the .dynamic section stays at the start of the PT_DYNAMIC segment even when .dynstr, .dynsym or .hash precedes .dynamic in the ELF file. This enables Binutils 2.17 tools, such as strip(1), rewrite executables and shared libraries that have been produced by LLD. OK kettenis@
2021-09-28Link libclang_rt.profile to the build.Frederic Cambus
"go for it" kettenis@
2021-09-17Implement __builtin_clear_cache() on riscv64Jeremie Courreges-Anglas
Fixes at least ports/devel/libffi as used by ports/lang/python/2. ok kettenis@
2021-09-15Add build infrastructure for the libclang_rt.profile library.Frederic Cambus
Not linking it to the build yet. "go for it" mortimer@
2021-09-07clang: add a new warning for %n format specifier usage in printf(3) family ↵Sebastien Marie
functions ok deraadt@ different versions tested by jca@ naddy@ sthen@
2021-09-03Allow the compiler driver to link the libclang_rt.profile library.Frederic Cambus
With this change, passing -fprofile-instr-generate -fcoverage-mapping when building programs will attempt linking against libclang_rt.profile.a. Please note that we do not ship the library yet. OK jca@
2021-09-01Add lfence after ret in retpoline thunk.Todd Mortimer
Recommended by AMD white paper Software Techniques for Managing Speculation on AMD Processors (9.17.20) mitigation V2-1. Pointed out by bluhm@. ok bluhm@ kettenis@
2020-08-09Import LLVM 10.0.1 including clang, lld and lldb.Patrick Wildt
2021-09-01llvm: Use Component in OpenBSD::getCompilerRT to find librariesGreg Steuck
Clang uses runtime libraries for some advanced features like sanitizers. Different systems have different preferences about file placement. OpenBSD with this change would use this name for ASan: /usr/lib/clang/11.1.0/lib/libclang_rt.asan.a So far, no libraries are shipped, only their eventual location is chosen. Discussed with deraadt@ and kettenis@, OK mortimer@
2021-08-29Revert: llvm: openbsd driver had one -lcompiler_rt too manyGreg Steuck
Suggested by jca@ that kettenis@ looks at it first.
2021-08-29llvm: openbsd driver had one -lcompiler_rt too manyGreg Steuck
Tested by doing a full system build locally. Will work with brad@ for upstream-ing. OK patrick & mortimer
2021-08-21Switch macppc to ld.lldgkoehler
Add powerpc to LLD_ARCH. Remove -Wl,-relax flag; ld.bfd needed it, but ld.lld can't take this flag. To avoid linker errors on macppc, you need a snapshot where /usr/bin/ld is LLD. ok kettenis@ deraadt@
2021-08-10Fix Encode(3p) loading module from incorrect relative pathAndrew Fresh
This is upstream commit https://github.com/Perl/perl5/commit/c1a937fef07c061600a0078f4cb53fe9c2136bb9 Quoting upstream: Without this fix, Encode::ConfigLocal can be loaded from a path relative to the current directory, because the || operator will evaluate @inc in scalar context, putting an integer as the only value in @inc. Addresses CVE-2021-36770
2021-08-05Remove the TableGen library from libLLVM. It's only needed for the tblgenPatrick Wildt
tools, and it also provides command line options and thus pollutes the name space. This fixes duplicate command line options in llvm-objdump. Discussed with jsg@
2021-08-02Add infrastructure to build llvm-objcopy and llvm-objdump.Patrick Wildt
ok kettenis@ sthen@
2021-07-29Allow relocation R_386_GOTOFF to be used from .debug_info sections. NewerPascal Stumpf
GCC versions will sometimes emit it, and we have stumbled upon it a few times in ports. Upstream commit: https://reviews.llvm.org/D95994 GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98946 ok kettenis@
2021-07-24Pretty print ELF machine name as "RISC-V"Jeremie Courreges-Anglas
Instead of "<unknown>: f3". ok kettenis@
2021-07-11Optimize gadget fixups for MOV instructions.mortimer
Instead of swapping registers around, we can just use the REV version of the same instruction, which has the same effect but encodes differently and does not result in return bytes in the binary. This reduces the number of xchg instructions resulting from gadget fixing. Prompted by ratchov@, with input from millert@ and sthen@. ok sthen@
2021-06-28Fix base-gcc -Wno-error=uninitializedJeremie Courreges-Anglas
base-gcc always errored out when -Werror was passed and -Wuninitialized triggered, even when -Wno-error=uninitialized was passed. Deemed correct by Miod
2021-06-25minimalistic diff to use %ld instead of %d for ptrdiff printingTheo de Raadt
2021-06-25Pull in support from a future clang for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_xTheo de Raadt
defines because we need it now from https://reviews.llvm.org/D91784 ok mlarkin kettenis
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2021-06-24add some aarch64 bits missed in Makefile.in 1.6Jonathan Gray
ok deraadt@ drahn@
2021-06-24repair missing dependencies against bfd.h for riscv64Theo de Raadt
ok jsg drahn
2021-06-23help the debugger look in ports for external parts like PadWalkerMarc Espie
and Readline. feedback and okay afresh1@
2021-06-21correct riscv64 blocksTheo de Raadt
discussion with espie kettenis jsg