summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
2017-06-22i386 uses a intentional fallthrough between appended code blocks in .init,Theo de Raadt
which we cannot TRAPSLED FILL. This needs to be done a different way. diagnosis with kettenis
2017-06-21elf64_x86_64_plt0_entry had a hardcoded nop-sled, before the subsequentTheo de Raadt
plt entry. Since previous effective instruction is a a jmp, this can be a sequence of traps. ok mlarkin
2017-06-21Intra-segment traps instead of nops. Similar to kernel change, furtherTheo de Raadt
reduction in nopsleds in code and data segments (if those data segments ever become X, that is) ok mlarkin
2017-06-21Large nopsleds make it easier for ROP machinery to sloppily reach targets.Theo de Raadt
Convert these to "trapsleds' instead. Since these can occur inside fall-through blocks of code (and gcc sure isn't helping us by identifying those), convert most to "short jump over" followed a sequence of int3. This works for sled sizes 3-15, for i386 and amd64. Work by Todd Mortimer ok mlarkin
2017-06-21For a decade or more, we've patched gcc to make -fno-ident the default.Ted Unangst
clang doesn't seem to have a command line option for the feature, so just hard wire it off. We don't need advertisements in our binaries. ok deraadt
2017-06-21DEPENDSFILE comes from FreeBSD, we don't have it. replace it with itsMarc Espie
value .depend, so that the conditional is really used. okay guenther@
2017-06-16mark files as BUILDFIRST, or write explicit dependencies, so that mostMarc Espie
programs will build even without a make depend first. okay tb@ millert@
2017-06-12destroy lint remnants.Marc Espie
okay millert@ deraadt@
2017-06-06Enable -fwrapv by default with clang to treat signed integer overflowsJonathan Gray
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@
2017-06-04Replace ((2 << 31) - 1) with 0xffffffff, which is equivalent but doesn'tChristian Weisgerber
cause a shift overflow on a 32-bit arch (i386). ok kettenis@
2017-06-04Update to perl File::Path 2.13 for security fixesAndrew Fresh
Reccomended by upstream - jkeenan AT pobox.com OK sthen@
2017-06-02Synonym -Wno-cpp for -Wno-#warnings. That one is not a headache forMarc Espie
scripting. (got it into upstream, it's just a backport) okay kettenis@, patrick@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-05-31Make gcc move switch tables into .rodata instead of .text on i386/amd64Stefan Kempf
For C++, gcc has to make use of comdat sections instead of .gnu.linkonce sections for this because switch tables and functions would now end up in different .gnu.linkonce sections. This can cause ld to sometimes incorrectly discard the switch tables, which causes linker errors. With comdat sections, making the switch table and function sections belong together is more reliable. ok deraadt@
2017-05-29openbsd does not use nonexec stack segment header hints.Ted Unangst
in fact, false is a much better default for UsesNonexecutableStackSection. platforms that require it can reenable, instead, saving the rest of us an unnecessary program header (causes trouble for some special binaries). ok kettenis
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-05-09Enable TLS support but default to the emulatated TLS model. Enable theMark Kettenis
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@
2017-05-08gcc 4.9 makes unknown -Wno-* vanish.Marc Espie
Reimplement that from scratch in our ancient gcc, because it's really useful for porting newer code and dealing with compiler variations. (slightly tweaked to reset location to unknown location after the okays) okay kettenis@ jasper@ found out https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28322 after the patch, which explains a similar reasoning better, and leads to another patch for older GCC, possibly GPLv3.
2017-04-28Install a few more x86 intrinsics header files.Mark Kettenis
spotted by espie@
2017-04-27add support for -msave-args in gcc on amd64David Gwynne
i got sick of not having arguments in ddb stack traces on amd64, which is because amd64 passes arguments in registers, and it's impossible to figure out where they go without dwarf info, and when you have dwarf info it is complicated. solaris has a simple solution for this. they tweaked their compilers to accept an -msave-args option which makes functions store their arguments on the stack, while maintaining compatability with the System V AMD64 ABI. tools (eg, ddb) can then look at the stack to get access to function arguments in traces. this ports their changes to gcc 3 to our gcc. ok deraadt@
2017-04-20Install clflushoptintrin.h and move pkuintrin.h such that the list isMark Kettenis
properly sorted. pointed out by espie@
2017-04-17Take a more radical approach to disabling colours: pretend we don'tPascal Stumpf
HAVE_TERMINFO in our local config.h. Some of the lower levels of LLVM don't seem to respect our default setting. As a result, delete the -ltermlib dependency. Note that this breaks -fcolor-diagnostics=auto. However, fixing the whole codebase is out of scope for now ... Prompted by an instance found in the AsmParser by deraadt@ ok kettenis@ patrick@
2017-04-17Change build infrastructure to allow building both gcc and clang. ThisMark Kettenis
doesn't actually flip the switch yet, so aarch64 continues to be the only architecture for which we build clang. ok jsg@, deraadt@
2017-04-16Disable colored diagnostics in LLVM's lld.Patrick Wildt
Requested by deraadt@
2017-04-15Handle R_SPARC_WPLT30 relocations against a local symbol. Fixes building theMark Kettenis
audio/openal port with clang. ok guenther@
2017-04-14once cvs's flow-control mechanism has kicked in, stop reading fromJoshua Stein
its local reader until memory usage goes back down below its watermark. during a checkout of a tree with big files (like www) from a fast reader (disk) and a slow writer (net), the amount of data being buffered can back up enough that cvs tries to allocate too many buffers and hits its resource limit, causing death. cvs's flow-control mechanism properly detects this early on, but the message sent to the reader process to stop sending data takes too long to process. take more aggressive action and just stop reading from the reader until the writer has ejected enough data that it can start re-using its already-allocated buffers instead of allocating new ones. ok deraadt
2017-04-12explicitly set the ownership on installed include files as wellJonathan Gray
2017-04-12Invoke install -d for each directory in the /usr/lib/clang hierarchyJonathan Gray
as they aren't in mtree. Problem with wrong ownership and permission of directories reported by sthen@. ok deraadt@ sthen@ tb@
2017-04-10Generate and install arm_neon.h on arm and arm64.Mark Kettenis
ok jsg@
2017-04-09Sync symbol lists for trap/interrupt frame detection with what ddb(4) usesPhilip Guenther
ok deraadt@
2017-04-02Fix an out-of-bounds memory access with 64-bit armaps.Visa Hankala
OK kettenis@
2017-03-27Do not clobber the default compiler/linker links unless COMPILER_VERSION isMark Kettenis
set to clang. ok jsg@
2017-03-24Add "supported targets" in lld --help output to be compatible with whatJonathan Gray
libtool generated configure scripts expect. Otherwise they might assume shared libraries aren't supported. From lld svn revisions 298568 and 298571. Discussed with kettenis@
2017-03-24Add "(compatible with GNU linkers)" to the lld version output to avoidJonathan Gray
problems with configure scripts generated with libtool.m4 that would otherwise have to be regenerated with a patched libtool. Among other things this fixes the build of Mesa on arm64 with lld. From lld svn revision 298532. ok kettenis@
2017-03-19Work around a problem where linker-generated symbols are not properlyMark Kettenis
versioned and end up as local symbols despite being explicitly listed as global in the version script. This breaks out brk()/sbrk() implementation. The diff is only a partial solution and unlikely to be accepted as-is upstream. We'll keep it as a local diff until a better solution is found. ok guenther@
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2017-03-18Add support for -znodlopen.Mark Kettenis
ok patrick@
2017-03-16Fix handling of the SVM instructions such that they accept a register asMark Kettenis
an operand instead of a memory address. This matches what more recent binutils versions do and allows us to write inline assembly that's accepted by both clang and gas. ok mlarkin@, visa@
2017-03-14Merge LLVM 4.0.0 release.Patrick Wildt
2017-03-14Import LLVM 4.0.0 release including clang and lld.Patrick Wildt
2017-03-09Disable colored diagnostics in the clang frontend.Patrick Wildt
Requested by deraadt@, millert@ and some more.
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2017-03-05Go back to only specifying --target when building cross.Jonathan Gray
The OpenBSD triple includes the OpenBSD version. When this recently changed binutils started building prefixed tools when moving to a new OpenBSD version which isn't what we want. ok kettenis@
2017-03-04Better avoid installing versioned perl, makes perlivp happyAndrew Fresh
2017-02-27Implement D and U modifiers to ar; with D the uid/gid/mode/time on the updatedPhilip Guenther
archive members are set to deterministic values. U cancels D. This should simplify the syspatch work. Based on a diff by daniel@ ok millert@ deraadt@ kettenis@
2017-02-25Implement support for generating movw/movt relocations on arm in gas(1).Mark Kettenis
Ported from FreeBSD's GPLv2 version of binutils. ok guenther@
2017-02-25sync clang.1 with clang.rstJonathan Gray
Generated with gmake and py-sphinx installed via cd /usr/src/gnu/llvm/tools/clang/docs && gmake -f Makefile.sphinx man ok patrick@
2017-02-25Disable loop idiom recognition for _libc_memset and _libc_memcpy. These areMark Kettenis
the internal names we use in libc for memset and memcpy and having the compiler optimize them as calls to memset and memcpy will lead to infinite recursion. This is a temporary solution while guenther@ tries to figure out a better way to force calls from inside libc via identifiers that are of hidden visibility. ok jsg@, patrick@
2017-02-25Fix the types used on aarch64 to match what we have in <sys/types.h>.Mark Kettenis
From Brad Smith.
2017-02-25Make sure the .eh_frame ends with a terminator. This avoids creating aMark Kettenis
zero-sized .eh_frame section, which confuses the strip from our frankenbinutils. With this diff lld seems to be usable as the arm64 system linker. ok patrick@, jsg@