summaryrefslogtreecommitdiffstats
path: root/gnu/gcc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Our system headers are supposed to be C++-aware these days so stop GCC fromkettenis2012-10-062-3/+4
| | | | | | | wrapping them with an implicit extern "C" since that breaks the webkit port. Help from matthew@ and landry@. ok landry@
* Bounds check before addressing call_used_regs[], avoids segfaults inmiod2012-09-011-1/+1
| | | | | fixup_match_2() on landisk building mysql; gcc PR #28467 help and prodding jsg@, ok kettenis@
* Apply to sparc the same change as to sparc64: Pass -K PIC to the assembler whenpascal2012-08-311-0/+8
| | | | | | we're default PIE. allows Theo to build PIE-by-default sparc; ok kettenis@
* Switch GCC to use __guard_local instead of __guard. This allows GCCmatthew2012-08-311-1/+3
| | | | | | | | | to emit -fstack-protector code that doesn't need GOT indirection for accessing __guard. Tested on amd64, i386, sparc64, hppa, loongson, and sgi (thanks lteo, djm, sthen, todd, naddy, kettenis, phessler, jasper, and anyone else that I'm missing who tested).
* Use OBSD_LIB_SPEC and OBSD_CPP_SPEC instead of rolling our own. Meanskettenis2012-08-311-2/+2
| | | | | | powerpc now gets the right behaviour for -pthread as well. ok pascal@, krw@, millert@
* On sparc64, we still need to pass -K PIC to the assembler when compiling PIE.pascal2012-08-301-0/+8
| | | | | | Found out the hard way by deraadt@. ok kettenis@
* Our _mcount doesn't use profile counters. Partially fixes profiling on hppakettenis2012-08-291-0/+3
| | | | (things link now).
* Add support for PIE-by-default in both ld and gcc. This is a completelypascal2012-08-284-2/+8
| | | | | | | | | | different approach than the one taken in kurt@'s original diff, but deemed better after discussion and diff exchange with kettenis@ and matthew@. Lots of feedback by kettenis@ and matthew@, prodding and encouragement by deraadt@. ok kettenis@ matthew@
* Back out the bit that links all shared libraries against -lc from the previouskettenis2012-08-241-1/+1
| | | | | | | commit. It breaks make build on arm and generally causes more grief than the the (small) benefit it is supposed to bring. ok matthew@
* A couple small but long anticipated changes:matthew2012-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Link libpthread.so with -znodlopen. Because libpthread overrides the weak symbols in libc, we can't allow it to be dynamically loaded or else libc's weak symbols might have already been resolved by ld.so. (Also, major bump because this is technically a backwards incompat change in behavior, although dlopen()ing libpthread never really worked.) - Link libc.so with -nodefaultlibs -lgcc. This ensures that libc doesn't try to link against itself (which ld.so wouldn't like). - Change GCC 4 to link shared objects with -lpthread and -lc as appropriate, now that there's no issues with doing so. This means that it's no longer necessary to patch software to use -pthread instead of -lpthread. (Ports tree rejoice!) Also, to preemptively answer this question: No, this does not eliminate the need for LD_PRELOAD=libpthread.so. That's a separate issue that won't be resolved until we eliminate libc's weak symbols. Discussed extensively on email and icb over the past few months. ok deraadt
* We typedef intmax_t/uintmax_t to be long long/unsigned long long,guenther2012-08-051-0/+6
| | | | | | | | so override gcc's default of long/unsigned long on amd64 like we do the other LP64 platforms. This lets format checking of %jd/%ju work correctly there. ok matthew@ millert@
* Fix GCC's use of _POSIX_PRIORITY_SCHEDULING andmatthew2012-06-203-17/+17
| | | | | | | | | | | | | _POSIX_THREAD_PRIORITY_SCHEDULING. POSIX 2001 states that they can be defined to -1 to indicate that the feature is not supported (which is how we define them), so it's not okay to just check whether or not they're defined. Arguably, SUSv2 allows GCC's usage, but we don't special case these feature flags for SUSv2, and these files need to be compilable in BSD and POSIX compat modes anyway. From Brad.
* silence warning, as noticed with eric and landryespie2012-05-301-1/+1
| | | | (gcc3 may need the same patch, untested yet)
* Avoid errors with g++ -pedantic by removing throw() from the redeclaration ofpascal2012-05-301-1/+1
| | | | | | posix_memalign(). ok matthew@ guenther@
* fix warning. Reminded by landry@, I plain forgot to commit. This has been testedespie2012-05-101-52/+58
| | | | for ages by now.
* Do not disable the stack protector by default anymore.miod2012-04-171-5/+0
|
* Use the proper symbol name for __guard in the workaround for themiod2012-04-151-1/+1
| | | | | unable to find a register to spill in class 'R0_REGS' ICE when compiling PIC code. Similar to the MI targhooks.c change.
* Remove incorrect -pthread preprocessor define _POSIX_THREADS and replacekurt2012-04-123-4/+4
| | | | | with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h. From brad@comstyle.com. okay guenther@
* backout gcc revision 112331 "optimized integer divide for SH4"jsg2012-04-128-879/+25
| | | | | | so we can use the existing sh libkern functions. ok miod@
* In r1.2, instead of making -fno-ident the default, its semantics have beenpascal2012-04-021-1/+1
| | | | | | | | totally fucked up, effectively leading to inverted behaviour of the -fident and -fno-ident flags (while keeping the .ident string in by default). Revert it back to normal and default to -fno-ident. ok millert@
* Default to -mfix-r4000 -mfix-r4400 when building in big endian mode. This ismiod2012-03-281-0/+11
| | | | | | | | | | | a lifesaver for R4000 and R4400 operation; without these, every int->long promotion occuring shortly after an integer multiplication (such as an array element access when the array item size is not a power of two) loses horribly, and panic^Whilarity ensues. This mostly causes assembly insns to be shuffled, but almost no code size growth and no noticeable performance hit on processors which do not need these insn placement workarounds.
* Define NO_UNSAFE_BUILTINS, overlooked when local changes got merged to gcc4.pascal2012-03-062-0/+8
| | | | | | | | | Found by Brad. Also, consider stpcpy an unsafe builtin and prevent it from being optimised away. ok miod@
* Sync gcc3 and gcc4 knowledge of the kernel printf capabilities with reality:miod2012-03-011-13/+11
| | | | | | | | | | kprintf supports %z, doesn't support old ddb %n/%r%z anymore, and check of %b arguments have to occur on the next argument, like, duh. These changes will eventually allow for kernel to be compiled without -Wno-format, but some more casts or type changes are necessary, first. Discussed about six months ago at s2k11, time to put this in, so that I have no excuse not to work on the format fixes diffs.
* zap double copy of this file, as noticed by brad@espie2012-01-061-98/+0
|
* Convert restrict -> __restrict. "restrict" is not a keyword in C90 andpascal2011-12-153-10/+10
| | | | | | | | | | C++98, so clang++ rightfully complains about it when in C++98 mode (the default). Found while investigating the other clang issue, with helpful input from espie@. ok jsg@
* Remove the XXX_CHECK defines. This allows clang++ to include cstdiopascal2011-12-151-3/+0
| | | | | | | | without barfing about conflicting declarations. Issue reported by Amit Kulkarni, investigated by matthew@ and kettenis@. ok kettenis@
* Restore MAX_OFILE_ALIGNMENT define (lost during the gcc3 -> gcc4 switch),miod2011-12-041-0/+3
| | | | | | | | | | and change ASM_OUTPUT_ALIGNED_COMMON to output an explicit .align directive, as gas will not compute it from the size (despite what comments elsewhere in gcc code say). This effectively makes __attribute__ ((aligned (N))) constructs work as intended for .bss objects. ok kettenis@
* Final configuration bits for gcc4: require alignment of local arrays onmiod2011-11-252-4/+6
| | | | word boundaries, and enable the builtins.c `one-byte memcpy' workaround.
* Allow MD backend to prevent the optimization of a bcopy() or memmove() ofmiod2011-11-251-4/+13
| | | | | | | | | | | | | size 1 (the size being known at compile-time) into an inline mempcpy() expansion, which will in turn expand into a byte load and store operation. This expansion loses precious address alignment information at some point (because everybody knows that you can read a byte from any address, right?), and this loses bigtime on strict alignment platforms which lack the ability to accesse bytes directly, such as alpha (unless compiling with -mbwx and runnning on a BWX-capable cpu). An example of such call with size 1 is lib/libkvm/kvm.c line 780.
* Remove '#if !defined(OpenBSD)' wrappers around wcsftime() and iswblank().stsp2011-11-022-5/+1
| | | | From brad. ok kettenis espie
* change LINK_SPEC in such a way that -rdynamic will workjsg2011-10-2110-3/+18
| | | | | | (passes -export-dynamic to ld(1)) ok drahn@ miod@
* Some wcsftime declarations were still wrapped in !defined(__OpenBSD__).stsp2011-10-172-4/+0
| | | | from brad; ok kettenis
* Expose wscanf(3) and wcsftime(3) in the std:: namespace (gcc4) and bump major.stsp2011-10-162-14/+0
|
* Port the -Wbounded extension from gcc3 to gcc4. Based on work started bynicm2011-09-158-27/+635
| | | | | | | | | | | | jasper@. This omits the sizeof(pointer) tracking which is very difficult to implement for gcc4 due to internal changes. Thanks to landry@ for running through a ports bulk build and both landry@ and jasper@ for fixing a few issues. ok deraadt millert jasper
* Don't use 128-bit long doubles for now (and perhaps forever). It isn'tkettenis2011-08-041-0/+3
| | | | implemented in hardware anyway.
* Add support for hppa64.kettenis2011-08-041-0/+179
| | | | ok deraadt@
* Let ia64 gcc compile.pirofti2011-07-041-0/+19
|
* Remove ueberold a.out configuration leftovers.miod2011-06-252-34/+0
|
* Fix gcc PR #35965 as suggested inmiod2011-06-251-2/+4
| | | | | | | | http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01641.html This fixes a stack protector code bug which only got triggered by some particular function patterns, such as libc's __vfprintf. ok drahn@
* Bring back wprintf() for gcc4 libstdc++.stsp2011-04-281-9/+3
|
* Merge from gcc3:naddy2011-04-271-0/+7
| | | | | | | Default gcc on alpha to -mfp-rounding-mode=d, to make code which assumes the rounding mode is always controlled by fpsetround() happy. ok martynas@, miod@
* Back out wprintf diff and crank. Need to check more architectures first.stsp2011-04-241-3/+9
| | | | requested by and ok deraadt
* Expose wprintf and friends in the std:: namespace. Major bump for libstdc++.stsp2011-04-241-9/+3
| | | | ok kettenis espie
* Use the correct floating point type.drahn2011-04-071-0/+2
|
* Put in the infrastructure for OpenBSD/arm gcc4 support. Not working, but workdrahn2011-04-062-0/+265
| | | | on this in-tree not diffs floating around for > 1 year. ok miod@
* Fix compiler warning from recent HANDLE_PRAGMA_PACK_PUSH_POP addition.drahn2011-03-141-1/+1
| | | | | (Fix both ppc compilers in tree, was previously committed to wrong one). OK deraadt@ discusssed with millert@ otto@ and kettenis@
* Fix patently broken handling of ios_base::showpos: "cout << showpos <<matthew2011-03-021-2/+2
| | | | | | 0" should output "+0", not "0". Diff from upstream (which is still GPLv2+) via Brad.
* define HANDLE_PRAGMA_PACK_PUSH_POP just like on other platformsrobert2011-03-021-0/+3
| | | | | | | | to get #pragma pack and #pragma push work in order to be compatible with MS compilers because there is some code out there (e.g. chromium) that uses these pragmas. ok kettenis@
* define __throw_exception_again to something, so that g++ -fno-exceptionsespie2010-12-241-1/+1
| | | | | | | | | | | does not throw warnings for stuff like if () __throw_exception_again; which does happen in its own fucking headers. builds of qt3 should no longer warn... okay millert@, no objection kettenis@
* Make sure GCC's idea about size_t and ptrdiff_t matches what we have inkettenis2010-12-121-0/+6
| | | | | | <sys/types.h>. ok miod@