summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
Commit message (Collapse)AuthorAgeFilesLines
* Revert r289150:pfg2015-10-121-1/+0
| | | | | | | | Correct handling of enum attributes with g++ It is causing issues on some platforms. Reported by: sbruno (through adrian)
* Correct handling of enum attributes with g++pfg2015-10-111-0/+1
| | | | | | | | | | | | | From OpenBSD's commit log: This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 Obtained from: OpenBSD (CVS rev. 1.2) MFC after: 1 week
* Annotate arm userspace assembler sources stating their tolerance tokib2015-09-293-0/+6
| | | | | | | the non-executable stack. Reviewed by: andrew Sponsored by: The FreeBSD Foundation
* GCC: Add a new option "-fstack-protector-strong"pfg2015-07-307-11/+99
| | | | | | | | | | This includes additional functions to be protected: those that have local array definitions, or have references to local frame addresses. This is a new option in GCC-4.9 that was relicensed by Han Shen from Google under GPLv2 for OpenBSD. Obtained from: OpenBSD (2014-01-14) MFC after: 2 weeks
* Fix compilation of this macro under gcc-4.9 for MIPS32.adrian2015-06-181-5/+5
| | | | | | | | | | | Some point after gcc-4.2 the MIPS inline assembly restrictions changed - =h (hi register) disappeared from the list of restrictions and can no longer be used. So, until someone requires an assembly version of this function, just use a non-assembly version and let the compiler sort it out. Suggested by: kan
* Use a spelling of .thumb clang understands.andrew2015-05-311-1/+1
|
* Update intree gdb/kgdb to handle 2 dwarf types:sbruno2015-05-171-0/+1
| | | | | | | | | | | | | | | DW_OP_GNU_uninit DW_OP_piece This squashes the warnings about type 0x93 not known in kgdb when opening a kernel crash dump. Upstream refs: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=87808bd699575a850139a1f916512ab7a47fd496 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=42be36b328ae784ae6981da7c7cab95b67ed7737 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=23572ecadc89af384c1804ad7692f32c55fbfc80 Differential Revision: https://reviews.freebsd.org/D2534 Reviewed by: emaste, jhb, davide
* unwind-d2 build workaround for arm64emaste2015-03-311-0/+9
| | | | | | | | | | | The __builtin_init_dwarf_reg_size_table function is unimplemented in clang 3.6 for AArch64. Comment it out for now and replace it with a message and abort. Tracked in upstream LLVM PR 22997 https://llvm.org/bugs/show_bug.cgi?id=22997 Submitted by: andrew
* Also define DWARF_FRAME_REGISTERS. This is used to size arrays, withoutandrew2015-03-261-1/+1
| | | | | | this exceptions could write over the stack. Sponsored by: The FreeBSD Foundation
* Adda minimal gcc config. This is just enough to build the bits of csu weandrew2015-03-242-0/+9
| | | | | | get from gcc, and libgcc_eh. Sponsored by: The FreeBSD Foundation
* FreeBSD expects _Unwind_GetGR, _Unwind_SetGR, and _Unwind_SetIP to beandrew2015-02-012-11/+24
| | | | | symbols and not macros. Make this so. This fixes a few ports that try to link against these functions but fail as they previously didn't exist.
* Allow -march=armv7a on the gcc command line, for compatibility with clang.ian2014-12-211-0/+2
| | | | | | | This will result in __ARM_ARCH_7A__ being defined during the compile. When compiling with gcc, it will still only generate armv6 opcodes itself, but should pass the arch to gas so that inline asm can use v7 opcodes.
* Pull in r174303 from upstream gcc trunk (by Jason Merrill):dim2014-12-042-27/+6
| | | | | | | | | | | | | | | | | PR c++/48211 * name-lookup.h (cp_class_binding): Make base a pointer. * name-lookup.c (new_class_binding): Adjust. (poplevel_class): Adjust. This fixes a potential segfault when compiling gold, a part of the devel/binutils port, with gcc. See also the upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211 Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving the use of this patch under the GNU GPL, version 2 or later. MFC after: 1 week
* Use the floating-point instruction on ARMv7 as the clang 3.5 integratedandrew2014-12-011-0/+15
| | | | | | | assembler doesn't allow these two instructions to use co-processor 11. MFC after: 1 Week Sponsored by: ABT Systems Ltd
* There is no need to use FUNC_END with aeabi_ldiv0 or aeabi_idiv0 as theyandrew2014-11-301-2/+0
| | | | | | are aliases. Sponsored by: ABT Systems Ltd
* Supplement r259111 by also using correct casts in gcc's emmintrin.h fordim2014-08-131-1/+1
| | | | | | | | | | | | | | | the first argument of the following builtin function: * __builtin_ia32_psrlqi128() takes __v2di instead of __v4si This should fix the following errors when building the graphics/webp port with base gcc: lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128' lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128' Reported by: Jos Chrispijn <ports@webrz.net> MFC after: 3 days
* Add FreeBSD to the list of environments that needs to handle R_ARM_TARGET2ian2014-07-221-1/+1
| | | | | | relocations in unwind data as pc-relative indirect references. MFC after: 1 week
* With the move away from GNATS, point end users to a better web pagegavin2014-06-141-1/+1
| | | | | | | detailing how to report bugs. Hat: bugmeister MFC after: 3 days
* gcc: fix strict alignment.pfg2014-05-021-1/+1
| | | | | | | | | | | | | | | From the OpenBSD log: x86-64 ABI requires arrays greater than 16 bytes to be aligned to 16byte boundary. However, GCC 16-byte aligns arrays of >=16 BITS, not BYTES. This diff improves bug detectability for code which has local arrays of [16 .. 127] bits: in those cases SSP will now detect even 1-byte overflows. Obtained from: OpenBSD (CVS rev 1.4) MFC after: 1 week
* gcc: define __block when block support is enabledpfg2014-04-041-1/+4
| | | | | | | | | | | This mimics the behaviour in clang and lets us build cleanly the libdispatch port on platforms where the base gcc is still the default compiler. Bump __FreeBSD_version for ports. Tested by: theraven MFC after: 3 days
* Similar to r211505 for x86, remove unneeded casts in inline assembly fordim2014-02-201-6/+6
| | | | | sparc64 from contrib/gcc/longlong.h, which are considered "heinous" GNU extensions by clang.
* Upgrade our copy of llvm/clang to 3.4 release. This version supportsdim2014-02-162-3/+3
| | | | | | | | | | | | | | | | | all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.4/docs/ReleaseNotes.html> <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html> MFC after: 1 month
* gcc: Add support for -Wmissing-prototypes in C++pfg2014-01-263-3/+13
| | | | | | | | | Support for warnings about missing prototypes in C++ was added by Apple GCC (Radar 6261539). Most of the code crept into r260311 so it felt natural to make use of it. Obtained from: Apple GCC - 5646 MFC after: 5 days
* gcc: Drop useless objc change from r260311.pfg2014-01-172-39/+0
| | | | | | | | | | | | Among some of the objc changes from Apple that crept into r260311, Radar 5355344 is incomplete and is not used since we don't carry ObjC in the base system. The dead code seems to have caused issues in some Tinderboxes so get rid of it altogether. Reported by: luigi MFC after: 9 days
* Fix gcc with EABI on big-endian ARM by setting the endian correctly.andrew2014-01-121-0/+3
| | | | | | Without this gcc would generate byte loads for a little-endian core. MFC after: 1 week
* Fix optimization bug.pfg2014-01-061-6/+11
| | | | | | | | | | | | | GCC-PR rtl-optimization/34628 * combine.c (try_combine): Stop and undo after the first combination if an autoincrement side-effect on the first insn has effectively been lost. The issue was detected in OpenBSD but their fix was not very good. Huge thanks to the upstream author, Eric Botcazou, for permitting the use of this patch under GPLv2. MFC after: 5 days
* gcc: backport some fixes from llvm-gccpfg2014-01-054-152/+196
| | | | | | | | | | | | | | | | | | | | llvm-gcc backported some patches from gcc trunk: http://gcc.gnu.org/ml/gcc-cvs/2007-05/msg00662.html http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00019.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00240.html http://gcc.gnu.org/ml/gcc-cvs/2007-08/msg00493.html The first two were always GPL2. The last two were added after the GPL3 transition, but were written by aaw@google.com and Rafael EspĂ­ndola got permission to relicense them under the GPL2 for inclusion in llvm-gcc. This fixes GCC-PR c++/31749 Obtained from: llvm-gcc (rev. 75463; GPLv2) MFC after: 2 weeks
* gcc: Add support for Apple's Block extensionpfg2014-01-0565-404/+10016
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block objects [1] are a C-level syntactic and runtime feature. They are similar to standard C functions, but in addition to executable code they may also contain variable bindings to automatic (stack) or managed (heap) memory. A block can therefore maintain a set of state (data) that it can use to impact behavior when executed. This port is based on Apple's GCC 5646 with some bugfixes from Apple GCC 5666.3. It has some small differences with the support in clang, which remains the recommended compiler. Perhaps the most notable difference is that in GCC that __block is not actually a keyword, but a macro. There will be workaround for this issue in a near future. Other issues can be consulted in the clang documentation [2] For better compatiblity with Apple's GCC and llvm-gcc some related fixes and features from Apple have been included. Support for the non-standard nested functions in GCC is now off by default. No effort was made to update the ObjC support since FreeBSD doesn't carry ObjC in the base system, but some of the code crept in and was more difficult to remove than to adjust. Reference: [1] https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html [2] http://clang.llvm.org/compatibility.html#block-variable-initialization Obtained from: Apple GCC 4.2 MFC after: 3 weeks
* libcpp: misc fixes from Apple's GCC.pfg2014-01-051-1/+3
| | | | | | | | | Fixes some bugs detected by Apple: #error with unmatched quotes pragma mark Obtained from: Apple GCC 4.2 - 5553 MFC after: 1 week
* Revert r260073; small diff reduction wrt gcc43 and Apple GCC.pfg2014-01-028-84/+41
| | | | | | | | Unfortunately this causes ICE on powerpc and sparc64. Reducing these differences against upstream is not important anymore so hopefully I have finished breaking the compiler occasionally.
* gcc: Fix issue with "unavailable" attribute.pfg2013-12-301-1/+3
| | | | | | While here, point where we dropped the support for objc from r260014. MFC after: 3 weeks
* gcc: small diff reduction wrt gcc43 and Apple GCC.pfg2013-12-308-41/+84
| | | | | Obtained from: gcc 4.3 (rev. 121464, 122528, 124106; GPLv2) MFC after: 3 weeks
* gcc: Add support for label attributes and "unavailable" attribute.pfg2013-12-2829-161/+753
| | | | | | | | | | | | | | | Apple GCC has extensions to support for both label attributes and an "unavailable" attribute. These are critical for objc but are also useful in regular C/C++. Apparently at least the label attributes might have found their way to upstream GCC but the code doesn't seem available on the GPLv2 tree so we are taking the code directly from Apple. To make this clearer we are preserving the annoying "APPLE LOCAL" tags and the ChangeLogs when they are available. Obtained from: Apple GCC 4.2 - 5531 MFC after: 3 weeks
* gcc: merge small upstream change.pfg2013-12-272-9/+23
| | | | | | | | | | | Backport from mainline: 2007-04-24 Hui-May Chang <hm.chang@apple.com> * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. Obtained from: gcc 4.3 (rev. r124115: GPLv2) MFC after: 1 week
* gcc: Implement -Wmost for compatibility with clang.pfg2013-12-263-1/+19
| | | | | | | This is equivalent to -Wall -Wno-parentheses. Obtained from: Apple GCC 4.2 - 5531 MFC after: 1 week
* gcc: small enhancements for the arm support.pfg2013-12-253-5/+123
| | | | | | | | | Very small updates: fixes GCC-PR target/31152 Tested by building the cross-compiler. Obtained from: gcc 4.3 (rev. r118461, 125973: GPLv2) MFC after: 2 weeks
* gcc: Add ability to generate DWARF pubtypes section ifpfg2013-12-244-50/+152
| | | | | | | | DEBUG_PUBTYPES_SECTION is defined. Obtained from: gcc 4.3 (rev. 118826; GPLv2) MFC after: 2 weeks
* gcc: warnings from -Wformat-securitypfg2013-12-211-2/+2
| | | | | | | Minor mismatch in r259666. Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) MFC after: 1 week
* gcc: clean some warnings from -Wformat-securitypfg2013-12-2013-24/+24
| | | | | Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921) MFC after: 1 week
* Revert r259619:pfg2013-12-2018-434/+61
| | | | | | | | | Fixes GCC libstdc++/29286 The fix seems to work for amd64 but causes segfaults on powerpc. At this time gcc is much more important on powerpc than on amd64. Reported by: andreast
* gcc: revert Rvalue references.pfg2013-12-2011-498/+105
| | | | | | They are very useful but at this time I prefer not to figure out some minor conflicts with the bigger Apple's blocks support patch that is being worked on for current.
* gcc: merge upstream fix and new feature.pfg2013-12-2012-107/+506
| | | | | | | | | | Fix for PR c++/29928 Add support for Rvalue references as described here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html Obtained from: gcc 4.3 (rev. 124724, 125211; GPLv2) MFC after: 2 weeks
* gcc: more diff reductions against Apple GCC.pfg2013-12-2012-11/+58
| | | | | | | Mostly cosmetical changes to aid further merges. Obtained from: gcc 4.3 (rev. 120611, 124839; GPLv2) MFC after: 1 week
* gcc: backport upstream fix for issue with C++'s placement newpfg2013-12-1918-61/+434
| | | | | | | Fixes GCC libstdc++/29286 Obtained from: gcc 4.3 (rev. 125603, 125653; GPLv2) MFC after: 2 weeks
* gcc: add Apple compatible -Wnewline-eofpfg2013-12-181-1/+1
| | | | | | Fix document: "Apple compatible" suits better the origin. MFC after: 1 week
* gcc: add Apple compatible -Wnewline-eofpfg2013-12-183-0/+20
| | | | | | | | | | | | | | GCC 4.2 and previous have always warned about "No newline at end of file". Upstream GCC removed the warning completely but Apple made it an optional warning. Adopt it for compatibility with older GCC and clang. While here, add comment to complement r258712. Obtained from: Apple Inc. (Apple GCC 4.2 - 5531) MFC after: 1 week
* gcc: point to our address for bug reports.pfg2013-12-181-1/+1
| | | | | | | | | | As recommended by the FSF in gcc/version.c : "If you distribute a modified version of GCC, please change this to refer to a document giving instructions for reporting bugs to you, not us." MFC after: 2 weeks
* gcc: small merges from upstreampfg2013-12-178-31/+113
| | | | | | | | | | | | Solves GCC issues: PR middle-end/32602 PR middle-end/32603 Updates the to documentation and processing improvement. Obtained from: gcc 4.3 (rev. 119427, 126278, 126422; GPLv2) MFC after: 2 weeks
* gcc: fix ICE in rs600 when using -fno-trapping-math.pfg2013-12-171-2/+3
| | | | | | | Solve build issue with previous change. Obtained from: gcc 4.3 (rev. 120902; GPLv2) MFC after: 2 weeks
* gcc: fix ICE in rs600 when using -fno-trapping-math.pfg2013-12-172-2/+16
| | | | | | | Solves GCC-PR target/30485 Obtained from: gcc 4.3 (rev. 120902; GPLv2) MFC after: 2 weeks
OpenPOWER on IntegriCloud