summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/tools/clang/lib/Driver (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove LLVM 8.0.1 files.patrick2020-08-03104-39418/+0
|
* PowerPC: optimize away the frame pointer.gkoehler2020-05-251-3/+4
| | | | | | | | clang defaulted to -fomit-frame-pointer when optimizing PowerPC code for Linux and NetBSD. Now do it for all systems, including OpenBSD. This affects both 32-bit and powerpc64 code. ok kettenis@
* Switch powerpc clang to -msvr4-struct-return, like gcc.gkoehler2020-03-041-0/+13
| | | | | | | | Add these options from gcc to clang: -maix-struct-return # return all structs in memory -msvr4-struct-return # return small structs in r3/r4 ok mortimer@ jca@ deraadt@
* Add retguard for octeon/mips64.mortimer2019-10-251-0/+2
| | | | | | | | | | For this architecture we use separate retguard prologue and epilogue code for static or PIC code. In the PIC case we use some additional code before the retguard epilogue to recover the function start address and the GOT pointer in order to get the per-function random cookie. Much thanks to visa@ for suggestions and advice making it all work. ok deraadt@ visa@
* Make clang emit the proper path to our libcompiler_rt.a when asked to.patrick2019-09-282-0/+12
| | | | | | | | Change of behaviour in latest clang upgrade noticed by jsing@ during the Go port update, where --print-libgcc-file-name is being used which prints the compiler-rt path. ok kettenis@
* Merge LLVM 8.0.1 release.patrick2019-09-011-3/+9
| | | | | | | Tested in snaps and package builds Tested on amd64 by naddy@ Tested on arm64 by patrick@ Tested on octeon by visa@
* Import LLVM 8.0.1 release including clang, lld and lldb.patrick2019-09-012-15/+20
|
* In LLVM 8 somebody had the glorious idea to enable the integrated assemblerclaudio2019-06-261-1/+1
| | | | | | | | for OpenBSD sparc64. The problem is that the integrated assembler is not even able to compile the .S files in lib/csu or lib/libc so revert this and use gas again. Fixes build issues with clang on sparc64. Issue identified by jca@ OK deraadt@, patrick@, jca@
* The -nopie flag has already been pushed a few lines before,patrick2019-06-241-3/+2
| | | | | | we don't need to do that again here. From Brad
* Merge LLVM 8.0.0 release.patrick2019-06-2310-449/+1116
| | | | | | | | | Prepared with help from jsg@ and mortimer@ Tested on amd64 by bcallah@, krw@, naddy@ Tested on arm64 by patrick@ Tested on macppc by kettenis@ Tested on octeon by visa@ Tested on sparc64 by claudio@
* Import LLVM 8.0.0 release including clang, lld and lldb.patrick2019-06-2350-531/+2131
|
* Back out frame pointer elimination optimization.mortimer2019-06-011-11/+0
|
* Do not eliminate frame pointers on i386. The entire i386 ecosystem assumesmortimer2019-06-011-1/+0
| | | | | it will be there. problem found by naddy@, "heck yeah" kettenis@
* Re-enable frame pointer elimination for x86 and mips64 if optimizations aremortimer2019-05-311-0/+12
| | | | | | enabled. ok visa@
* Also touch --param ssp-buffer-size when using retguard in lieu of themortimer2019-04-251-1/+2
| | | | | | | stack protector. Fixes 'unused arguments' warning when this argument is given. Noticed by robert@, ok robert@
* frame-pointer elimination has encountered some resistance in ports but wederaadt2019-04-041-12/+0
| | | | | | are close to release, so punt the change till after-release easier for everyoned and especially naddy ok tedu
* Enable frame pointer elimination on i386, amd64 and mips64 when givenmortimer2019-04-021-0/+12
| | | | | | optimization flags. ok kettenis@ visa@
* Consume SSP options when using retguard to prevent warnings.mortimer2019-04-011-0/+4
| | | | ok millert@
* If using retguard, we do not also need the stack protector.mortimer2019-03-311-3/+4
| | | | ok deraadt@
* Improve the X86FixupGadgets pass:mortimer2019-02-221-0/+10
| | | | | | | | | | - Target all four kinds of return bytes (c2, c3, ca, cb) - Fix up instructions using both ModR/M and SIB bytes - Force alignment before instructions with return bytes in immediates - Force alignment before instructions that have return bytes in their encoding - Add a command line switch to toggle the functionality. ok deraadt@
* Merge LLVM 7.0.1 release.patrick2019-01-276-525/+927
| | | | | With fixes from mortimer@ (thanks!) Tested by many, especially naddy@ (thanks!)
* Import LLVM 7.0.1 release including clang, lld and lldb.patrick2019-01-2766-935/+3371
|
* Enable the integrated assembler on mips64.visa2018-10-211-4/+6
| | | | | | | | Upstream references: https://reviews.llvm.org/D31557 https://reviews.llvm.org/D48515 OK kettenis@
* Add retguard for arm64.mortimer2018-08-121-1/+2
| | | | ok deraadt@
* Pass -nopie to the linker when -pg is specified to make theyasuoka2018-06-071-2/+3
| | | | | | profiler(gprof) work properly. ok mpi
* Add RETGUARD to clang for amd64. This security mechanism uses per-functionmortimer2018-06-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | random cookies to protect access to function return instructions, with the effect that the integrity of the return address is protected, and function return instructions are harder to use in ROP gadgets. On function entry the return address is combined with a per-function random cookie and stored in the stack frame. The integrity of this value is verified before function return, and if this check fails, the program aborts. In this way RETGUARD is an improved stack protector, since the cookies are per-function. The verification routine is constructed such that the binary space immediately before each ret instruction is padded with int03 instructions, which makes these return instructions difficult to use in ROP gadgets. In the kernel, this has the effect of removing approximately 50% of total ROP gadgets, and 15% of unique ROP gadgets compared to the 6.3 release kernel. Function epilogues are essentially gadget free, leaving only the polymorphic gadgets that result from jumping into the instruction stream partway through other instructions. Work to remove these gadgets will continue through other mechanisms. Remaining work includes adding this mechanism to assembly routines, which must be done by hand. Many thanks to all those who helped test and provide feedback, especially deaadt, tb, espie and naddy. ok deraadt@
* Add ret protctor options as no-ops.mortimer2018-06-031-0/+10
|
* Switch armv7 to the "softfp" floating-point ABI. The ABI is identical tokettenis2018-05-051-1/+1
| | | | | | | the "soft" floating-point ABI but this does allow the compiler to generate FPU instructions. ok deraadt@
* Tedu files that got removed in LLVM 6.0.0.patrick2018-04-062-269/+0
|
* Merge LLVM 6.0.0 release.patrick2018-04-063-1126/+1366
|
* Import LLVM 6.0.1 release including clang, lld and lldb.patrick2018-04-0651-1008/+2382
| | | | "where is the kaboom?" deraadt@
* Merge LLVM 5.0.1 release.patrick2017-12-241-1/+5
|
* Import LLVM 5.0.1 release including clang, lld and lldb.patrick2017-12-243-15/+0
|
* Tedu files that got removed in LLVM 5.0.0.patrick2017-10-047-21324/+0
|
* Merge LLVM 5.0.0 release.patrick2017-10-045-18/+97
|
* Import LLVM 5.0.0 release including clang, lld and lldb.patrick2017-10-0490-168/+25503
|
* On OpenBSD disable the malloc/calloc/realloc/free/str*dup builtins, sincederaadt2017-07-281-0/+12
| | | | | | | | they can perform strange transforms and optimizations. Some of those could gain a slight advantage, but would avoid the variety of important runtime checks our malloc(3) code does. In essence, the transforms performed are considered "anti-mitigation". ok kettenis robert, discussions with others
* push back -pie to the linker if -pie is specified to avoid an unused argumentrobert2017-07-271-0/+3
| | | | | | warning ok kettenis@, deraadt@
* Enable -fwrapv by default with clang to treat signed integer overflowsjsg2017-06-061-1/+2
| | | | | | | | | | | | | as defined. This is done to prevent dangerous optimisations which could remove security critical overflow checks. Base gcc has -fno-strict-overflow by default, with clang this is identical to -fwrapv. Prompted by naddy@ discovering a hang with a clang compiled i386 kernel that was resolved with -fwrapv. ok kettenis@ pascal@
* Enable TLS support but default to the emulatated TLS model. Enable thekettenis2017-05-091-1/+2
| | | | | | | | runtime support code libcompiler_rt for this. This code uses functions that live in libpthread, so code that uses TLS support will need to be linked with -lpthread. This should allow more ports to build with base clang. ok espie@
* Merge LLVM 4.0.0 rc1patrick2017-01-243-1023/+2302
|
* Import LLVM 4.0.0 rc1 including clang and lld to help the currentpatrick2017-01-2415-644/+2214
| | | | development effort on OpenBSD/arm64.
* Make LLVM create strict aligned code for OpenBSD/arm64. We currentlypatrick2017-01-211-3/+7
| | | | | | | | don't enforce it yet, but we want to go down that road. Additionally the Pine64 seems to boot up with strict alignment on by default, so this also implicitly fixes efiboot on that hardware. ok kettenis@ phessler@ visa@
* Merge LLVM 3.9.1patrick2017-01-144-787/+2151
|
* Import LLVM 3.9.1 including clang and lld.patrick2017-01-1411-374/+1243
|
* With clang as cross-compiler we need to make it pass the library pathpatrick2017-01-042-3/+5
| | | | | | | to our linker. Additionally, we need to make sure the library path is prefixed with the cross directory, which is sysroot. ok kettenis@
* Disable -fstrict-aliasing per default on OpenBSD.pascal2016-09-271-2/+5
| | | | cluebat & ok kettenis@
* For now, force soft-float; our kernel doesn't support saving the FPU state yet.kettenis2016-09-171-0/+4
| | | | ok patrick@
* Link to -lcompiler_rt instead of -lgcc.pascal2016-09-061-8/+2
| | | | looks good to stefan@
* libunwind relies on the EH frame header. Our OpenBSD frontend codepatrick2016-09-051-1/+2
| | | | | | | does not tell our linker to produce that header for statically linked binaries. Just create that header for all binaries and we are fine. ok guenther@