summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Enable gnu hash generation for dynamic ELF binaries on x86.kib2012-05-272-0/+2
| | | | Reviewed by: kan
* Revert r235797. GCC's mis-assumptions has led to incorrect usage ofobrien2012-05-231-4/+0
| | | | "%q[diouxX]" within FreeBSD sources.
* Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms.obrien2012-05-221-0/+4
|
* Bring in a subset of gcc fixes that were back ported topfg2012-05-1810-99/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the GCC 4.1 branch and are available under GPLv2. 2007-11-07 Eric Botcazou <ebotcazou@libertysurf.fr> PR rtl-optimization/33822 * rtl.h (REG_OFFSET): Fix comment. * var-tracking.c (INT_MEM_OFFSET): New macro. (var_mem_set): Use it. (var_mem_delete_and_set): Likewise. (var_mem_delete): Likewise. (vt_get_decl_and_offset): Likewise. (offset_valid_for_tracked_p): New predicate. (count_uses): Do not track locations with invalid offsets. (add_uses): Likewise. (add_stores): Likewise. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129972 2007-11-16 Richard Guenther <rguenther@suse.de> PR middle-end/34030 * fold-const.c (fold_binary): Use correct types for folding 1 << X & Y to Y >> X & 1. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130242 2008-01-14 Eric Botcazou <ebotcazou@adacore.com> PR rtl-optimization/31944 * cse.c (remove_pseudo_from_table): New function. (merge_equiv_classes): Use above function to remove pseudo-registers. (invalidate): Likewise http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131524 2008-01-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Backport: 2007-11-07 Kenneth Zadeck <zadeck@naturalbridge.com> PR middle-end/33826 * ipa-pure-const (static_execute): Added code to keep recursive functions from being marked as pure or const. * ipa-utils (searchc): Fixed comment. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131807 2008-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Backport: 2007-08-02 Nathan Froyd <froydnj@codesourcery.com> PR middle-end/25445 * varasm.c (default_binds_local_p_1): Consult flag_whole_program if we are compiling with -fPIC. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132061 2008-02-04 Richard Guenther <rguenther@suse.de> PR middle-end/33631 * expr.c (count_type_elements): Give for unions instead of guessing. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132101 2008-02-14 Alan Modra <amodra@bigpond.net.au> PR target/34393 * config/rs6000/rs6000.md (restore_stack_block): Force operands[1] to a reg. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132309 2008-03-25 Richard Guenther <rguenther@suse.de> Backport from mainline: 2008-02-12 Richard Guenther <rguenther@suse.de> PR middle-end/35163 * fold-const.c (fold_widened_comparison): Use get_unwidened in value-preserving mode. Disallow final truncation. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133509 2008-11-30 Eric Botcazou <ebotcazou@adacore.com> PR target/38287 * config/sparc/sparc.md (divsi3 expander): Remove constraints. (divsi3_sp32): Add new alternative with 'K' for operand #2. (cmp_sdiv_cc_set): Factor common string. (udivsi3_sp32): Add new alternative with 'K' for operand #2. Add TARGET_V9 case. (cmp_udiv_cc_set): Factor common string. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142298 Reviewed by: mm Approved by: jhb (mentor) MFC after: 1 week
* Unbreak jemalloc build with MALLOC_PRODUCTION set. New jemalloc versiongonzo2012-04-301-2/+26
| | | | | | | | uncovered MIPS-related gcc bug described in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33256 The patch was obtained from r128198 in gcc-4_1-branch, which is GPLv2, so it's OK to merge it.
* Fix a typo in GCC affecting calculations with -ffast-math.pfg2012-04-052-1/+6
| | | | | | | | | | The fix is similar to the one applied in GCC-4.3 in GCCSVN-r117929 under the GPLv2. Submitted by: Andrey Simonenko Reviewed by: mm Approved by: jhb (mentor) MFC after: 3 days
* Disable IRIX compatibility flags for DWARF code generator. IRIX-compatiblegonzo2012-03-231-1/+2
| | | | DWARF code is not compatible with CTF tools
* Implement -print-file-name=include (which is undocumentedkientzle2012-02-101-0/+11
| | | | | | | | | | | | but used by some Linux boot loaders). This option prints out the directory holding the include files needed by a freestanding program. The default implementation of this doesn't work on FreeBSD because of the different include file layout. But it's easy to implement: just return /usr/include (or the cross-compiling equivalent). Reviewed by: kan MFC after: 1 week
* Silence a warning about redefinition of TARGET_ELF on powerpc.andreast2012-01-061-0/+1
|
* Clean an inconsistency with -ffinite-math-only.pfg2011-12-212-7/+15
| | | | | | | | | | | | Backported from the gcc-4_3-branch, revision 118001, under the GPLv2. This issue was also fixed in Apple's gcc. PR: 157025 Reviewed by: mm Approved by: jhb (mentor) MFC: 2 weeks
* Rename the linker emulation name for powerpc and powerc64. This is needed thatandreast2011-11-191-1/+1
| | | | | we can also use the upstream binutils linker where we have to have a unique name for the FreeBSD emulation.
* Copy over the ASM_DECLARE_FUNCTION_SIZE macro from linux64.h. This macroandreast2011-11-161-0/+19
| | | | | | | | | | | | | | | | | | | | | declares the proper size of a function. Without this macro recent GNU as will complain about with: 'Error: .size expression for main does not evaluate to a constant.' Up to now we produce this: .L.main: .... .size main, .-main With the macro defined the output is this: .L.main: .... .size main,.-.L.main This affects only the 64-bit compiler. Tested with world and kernel on both, 32 and 64-bit powerpc.
* Import gcc fix for -fstack-protector that produces segfaultingfabient2011-11-091-2/+4
| | | | | | | | | | binaries on arm/armel. Related gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35965 PR: 161128 MFC after: 1 week
* * Don't give the impression that this compiler is GPLv3.obrien2011-10-242-2/+2
| | | | | | (It is "well known" that GCC 4.2.2 is GPLv3.) * Don't give the impression that this compiler isn't "trustable". * Fix dependency nit.
* Adjust posix_memalign() prototype to match what we define in stdlib.h forstefanf2011-10-161-1/+1
| | | | | | C++ compilation. PR: standards/147210
* Fix accidential dos-style endings to unix-style line endingsmm2011-07-301-6/+6
| | | | | | from last commit (r224523) to match the version approved by re@ Approved by: re (implicit)
* Fix invalid assertion of C++ external static data member declarationsmm2011-07-302-1/+7
| | | | | | | | | | | as anonymous namespaces are local to the current translation. GCC PR: c++/33094 Reviewed by: uqs Approved by: re (kib) Obtained from: gcc (branches/redhat/gcc-4_1-branch, rev. 129554, GPLv2) MFC after: 1 week
* - Fix typo in check_for_nested_with_variably_modified presentuqs2011-07-014-1/+15
| | | | | | | | | | - Implement -Wvariable-decl. - Port -Wtrampolines support from gcc3. (all three also via OpenBSD) PR: gnu/127136, gnu/157019 Submitted by: Henning Petersen, Pedro Giffuni MFC after: 6 weeks
* Fix clang warnings.benl2011-06-184-9/+20
| | | | Approved by: philip (mentor)
* Fix clang warnings.benl2011-05-226-18/+16
| | | | Approved by: philip (mentor)
* Fix clang warnings.benl2011-05-193-15/+15
| | | | Approved by: philip (mentor)
* Fix clang warnings.benl2011-05-181-2/+2
| | | | Approved by: philip (mentor)
* Add ChangeLog.gcc43 for backported changes from gcc 4.3mm2011-04-301-0/+163
| | | | MFC after: 3 days
OpenPOWER on IntegriCloud