summaryrefslogtreecommitdiffstats
path: root/gnu/gcc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Make gcc call collect2 on powerpc (instead of directly calling ld).jca2013-10-291-1/+1
| | | | | | Kernel, base and ports seem happy with this change, and there's no reason for collect2 to be less useful on these machines. Offending lines in gcc/config found by Miod, thanks! ok kettenis@ miod@ mpi@
* don't warn on missing newline at eofjsg2013-08-071-3/+0
| | | | | matches the behaviour of gcc >= 4.3 and clang ok miod@
* Fix attribute((init_priority)) on sparc and sparc64.kettenis2013-07-302-0/+8
|
* Add support for the GCC binary integer constants extension.jsg2013-07-042-3/+44
| | | | | | | From Joerg Wunsch in GCC PR 23479, under the GPLv2. This is required to build the i965 backend with newer versions of mesa. ok kettenis@ espie@ miod@
* add support for %td for ptrdiff_t in kernel printfsf2013-07-031-3/+4
| | | | | | this also adds support in gcc 4.x kprintf format checks ok kettenis@
* Disable a broken optimization in try_combine(); GCC PR #34628.miod2013-06-061-0/+2
| | | | | | | | The PR comes with a real fix, but it is covered by the GPL v3, and is neither trivial nor straightforward, so use a hammer and disable the unreliable code. Verified to fix bogus code generation on macppc.
* classify_integer(): test whether the value can be built using the `set'miod2013-06-041-20/+33
| | | | | | | | | instruction, before testing whether it can be built with `or.u'; this allows further optimization. condition_value(): handle ORDERED and UNORDERED condition codes. print_operand(): remove support for no longer used `w' qualifier.
* Add "length" attribute to "weird" class instructions of small length: usermiod2013-06-041-11/+16
| | | | | | inline assembly, tb/tbnd instructions. Don't use `r' qualifier for "register_operand", it's redundant.
* Replace strcpy() calls with strlcpy() to avoid triggering warnings whenmiod2013-05-181-2/+2
| | | | linking against -lgcov.
* Define WINT_TYPE as well.miod2013-05-091-0/+3
|
* Define LOCAL_ALIGNMENT as well.miod2013-05-091-0/+3
|
* Backport fix for gcc PR target/31152:miod2013-05-081-4/+1
| | | | | * arm.md (negscc): Match the correct operand for optimized LT0 test. Remove optimization for GT.
* A port of the current gcc 3.3.6 m88k backend to gcc 4.2.1.miod2013-05-0810-0/+8409
| | | | | | | | | | | | | | | | | | | | | Main features: - md constraints rewritten in RTL - md predicaties rewritten in RTL - md va_arg switched to gimple - abort() calls replaced with gcc_assert() or gcc_unreachable() for better diagnostics - support for non-ELF systems completely removed Missing: - conversion of the pipeline information from define_function_unit to define_automata not done yet (thus pipeline information currently removed) Known regressions against 3.3.6 so far: - no stack protector support yet - __builtin_setjmp doesn't restore the frame pointer correctly upon return from __builtin_longjmp - at least one case of optimization error when delay slots are not disabled. - libgcc is only built -fPIC, instead of static/fpic/fPIC.
* Add support for "d" floating-point suffix, as defined by draft N1312martynas2013-04-043-3/+24
| | | | | of TR 24732. Emit pedantic warning if the feature is being used. Requested by jasper@; needed by certain ports. OK miod@.
* Sanitize LINK_SPEC for hppa64, making it identical to what we have on amd64kettenis2013-02-031-8/+7
| | | | | | and i386. pointed out by miod@
* Sanitize LINK_SPEC for hppa, making it identical to what we have on amd64 andkettenis2013-02-031-8/+7
| | | | | | i386. ok pascal@, miod@
* Simplify OBSD_LIB_SPEC a bit for gcc3/4.brad2013-01-151-1/+1
| | | | ok miod@
* Remove GLIBC_DYNAMIC_LINKER which is only relevant for Linux.brad2012-12-311-2/+0
| | | | ok miod@
* Bring stack smashing protector for MIPS; enabled by default.martynas2012-12-202-9/+9
| | | | | Reorganize soft frame pointer so that locals are below it and grow downwards. Tested by miod@, jasper@. OK miod@.
* Bring stack smashing protector for Alpha; enabled by default.martynas2012-12-202-1/+4
| | | | | Reorganize soft frame pointer so that locals are below it and grow downwards. Thanks Nick for the access. OK miod@.
* Make the SH register spill failure for R0 workaround work againmartynas2012-12-171-1/+1
| | | | after switching to __guard_local. OK matthew@, miod@.
* Fix c-bounded when arrays are declared without the size expression.martynas2012-12-101-1/+1
| | | | | | The array_size was uninitialized and used to work by accident. Spotted with SSP on MIPS. OK miod@. Tested by jasper@.
* Fix unaligned memory loads on Alpha. GCC used to generate them inmartynas2012-12-101-10/+15
| | | | | | | | | | | | | | the following manner: ([reg:A & -8] << (64 - (((reg:FP+reg:B) & 0x7) << 3))) >> 56 This fails when we're doing loads with the offset from the frame pointer %8. Since it's aligned, optimizer makes it a zero. The correct expression is: ([reg:A & -8] << (56 - (((reg:FP+reg:B-1) & 0x7) << 3))) >> 56 This is actually a 13-year-old bug. Checked by Miod; a few files in the kernel were affected. Spotted with SSP for Alpha. OK miod@. Tested by naddy@.
* Define __PIE__ and __pie__ when compiling PIE code, just like newer versionskettenis2012-10-231-0/+5
| | | | | | of GCC do. ok millert@, guenther@, pascal@, deraadt@
* 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@