summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260310:pfg2014-01-121-1/+3
| | | | | | | | | | libcpp: misc fixes from Apple's GCC. Fixes some bugs detected by Apple: #error with unmatched quotes pragma mark Obtained from: Apple GCC 4.2 - 5553
* MFC r259920:pfg2014-01-123-1/+19
| | | | | | | | gcc: Implement -Wmost for compatibility with clang. This is equivalent to -Wall -Wno-parentheses. Obtained from: Apple GCC 4.2 - 5531
* MFC r260361:pfg2014-01-111-6/+11
| | | | | | | | | gcc: Fix optimization bug. 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.
* MFC r259873:pfg2014-01-083-5/+123
| | | | | | | | gcc: small enhancements for the arm support. fixes GCC-PR target/31152 Obtained from: gcc 4.3 (rev. r118461, 125973: GPLv2)
* MFC r259841pfg2014-01-074-50/+152
| | | | | | | gcc: Add ability to generate DWARF pubtypes section if DEBUG_PUBTYPES_SECTION is defined. Obtained from: gcc 4.3 (rev. 118826; GPLv2)
* MFC r259655 (partial), r259944:pfg2014-01-034-11/+31
| | | | | | | | | | | | | | gcc: merge small upstream changes. Fix for PR c++/29928 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, 124724: GPLv2)
* MFC r259525, r259526, r259529pfg2013-12-319-34/+131
| | | | | | | | | | | | | | | | gcc: small merges from upstream fix ICE in rs6000 when using -fno-trapping-math. Solves GCC-PR target/30485 Solve GCC issues: PR middle-end/32602 PR middle-end/32603 Updates the to documentation and processing improvement. Obtained from: gcc 4.3 (rev. 120902, 120902, 119427, 126278, 126422; GPLv2)
* MFC r259005, r259092:pfg2013-12-3015-54/+202
| | | | | | | | | gcc: Add -flax-vector-conversions gcc: new fvisibility-ms-compat option These are useful for compatibility with newwer gcc and clang. Obtained from: gcc 4.3 (rev. 120572, 120688, 126088; GPLv2)
* MFC r259666, r259696:pfg2013-12-2813-24/+24
| | | | | | gcc: warnings from -Wformat-security Obtained from: Apple GCC 4.2 - 5646 (Radar 5764921)
* gcc: Merge upstream changes.pfg2013-12-2716-19/+79
| | | | | | | | Include types in error message for build_binary_op. Mostly cosmetic changes, to reduce differences with Apple's gcc. Obtained from: gcc 4.3 (rev. 120611, 124839, 125239; GPLv2)
* MFC r258826, r259555, r 259558:pfg2013-12-253-0/+20
| | | | | | | | | | | | | | | libcpp: Merge fixes from upstream Fixes: GCC preprocessor/29966: GCC preprocessor/28709: GCC c/31924 GCC preprocessor/14331 gcc: add Apple-compatible -Wnewline-eof Obtained from: gcc per-4.3 (rev. 121340, 124356, 124358, 124730, 125212, 125255 ; GPLv2) Apple Inc. (Apple GCC 4.2 - 5531)
* MFC r258017, r258429, r258748, r258817:pfg2013-12-2115-83/+175
| | | | | | | | Merge updates from FSF pre4.3 GCC inspired on Apple's gcc: Updates to libiberty and mangling. New align attribute. Merge Apple updates to libstdc++.
* MFC r258731:pfg2013-12-195-32/+59
| | | | | | | | | | gcc: Make use of TREE_OVERFLOW_P. While it was brought in r258179 only to fix a build issue, bringing the rest of the change has the advantage of fixing GCC/19978. Obtained from: gcc 4.3 (rev. 120505; GPLv2)
* MFC r258651, r258943:pfg2013-12-192-100/+133
| | | | | | | | gcc: Altivec register adjustments from Apple. gcc: On rs6000 update sp_offset depending only on size. Tested by: Justin Hibbits Obtained from: gcc pre-4.3 (rev. 124763, 125116; GPLv2)
* MFC r258428, r258445pfg2013-12-1846-428/+804
| | | | | | | | | | | | | | | | | | | | | | | | | gcc: another round of merges from the gcc pre-43 branch. Bring The following revisions from the gcc43 branch[1]: 118360, 118361, 118363, 118576, 119820, 123906, 125246, and 125721. They all have in common that the were merged long ago into Apple's gcc and should help improve the general quality of the compiler and make it easier to bring new features from Apple's gcc42. For details please review the additions to the files: gcc/ChangeLog.gcc43 gcc/cp/ChangeLog.gcc43 (new, adds previous revisions) Fix crosscompilation (r258445 by andreast) Reference: [1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700 Obtained from: gcc pre4.3 (GPLv2) branch MFC after: 3 weeks
* MFC rr258501, r258507;pfg2013-12-1519-143/+1574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc: Bring updates from Google's enhanced gcc-4.2.1. Google released and enhanced version of gcc-4.2.1 plus their local patches for Android[1]. The patches are owned by Google and the license hasn't been changed from the original GPLv2. We are only bringing a subset of the available patches that may be helpful in FreeBSD, in other words, changes specific to android are not included. From the README.google file[1]. Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1: gcc/Makefile.in gcc/c-common.c gcc/c-common.h gcc/c-opts.c gcc/c-typeck.c gcc/cp/typeck.c gcc/doc/invoke.texi gcc/flags.h gcc/opts.c gcc/tree-flow.h gcc/tree-ssa-alias-warnings.c gcc/tree-ssa-alias.c Backport of -Wstrict-aliasing from mainline. Silvius Rus <rus@google.com> gcc/coverage.c: Patch coverage_checksum_string for PR 25351. Seongbae Park <spark@google.com> Not yet submitted to FSF. gcc/c-opts.c gcc/c-ppoutput.c gcc/c.opt gcc/doc/cppopts.texi libcpp/Makefile.in libcpp/directives-only.c libcpp/directives.c libcpp/files.c libcpp/include/cpplib.h libcpp/init.c libcpp/internal.h libcpp/macro.c Support for -fdirectives-only. Ollie Wild <aaw@google.com>. Submitted to FSF but not yet approved. libstdc++-v3/include/ext/hashtable.h http://b/742065 http://b/629994 Reduce min size of hashtable for hash_map, hash_set from 53 to 5 libstdc++-v3/include/ext/hashtable.h http://b/629994 Do not iterate over buckets if hashtable is empty. gcc/common.opt gcc/doc/invoke.texi gcc/flags.h gcc/gimplify.c gcc/opts.c Add Saito's patch for -finstrument-functions-exclude-* options. gcc/common.opt gcc/doc/invoke.texi gcc/final.c gcc/flags.h gcc/opts.c gcc/testsuite/gcc.dg/Wframe-larger-than.c Add a new flag -Wframe-larger-than- which enables a new warning when a frame size of a function is larger than specified. This patch hasn't been integrated into gcc mainline yet. gcc/tree-vrp.c Add a hack to avoid using ivopts information for pointers starting at constant values. Reference: [1] https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/ Obtained from: Google Inc.
* MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,pfg2013-12-1227-249/+970
| | | | | | | | | | | | | | | | | | | | | r258206, r258207, r258321 This is a series of commits inspired on Google's gcc-4.2.1 for Android that were taken from the gcc pre-4.3 under the GPLv2. gcc: Backport fixes for -W parentheses in C++ This fixes GCC 19564. gcc: merge rs6000 change from FSF pre-gcc43 Don't set MASK_PPC_GFXOPT for 8540 or 8548. Merge vrp-tree fix from gcc-4.3 Fix missed conversion from / to >> (GCC PR32521) Merge in GCCr120505 to include definition of TREE_OVERFLOW_P gcc: warn about integer overflow in constant expressions in the C++ frontend. gcc: Add a new option -Wvla to warn variable length array. libcpp: preprocessor speedup patches from upstream gcc. gcc: add femit-struct-debug support to reduce Reduce dwarf debug size gcc: Fix postreload-gcse treatment of call-clobbered registers. gcc: Record some previous commits in the ChangeLog.gcc43 file.
* MFC r259111:dim2013-12-111-3/+3
| | | | | | | | | | | | | | | | | Use correct casts in gcc's emmintrin.h for the first arguments of the following builtin functions: * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi * __builtin_ia32_psradi128() takes __v4si instead of __v8hi This should fix the following errors when building the LINT kernel with gcc: sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of '__builtin_ia32_psradi128' sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of '__builtin_ia32_pslldi128'
* On ARM EABI double precision floating point values are stored in theandrew2013-09-071-1/+1
| | | | | | endian the CPU is in, i.e. little-endian on most ARM cores. This allows ARMv4 and ARMv5 boards to boot with the ARM EABI.
* add support to gcc for AES and PCLMUL intrinsics... This addes thejmg2013-09-035-6/+26
| | | | | | | | -maes option, but not the -mpclmul option as I ran out of bits in the 32 bit flags field... You can -D__PCLMUL__ to get this, but it won't be compatible w/ clang and modern gcc... Reviewed by: -current, -toolchain
* Add support for the GCC binary integer constants extension.pfg2013-08-312-0/+29
| | | | | | | | | | This is required to build the i965 backend with newer versions of mesa. Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2; also taken from there in OpenBSD. Obtained from: gcc 4.3 (rev. 125346; GPLv2) MFC after: 5 days
* Implement _Unwind_GetIP and _Unwind_GetIPInfo as functions as that is whatandrew2013-08-312-0/+21
| | | | we expect on FreeBSD. The implementation is based on the existing macros.
* Bring in gcc r128087 to add support for _Unwind_Backtrace on ARM. This isandrew2013-08-313-1/+69
| | | | prior to the licence change so is under the GPLv2.
* gcc: configuration fix.pfg2013-06-241-2/+2
| | | | | | | | | -Fix configuration support for FreeBSD 10 and 11. Note this change is based on GCC-SVN-131197 with permission by gerald@ . Reported by: jmallet
* gcc: add some configuration and references.pfg2013-06-243-5/+15
| | | | | | | | | | | | -Add configure support for FreeBSD 10 and 11. -Adapt a threading fix to gnu POSIX95 (which we don't use). -Refer to a bug fix for the disabled vrptree support. This is all useless in our current build but it is included for convenience in case someone may want to re-package our older gcc. Reviewed by: gerald (long ago)
* Pull in r183984 from llvm trunk:dim2013-06-201-12/+0
| | | | | | | | | | | | | Make PrologEpilogInserter save/restore all callee saved registers in functions which call __builtin_unwind_init() __builtin_unwind_init() is an undocumented gcc intrinsic which has this effect, and is used in libgcc_eh. Goes part of the way toward fixing PR8541. This obsoletes the ugly hack to libgcc's unwind code from r245272, and should also work for other arches, so revert the hack too.
* GCC: bring back experimental support for amdfam10/barcelona CPUs.pfg2013-06-0115-165/+1515
| | | | | | | | | | | | | Initial support for the AMD amdfam10 chipsets has been available in the gcc43 branch under GPLv2. AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10 support and made it available. This is a revised subset of the support initially brought in in r236962 and later reverted. The collateral efects seem to have disappeared but it is still recommended to set the CPUTYPE with caution. Reviewed by: jkim (ages ago) MFC after: 3 weeks
* Add support for "d" floating-point suffix, as defined by draft N1312pfg2013-05-121-0/+7
| | | | | | | | | of TR 24732. Emit pedantic warning if the feature is being used. Should solve GCC bug 39027. Obtained from: OpenBSD MFC after: 2 weeks
* Update the gcc43 changelog.pfg2013-05-121-0/+4
| | | | | | | | | The issue solved in r250392 actually originated upstream and was fixed in upstream gcc43 branch in 2006/10/24 (under GPLv2). Register it in the appropriate ChangeLog for reference. MFC after: 3 days
* For some reason, the gcc intrinsics header tmmintrin.h was imported withdim2013-05-081-224/+0
| | | | | | two copies of itself pasted together. Remove the extraneous copy. MFC after: 3 days
* Add #undef TARGET_DEFAULT back as it shouldn't have been removed in r245539andrew2013-02-041-0/+1
|
* Allow the unwind functions int libgcc_s to interact correctly with libthr.andrew2013-02-041-2/+2
| | | | | | | | | | | | | | | | | | | _Unwind_ForcedUnwind in libgcc_s takes as one of it's parameters a stop function to tell it when to stop unwinding. One of the stop function's parameters is a _Unwind_Exception_Class. On most architectures this is an int64_t, however on ARM EABI the gcc developers have made this a char array with 8 items. While both of these take the same space they are passed into the stop function differently, an int64_t is passed in in registers r2 and r3, while the char[8] is passed in as a pointer to the first item in register r2. Because libthr expects the value to be an int64_t we would get incorrect results when it passes a function that take an int64_t but libgcc passes in a pointer to a char array including crashing. The fix is to update libgcc_s to make it pass an int64_t to the stop function and to libstdc++ as it expects _Unwind_Exception_Class to be an array.
* Clean some 'svn:executable' properties in the tree.pfg2013-01-263-0/+0
| | | | | Submitted by: Christoph Mallon MFC after: 3 days
* Add compiler support for the ARM EABI.andrew2013-01-171-3/+27
| | | | | | ARM EABI support is disabled by default and can be enabled by setting WITH_ARM_EABI when building, however only the kernel-toolchain target will work with this flag until the rest of the support is added.
* Switch the default CPU to an arm9. This removes compiler support for theandrew2013-01-141-1/+1
| | | | | unsupported 26-bit addressing mode. This change is required for moving to the ARM EABI.
* Add an ugly hack to libgcc's unwind code, to make it behave properly atdim2013-01-101-0/+12
| | | | | | | | | | | | | | | | | runtime on amd64, when it is compiled by clang. Some versions of clang don't save and restore all callee registers, if a __builtin_eh_return() intrinsic is used in a function. This is particularly bad on amd64. Until the problem gets fixed by upstream, use an asm statement to force clang to assume the registers in question are clobbered, when invoking __builtin_eh_return(), so it will emit code to save and restore them. This should fix the crashes reported on -current with some C++ programs, particularly those that throw exceptions over multiple function boundaries. Reported by: stefanf MFC after: 3 days
* gcc: avoid generating negative values to DW_AT_byte_size.pfg2012-12-281-1/+1
| | | | | | | | The previous change was actually a NOP because size is unsigned and compilers are dumb. Submitted by: Christoph Mallon MFC after: 1 week
* gcc: avoid generating negative values to DW_AT_byte_size.pfg2012-12-281-3/+3
| | | | | | | | | | | | | | | | | There is a bug in gcc (GCC/35998) where dwarf reports sizes of unsigned -1 (0xffffffff). On NetBSD this generated a faulty CTF entry which then caused a segfault in ctfmerge. The issue was worked around in NetBSD's Dtrace but since the issue originated in gcc, it seems reasonable to fix it here. Upstream gcc has been slow to react to this issue and the author that submitted the patch is not interested in licensing the change to us, so I did an independent workaround for the issue. MFC after: 1 week
* Don't define CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP on arm whenandrew2012-12-151-0/+2
| | | | | | | | | | | | | | | | | built with clang. When these are defined the lists are defined similar to: asm(".section .ctors"); STATIC func_ptr __CTOR_LIST__[1] = { (func_ptr) (-1) }; asm(".section .dtors"); STATIC func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }; The problem is clang will move the two arrays out of the .ctors and .dtors sections causing these sections to contain a single null address. By not defining these macros we use the version of the code that places the arrays is their sections by using __attribute__((section(".ctors"))) and similar for .dtors. Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>
* Fix a comment in an asm block to work with compilers other than GCCandrew2012-12-151-1/+1
|
* Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS ineadler2012-12-061-2/+2
| | | | | | | | | | | | share/mk/sys.mk instead. This is part of a medium term project to permit deterministic builds of FreeBSD. Submitted by: Erik Cederstrand <erik@cederstrand.dk> Reviewed by: imp, toolchain@ Approved by: cperciva MFC after: 2 weeks
* Follow clang lead and include mm_malloc.h only in hosted configurations.kan2012-10-271-0/+2
| | | | | | | This makes the use of intrinsics easier in kernel environment, according to the submitter. Requested by: jmg
* Merging of projects/armv6, part 3gonzo2012-08-151-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | r238211: Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb This adds a new TARGET_ARCH for building on ARM processors that support the ARMv6K multiprocessor extensions. In particular, these processors have better support for TLS and mutex operations. This mostly touches a lot of Makefiles to extend existing patterns for inferring CPUARCH from ARCH. It also configures: * GCC to default to arm1176jz-s * GCC to predefine __FreeBSD_ARCH_armv6__ * gas to default to ARM_ARCH_V6K * uname -p to return 'armv6' * make so that MACHINE_ARCH defaults to 'armv6' It also changes a number of headers to use the compiler __ARM_ARCH_XXX__ macros to configure processor-specific support routines. Submitted by: Tim Kientzle <kientzle@freebsd.org>
* Pass --enable-new-dtags to the linker invocation by default. Ifkib2012-07-157-4/+7
| | | | | | | | | | | | desired, one can turn off the generation of post-ELF standard dtags by overriding it with --disable-new-dtags after the default switch. Immediate effect of the change is that -rpath path is now stored both in DT_RPATH and DT_RUNPATH tags, which is the right way to provide rpath for dynamic linker supporting DT_RUNPATH per specification. Reviewed by: kan MFC after: 1 month
* Bring a couple of fixes for gcc optimizations.pfg2012-06-215-10/+45
| | | | | | | | | | | | | | The GCC4.3 branch contains some optimization fixes that were not considered regressions and therefore were never backported. We are bringing a couple of them that are under GPLv2 since they were made before the license switch upstream. While here, add the GCC revision numbers in the log. Discussed with: jkim MFC after: 1 week
* Merge r236137 from x86:marius2012-06-141-0/+1
| | | | Enable GNU hash generation for dynamic ELF binaries.
* Revert r236962 - Experimental amdfam10/barcelona support.pfg2012-06-1320-1724/+493
| | | | | | | | The patches are unexpectedly causing gcc to fail while building ports/graphics/ImageMagick even when the cpu flags are not used. Reported by: Andreas Tobler
* Space mismatch - typo in r236962.pfg2012-06-121-1/+1
| | | | | | Found by: Dima Panov Approved by: jhb (mentor) MFC after: 2 weeks
* Add experimental support for amdfam10/barcelona from the GCC 4.3 branch.pfg2012-06-1220-493/+1724
| | | | | | | | | | | | | | | | | | | Initial support for the AMD barcelona chipsets has been available in the gcc43 branch under GPLv2 but was not included when the Core 2 support was brought to the system gcc. AMD and some linux distributions (OpenSUSE) did a backport of the amdfam10 support and made them available. Unfortunately this is still experimental and while it can improve performance, enabling the CPUTYPE may break some C++ ports (like clang). Special care was taken to make sure that the patches predate the GPLv3 switch upstream. Tested by: Vladimir Kushnir Reviewed by: mm Approved by: jhb (mentor) MFC after: 2 weeks
* Merge r236137 from x86:marius2012-05-301-2/+4
| | | | | | | Enable GNU hash generation for dynamic ELF binaries. While at it, sync the order of options with x86 and pass along the verbose flag.
OpenPOWER on IntegriCloud