Commit Graph

1426 Commits

Author SHA1 Message Date
H.J. Lu cb78b51ca0 IA MCU psABI support: changes to libraries
Patch in the bottom adds support of IA MCU psABI to libgcc (enables
soft-fp) and libdecnumber (enables it for IA MCU).

config/

	* dfp.m4 (enable_decimal_float): Also set to yes for
	i?86*-*-elfiamcu target.

gcc/

	* configure: Regenerated.

libdecnumber/

	* configure: Regenerated.

libgcc/

	* config.host: Support i[34567]86-*-elfiamcu target.
	* config/t-softfp-sfdftf: New file.
	* config/i386/32/t-iamcu: Likewise.
	* configure: Regenerated.

From-SVN: r225198
2015-06-30 09:42:07 -07:00
Jack Howarth 005f915e16 re PR target/66509 (the new clang-based assembler in Xcode 7 on 10.11 fails on the libjava/java/lang/reflect/natArray.cc file from FSF gcc 5.1 at -m32)
PR target/66509
	* configure.ac: Fix filds and fildq test for 64-bit.
	* configure: Regenerated.

From-SVN: r225158
2015-06-30 02:10:43 +00:00
Andreas Krebbel 45901378cd S/390 Vector ABI GNU Attribute.
gcc/
	* config/s390/s390.c (s390_vector_abi): New variable definition.
	(s390_check_type_for_vector_abi): New function.
	(TARGET_ASM_FILE_END): New macro definition.
	(s390_asm_file_end): New function.
	(s390_function_arg): Call s390_check_type_for_vector_abi.
	(s390_gimplify_va_arg): Likewise.
	* configure: Regenerate.
	* configure.ac: Check for .gnu_attribute Binutils feature.

gcc/testsuite/
	* gcc.target/s390/vector/vec-abi-1.c: Add gnu attribute check.
	* gcc.target/s390/vector/vec-abi-attr-1.c: New test.
	* gcc.target/s390/vector/vec-abi-attr-2.c: New test.
	* gcc.target/s390/vector/vec-abi-attr-3.c: New test.
	* gcc.target/s390/vector/vec-abi-attr-4.c: New test.
	* gcc.target/s390/vector/vec-abi-attr-5.c: New test.
	* gcc.target/s390/vector/vec-abi-attr-6.c: New test.

From-SVN: r224867
2015-06-24 06:36:46 +00:00
H.J. Lu fee22a8053 Check CXXFLAGS, instead of CFLAGS, for NO_PIE_CFLAGS
* configure.ac (NO_PIE_CFLAGS): Check CXXFLAGS instead of CFLAGS.
	* configure: Regenerated.

From-SVN: r223899
2015-05-31 05:06:06 -07:00
Andreas Tobler 384d8786cd configure.ac: Move the atoll check from AC_CHECK_FUNCS to gcc_AC_CHECK_DECLS.
2015-05-28  Andreas Tobler  <andreast@gcc.gnu.org>

    * configure.ac: Move the atoll check from AC_CHECK_FUNCS to
    gcc_AC_CHECK_DECLS.
    * configure: Regenerate.

From-SVN: r223847
2015-05-28 22:37:05 +02:00
H.J. Lu 428b381275 Add --enable-default-pie option to GCC configure
Add --enable-default-pie option to configure GCC to generate PIE by
default.

gcc/

	* Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@.
	(BUILD_CFLAGS): Likewise.
	(BUILD_CXXFLAGS): Likewise.
	(LINKER): Add @NO_PIE_FLAG@.
	(BUILD_LDFLAGS): Likewise.
	(libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for
	--enable-default-pie.
	* common.opt (fPIE): Initialize to -1.
	(fpie): Likewise.
	(no-pie): New option.
	(pie): Replace "Negative(shared)" with "Negative(no-pie)".
	* configure.ac: Add --enable-default-pie.
	(NO_PIE_CFLAGS): New.  Check if -fno-PIE works.  AC_SUBST.
	(NO_PIE_FLAG): New.  Check if -no-pie works.  AC_SUBST.
	* defaults.h (DEFAULT_FLAG_PIE): New.  Default PIE to -fPIE.
	* gcc.c (NO_PIE_SPEC): New.
	(PIE_SPEC): Likewise.
	(NO_FPIE1_SPEC): Likewise.
	(FPIE1_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE2_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE_SPEC): Likewise.
	(NO_FPIE_SPEC): Likewise.
	(NO_FPIC1_SPEC): Likewise.
	(FPIC1_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC2_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC_SPEC): Likewise.
	(NO_FPIC_SPEC): Likewise.
	(NO_FPIE1_AND_FPIC1_SPEC): Likewise.
	(FPIE1_OR_FPIC1_SPEC): Likewise.
	(NO_FPIE2_AND_FPIC2_SPEC): Likewise.
	(FPIE2_OR_FPIC2_SPEC): Likewise.
	(NO_FPIE_AND_FPIC_SPEC): Likewise.
	(FPIE_OR_FPIC_SPEC): Likewise.
	(LD_PIE_SPEC): Likewise.
	(LINK_PIE_SPEC): Handle -no-pie.  Use PIE_SPEC and LD_PIE_SPEC.
	* opts.c (finish_options): Update opts->x_flag_pie if it is -1.
	* config/darwin.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	(LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC.
	* config/darwin9.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
	PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined.
	* config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and
	FPIE2_OR_FPIC2_SPEC.
	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
	* gcc/config/sol2.h (ASM_PIC_SPEC): Likewise.
	* config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise.
	* config/m32r/m32r.h (ASM_SPEC): Likewise.
	* config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC32): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/freebsd.h (ASM_SPEC): Likewise.
	* config/sparc/linux.h (ASM_SPEC): Likewise.
	* config/sparc/linux64.h (ASM_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/sparc/openbsd64.h (ASM_SPEC): Likewise.
	* config/sparc/sp-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sp64-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sparc.h (ASM_SPEC): Likewise.
	* config/sparc/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/vxworks.h (ASM_SPEC): Likewise.
	* config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC,
	FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC.
	* config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC.
	* config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC,
	NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC.
	(ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC.
	* config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and
	NO_FPIC_SPEC.
	* config/mips/gnu-user.h (NO_SHARED_SPECS): Use
	NO_FPIE_AND_FPIC_SPEC.
	* config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC.
	* config/rs6000/freebsd64.h (ASM_SPEC32): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/vax/linux.h (ASM_SPEC): Likewise.
	* doc/install.texi: Document --enable-default-pie.
	* doc/invoke.texi: Document -no-pie.
	* config.in: Regenerated.
	* configure: Likewise.

gcc/ada/

	* gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.

libgcc/

	* Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS).

From-SVN: r223796
2015-05-27 19:36:55 -07:00
Jason Merrill ff771de3b4 re PR bootstrap/66304 (Can't bootstrap on x86_64-linux-gnu with gcc 4.3.4)
PR bootstrap/66304
config/
	* warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
	(ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
	(ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
	(ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
	(ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
gcc/
	* configure.ac: Use ACX_PROG_CXX_WARNING_OPTS,
	ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC, and
	ACX_PROG_CXX_WARNINGS_ARE_ERRORS.
	* configure: Regenerate.

From-SVN: r223763
2015-05-27 12:09:18 -04:00
Jason Merrill a47162104f configure.ac: Set CXXFLAGS for ISL test.
* configure.ac: Set CXXFLAGS for ISL test.
	* configure: Regenerate.

From-SVN: r223694
2015-05-26 09:12:14 -04:00
Jason Merrill 13ccfea8fa configure.ac: Use C++ for all tests.
* configure.ac: Use C++ for all tests.  Use AC_CHECK_DECLS for
	strstr and basename.
	* configure: Regenerate.

From-SVN: r223691
2015-05-26 08:28:53 -04:00
Gregor Richards 755658a56b [PATCH 2/13] musl libc config
2015-05-08  Gregor Richards  <gregor.richards@uwaterloo.ca>
	    Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config.gcc (LIBC_MUSL): New tm_defines macro.
	* config/linux.h (OPTION_MUSL): Define.
	(MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,)
	(MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,)
	(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
	(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
	(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.
	* config/linux.opt (mmusl): New option.
	* doc/invoke.texi (GNU/Linux Options): Document -mmusl.
	* configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
	(gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
	* configure: Regenerate.

Co-Authored-By: Szabolcs Nagy <szabolcs.nagy@arm.com>

From-SVN: r222904
2015-05-08 08:25:47 +00:00
Yvan Roux bf05ef76d9 aarch64-elf-raw.h (CA53_ERR_843419_SPEC): Define.
2015-05-05  Yvan Roux  <yvan.roux@linaro.org>

	* config/aarch64/aarch64-elf-raw.h (CA53_ERR_843419_SPEC): Define.
	(LINK_SPEC): Include CA53_ERR_843419_SPEC.
	* config/aarch64/aarch64-linux.h (CA53_ERR_843419_SPEC): Define.
	(LINK_SPEC): Include CA53_ERR_843419_SPEC.
	* config/aarch64/aarch64.opt (mfix-cortex-a53-843419): New option.
	* configure: Regenerate.
	* configure.ac: Add --enable-fix-cortex-a53-843419 option.
	* doc/install.texi (aarch64*-*-*): Document new
	--enable-fix-cortex-a53-843419 option.
	* doc/invoke.texi (AArch64 Options): Document -mfix-cortex-a53-843419
	and -mno-fix-cortex-a53-843419 options.

From-SVN: r222797
2015-05-05 09:31:11 +00:00
Alan Modra 3954ead0d8 re PR target/65810 (powerpc64 alignment of r2 insufficient for loading long-double constants)
PR target/65810
	* config/rs6000/rs6000.c (POWERPC64_TOC_POINTER_ALIGNMENT): Define.
	(offsettable_ok_by_alignment): Use minimum of decl and toc
	pointer alignment.  Replace dead code with assertion.
	(use_toc_relative_ref): Add mode arg.  Return false in -mcmodel=medium
	case if size exceeds toc pointer alignment.
	(rs6000_legitimize_reload_address): Update use_toc_relative_ref call.
	(rs6000_emit_move): Likewise.
	* configure.ac: Add linker toc pointer alignment check.
	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r222498
2015-04-28 13:17:19 +09:30
Kyrylo Tkachov cbea306a5e Revert:
2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>

	* config.gcc (LIBC_MUSL): New tm_defines macro.
	* config/linux.h (OPTION_MUSL): Define.
	(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
	(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
	(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.

	* config/linux.opt (mmusl): New option.
	* configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
	(gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.

	* configure: Regenerate.

From-SVN: r222330
2015-04-22 15:34:46 +00:00
Gregor Richards 513686a6a7 config changes for musl libc support
On behalf of Szabolcs.Nagy@arm.com

2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>

	* config.gcc (LIBC_MUSL): New tm_defines macro.
	* config/linux.h (OPTION_MUSL): Define.
	(INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,)
	(INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,)
	(INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define.

	* config/linux.opt (mmusl): New option.
	* configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
	(gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.

	* configure: Regenerate.

From-SVN: r222326
2015-04-22 14:16:41 +00:00
Jakub Jelinek cacf1f5906 re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.)
PR target/65351
config/
	* mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in
	use supports -mno-dynamic-no-pic.
	* picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic
	is present in CFLAGS.

libiberty/
	* configure: Regenerate.
libada/
	* configure: Regenerate.
libgcc/
	* configure: Regenerate.
gcc/
	* configure: Regenerate.


Co-Authored-By: Iain Sandoe <iain@codesourcery.com>

From-SVN: r221967
2015-04-10 06:43:52 +00:00
Jakub Jelinek e8a4ed3b9d re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.)
PR target/65351
config/
	* picflag.m4: Append -mno-dynamic-no-pic for Darwin.
libiberty/
	* configure: Regenerate.
libada/
	* configure: Regenerate.
libgcc/
	* configure: Regenerate.
gcc/
	* configure: Regenerate.

Co-Authored-By: Iain Sandoe <iain@codesourcery.com>

From-SVN: r221891
2015-04-07 11:57:46 +02:00
Georg-Johann Lay 0c9dc4ae59 re PR target/65296 ([avr] fix various issues with specs file generation)
gcc/
	PR target/65296
	* configure.ac [avr]: Check as for options -mrmw, --mlink-relax.
	* configure: Regenerate.
	* config.in: Regenerate.
	* doc/invoke.texi (AVR Options) [-mrmw]: Document it.
	[-mn-flash]: Document it.
	[__AVR_ARCH__]: Document avrtiny.
	* config/avr/gen-avr-mmcu-specs.c (config.h): Include it.
	(*asm_relax): Only define spec if HAVE_AS_AVR_MLINK_RELAX_OPTION.
	(*asm_rmw): Only define spec if HAVE_AS_AVR_MRMW_OPTION.
gcc/testsuite/
	PR target/65296
	* gcc.target/avr/tiny-memx: Use -mmcu instead of -march.
	* gcc.target/avr/tiny-caller-save.c: Same.

From-SVN: r221355
2015-03-11 18:51:09 +00:00
Trevor Saunders 3705004557 Support gcov-tool without ftw.h
gcc/

	PR gcov-profile/61889
	* config.in: regenerate.
	* configure.in: Likewise.
	* configure.ac: Check for ftw.h.
	* gcov-tool.c: Check for ftw.h before using nftw.

From-SVN: r220566
2015-02-10 03:40:20 +00:00
H.J. Lu 7b3592ee46 Update Linux/x86-64 linker test for PIE with copy reloc
PR bootstrap/64561
	* configure.ac (HAVE_LD_PIE_COPYRELOC): Update Linux/x86-64 linker
	test for PIE with copy reloc.
	* configure: Regenerated.

From-SVN: r219460
2015-01-12 03:50:13 -08:00
Eric Botcazou 0969ec7d5d configure.ac: Add Visium support.
* configure.ac: Add Visium support.
	* configure: Regenerate.
libgcc/
	* config.host: Add Visium support.
	* config/visium: New directory.
gcc/
	* config.gcc: Add Visium support.
	* configure.ac: Likewise.
	* configure: Regenerate.
	* doc/extend.texi (interrupt attribute): Add Visium.
	* doc/invoke.texi: Document Visium options.
	* doc/install.texi: Document Visium target.
	* doc/md.texi: Document Visium constraints.
	* common/config/visium: New directory.
	* config/visium: Likewise.
gcc/testsuite/
	* lib/target-supports.exp (check_profiling_available): Return 0 for
	Visium.
	(check_effective_target_tls_runtime): Likewise.
	(check_effective_target_logical_op_short_circuit): Return 1 for Visium.
	* gcc.dg/20020312-2.c: Adjust for Visium.
	* gcc.dg/tls/thr-cse-1.c: Likewise
	* gcc.dg/tree-ssa/20040204-1.c: Likewise
	* gcc.dg/tree-ssa/loop-1.c: Likewise.
	* gcc.dg/weak/typeof-2.c: Likewise.

From-SVN: r219219
2015-01-06 08:50:12 +00:00
H.J. Lu 1be7144689 Always define HAVE_LD_PIE_COPYRELOC
PR bootstrap/64189
	* configure.ac (HAVE_LD_PIE_COPYRELOC): Always define.
	* configure: Regenerated.

From-SVN: r218408
2014-12-04 15:53:24 -08:00
Sriraman Tallam 77ad54d911 x86-64: Optimize access to globals in PIE with copy reloc
Normally, with -fPIE/-fpie, GCC accesses globals that are extern to the
module using the GOT.  This is two instructions, one to get the address
of the global from the GOT and the other to get the value.  If it turns
out that the global gets defined in the executable at link-time, it still
needs to go through the GOT as it is too late then to generate a direct
 access.

Examples:

foo.cc
------
int a_glob;
int main () {
  return a_glob; // defined in this file
}

With -O2 -fpie -pie, the generated code directly accesses the global via
PC-relative insn:

5e0   <main>:
   mov    0x165a(%rip),%eax        # 1c40 <a_glob>

foo.cc
------

extern int a_glob;
int main () {
  return a_glob; // defined in this file
}

With -O2 -fpie -pie, the generated code accesses global via GOT using
two memory loads:

6f0  <main>:
   mov    0x1609(%rip),%rax   # 1d00 <_DYNAMIC+0x230>
   mov    (%rax),%eax

This is true even if in the latter case the global was defined in the
executable through a different file.

Some experiments on google benchmarks shows that the extra memory loads
affects performance by 1% to 5%.

Solution - Copy Relocations:

When the linker supports copy relocations, GCC can always assume that
the global will be defined in the executable.  For globals that are truly
extern (come from shared objects), the linker will create copy relocations
and have them defined in the executable. Result is that no global access
needs to go through the GOT and hence improves performance.

This optimization only applies to undefined, non-weak global data.
Undefined, weak global data access still must go through the GOT.

This patch checks if linker supports PIE with copy reloc, which is
enabled in gold and bfd linker in bininutils 2.25, at configure time
and enables this optimization if the linker support is available.

gcc/

	* configure.ac (HAVE_LD_PIE_COPYRELOC): Defined to 1 if
	Linux/x86-64 linker supports PIE with copy reloc.
	* config.in: Regenerated.
	* configure: Likewise.

	* config/i386/i386.c (legitimate_pic_address_disp_p): Allow
	pc-relative address for undefined, non-weak, non-function
	symbol reference in 64-bit PIE if linker supports PIE with
	copy reloc.

	* doc/sourcebuild.texi: Document pie_copyreloc target.

gcc/testsuite/

	* gcc.target/i386/pie-copyrelocs-1.c: New test.
	* gcc.target/i386/pie-copyrelocs-2.c: Likewise.
	* gcc.target/i386/pie-copyrelocs-3.c: Likewise.
	* gcc.target/i386/pie-copyrelocs-4.c: Likewise.

	* lib/target-supports.exp (check_effective_target_pie_copyreloc):
	New procedure.

Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>

From-SVN: r218397
2014-12-04 11:40:50 -08:00
Tobias Burnus 797d88589e re PR middle-end/64017 (Support ISL 0.14.0 (to fix ICE with gfortran.dg/graphite/pr42393.f90))
2014-12-01  Tobias Burnus  <burnus@net-b.de>
            Jack Howarth  <howarth@bromo.med.uc.edu>

        PR middle-end/64017
        * configure.ac
        * (ac_has_isl_schedule_constraints_compute_schedule):
        New check.
        * doc/install.texi (ISL): Permit ISL 0.14.
        * graphite-optimize-isl.c (getScheduleForBandList,
        * optimize_isl):
        Conditionally use ISL 0.13+ functions.
        * graphite-interchange.c: Make 'extern "C"' conditional.
        * graphite-isl-ast-to-gimple.c: Ditto.
        * graphite-poly.c: Ditto.
        * graphite-sese-to-poly.c: Ditto.
        * config.in: Regenerate.
        * gcc/configure: Regenerate.


Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>

From-SVN: r218247
2014-12-01 20:07:37 +01:00
John David Anglin 2d3a20632b re PR other/63694 (Build error compiling asan.c: strtoull undeclared)
PR other/63694
	* libiberty/configure.ac: Check for strtol, strtoul, strtoll and strtoull
	declarations.
	* libiberty/configure: Regenerated.
	* gcc/configure.ac: Check for strtol, strtoul, strtoll and strtoull
	declarations.
	* gcc/configure: Regenerated.
	* gcc/config.in: Regenerated.

From-SVN: r217972
2014-11-22 20:53:36 +00:00
Matthew Fortune a871c139f0 Refine configure guard for MIPS .module availability
gcc/

	* configure.ac: When checking for MIPS .module support ensure that
	o32 FPXX is supported to avoid a second configure check.
	* configure: Regenerate.

From-SVN: r217939
2014-11-21 16:57:55 +00:00
H.J. Lu a699d67255 Always use PIC option with -shared in libtool
Libtool needs to pass PIC option -shared when creating shared object to
link regular object files with slim-lto archive.

	PR bootstrap/63784
	* libtool.m4: Add $pic_flag with -shared.

boehm-gc/

	PR bootstrap/63784
	* configure: Regenerated.

gcc/

	PR bootstrap/63784
	* configure: Regenerated.

libatomic/

	PR bootstrap/63784
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/63784
	* configure: Regenerated.

libcc1/

	PR bootstrap/63784
	* configure: Regenerated.

libcilkrts/

	PR bootstrap/63784
	* configure: Regenerated.

libffi/

	PR bootstrap/63784
	* configure: Regenerated.

libgfortran/

	PR bootstrap/63784
	* configure: Regenerated.

libgomp/

	PR bootstrap/63784
	* configure: Regenerated.

libitm/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/

	PR bootstrap/63784
	* configure: Regenerated.

libjava/classpath/

	PR bootstrap/63784
	* configure: Regenerated.

libobjc/

	PR bootstrap/63784
	* configure: Regenerated.

libquadmath/

	PR bootstrap/63784
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/63784
	* configure: Regenerated.

libssp/

	PR bootstrap/63784
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/63784
	* configure: Regenerated.

libvtv/

	PR bootstrap/63784
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/63784
	* configure: Regenerated.

From-SVN: r217937
2014-11-21 08:49:17 -08:00
Jakub Jelinek 899c78aee8 configure.ac (--with-diagnostics-color): New configure option, default to --with-diagnostics-color=auto.
* configure.ac (--with-diagnostics-color): New configure
	option, default to --with-diagnostics-color=auto.
	* toplev.c (process_options): Use DIAGNOSTICS_COLOR_DEFAULT
	to determine -fdiagnostics-color= option default.
	* doc/invoke.texi (-fdiagnostics-color=): Document new
	default.
	* configure: Regenerated.
	* config.in: Regenerated.

From-SVN: r217540
2014-11-14 08:30:27 +01:00
Bernd Schmidt 85c64bbee9 [PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate.
	* configure.ac (--enable-as-accelerator-for)
	(--enable-offload-targets): New configure options.
gcc/
	* Makefile.in (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): New variables substituted by configure.
	(libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of
	being configured as an offload compiler.
	(DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
	ACCEL_DIR_SUFFIX.
	(install-cpp, install-common, install_driver, install-gcc-ar): Do not
	install for the offload compiler.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (real_target_noncanonical, accel_dir_suffix)
	(enable_as_accelerator): Compute new variables.
	(ACCEL_COMPILER): Define if the compiler is built as the accel compiler.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
	(ENABLE_OFFLOADING): Define if list of offload targets is not empty.
gcc/cp/
	* Make-lang.in (c++.install-common): Do not install for the offload
	compiler.
gcc/doc/
	* install.texi (Options specification): Document
	--enable-as-accelerator-for and --enable-offload-targets.
gcc/fortran/
	* Make-lang.in (fortran.install-common): Do not install for the offload
	compiler.
libgcc/
	* Makefile.in (crtoffloadbegin$(objext)): New rule.
	(crtoffloadend$(objext)): Likewise.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix): Compute new variable.
	(extra_parts): Add crtoffloadbegin.o and crtoffloadend.o
	if enable_offload_targets is not empty.
	* offloadstuff.c: New file.
libgomp/
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Check for libdl, required for plugin support.
	(PLUGIN_SUPPORT): Define if plugins are supported.
	(enable_offload_targets): Support Intel MIC targets.
	(OFFLOAD_TARGETS): List of target names suitable for offloading.
lto-plugin/
	* Makefile.am (libexecsubdir): Tweak for the possibility of being
	configured for offload compiler.
	(accel_dir_suffix, real_target_noncanonical): New variables substituted
	by configure.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new
	variables.


Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r217485
2014-11-13 13:28:56 +00:00
Matthew Fortune 050af1445b Implement MIPS o32 FPXX, FP64, FP64A ABI extensions.
2014-11-12  Matthew Fortune  <matthew.fortune@imgtec.com>

gcc/
	* common/config/mips/mips-common.c (mips_handle_option): Ensure
	that -mfp32, -mfp64 disable -mfpxx and -mfpxx disables -mfp64.
	* config.gcc (--with-fp-32): New option.
	(--with-odd-spreg-32): Likewise.
	* config.in (HAVE_AS_DOT_MODULE): New config define.
	* config/mips/mips-protos.h
	(mips_secondary_memory_needed): New prototype.
	(mips_hard_regno_caller_save_mode): Likewise.
	* config/mips/mips.c (mips_get_reg_raw_mode): New static prototype.
	(mips_get_arg_info): Assert that V2SFmode is only handled specially
	with TARGET_PAIRED_SINGLE_FLOAT.
	(mips_return_mode_in_fpr_p): Likewise.
	(mips16_call_stub_mode_suffix): Likewise.
	(mips_get_reg_raw_mode): New static function.
	(mips_return_fpr_pair): O32 return values span two registers.
	(mips16_build_call_stub): Likewise.
	(mips_function_value_regno_p): Support both FP return registers.
	(mips_output_64bit_xfer): Use mthc1 whenever TARGET_HAS_MXHC1.  Add
	specific cases for TARGET_FPXX to move via memory.
	(mips_dwarf_register_span): For TARGET_FPXX pretend that modes larger
	than UNITS_PER_FPREG 'span' one register.
	(mips_dwarf_frame_reg_mode): New static function.
	(mips_file_start): Switch to using .module instead of .gnu_attribute.
	No longer support FP ABI 4 (-mips32r2 -mfp64), replace with FP ABI 6.
	Add FP ABI 5 (-mfpxx) and FP ABI 7 (-mfp64 -mno-odd-spreg).
	(mips_save_reg, mips_restore_reg): Always represent DFmode frame
	slots with two CFI directives even for O32 FP64.
	(mips_for_each_saved_gpr_and_fpr): Account for fixed_regs when
	saving/restoring callee-saved registers.
	(mips_hard_regno_mode_ok_p): Implement O32 FP64A extension.
	(mips_secondary_memory_needed): New function.
	(mips_option_override): ABI check for TARGET_FLOATXX.  Disable
	odd-numbered single-precision registers	when using TARGET_FLOATXX.
	Implement -modd-spreg and defaults.
	(mips_conditional_register_usage): Redefine O32 FP64 to match O32 FP32
	callee-saved behaviour.
	(mips_hard_regno_caller_save_mode): Implement.
	(TARGET_GET_RAW_RESULT_MODE): Define target hook.
	(TARGET_GET_RAW_ARG_MODE): Define target hook.
	(TARGET_DWARF_FRAME_REG_MODE): Define target hook.
	* config/mips/mips.h (TARGET_FLOAT32): New macro.
	(TARGET_O32_FP64A_ABI): Likewise.
	(TARGET_CPU_CPP_BUILTINS): TARGET_FPXX is __mips_fpr==0. Add
	_MIPS_SPFPSET builtin define.
	(MIPS_FPXX_OPTION_SPEC): New macro.
	(OPTION_DEFAULT_SPECS): Pass through --with-fp-32=* to -mfp and
	--with-odd-spreg-32=* to -m[no-]odd-spreg.
	(ISA_HAS_ODD_SPREG): New macro.
	(ISA_HAS_MXHC1): True for anything other than -mfp32.
	(ASM_SPEC): Pass through mfpxx, mfp64, -mno-odd-spreg and -modd-spreg.
	(MIN_FPRS_PER_FMT): Redefine in terms of TARGET_ODD_SPREG.
	(HARD_REGNO_CALLER_SAVE_MODE): Define.  Implement O32 FPXX extension
	(HARD_REGNO_CALL_PART_CLOBBERED): Likewise.
	(SECONDARY_MEMORY_NEEDED): Likewise.
	(FUNCTION_ARG_REGNO_P): Update for O32 FPXX and FP64 extensions.
	* config/mips/mips.md (define_attr enabled): Implement O32 FPXX and
	FP64A ABI extensions.
	(move_doubleword_fpr<mode>): Use ISA_HAS_MXHC1 instead of
	TARGET_FLOAT64.
	* config/mips/mips.opt (mfpxx): New target option.
	(modd-spreg): Likewise.
	* config/mips/mti-elf.h (DRIVER_SELF_SPECS): Infer FP ABI from arch.
	* config/mips/mti-linux.h (DRIVER_SELF_SPECS): Likewise and remove
	fp64 sysroot.
	* config/mips/t-mti-elf: Remove fp64 multilib.
	* config/mips/t-mti-linux: Likewise.
	* configure.ac: Detect .module support.
	* configure: Regenerate.
	* doc/invoke.texi: Document -mfpxx, -modd-spreg, -mno-odd-spreg option.
	* doc/install.texi (--with-fp-32, --with-odd-spreg-32): Document new
	options.

gcc/testsuite/
	* gcc.target/mips/args-1.c: Handle __mips_fpr == 0.
	* gcc.target/mips/call-clobbered-1.c: New.
	* gcc.target/mips/call-clobbered-2.c: New.
	* gcc.target/mips/call-clobbered-3.c: New.
	* gcc.target/mips/call-clobbered-4.c: New.
	* gcc.target/mips/call-clobbered-5.c: New.
	* gcc.target/mips/call-saved-4.c: New.
	* gcc.target/mips/call-saved-5.c: New.
	* gcc.target/mips/call-saved-6.c: New.
	* gcc.target/mips/mips.exp: Support -mfpxx, -ffixed-f*,
	and -m[no-]odd-spreg.  Use _MIPS_SPFPSET to determine default
	odd-spreg option.  Account for -modd-spreg in minimum arch code.
	* gcc.target/mips/movdf-1.c: New.
	* gcc.target/mips/movdf-2.c: New.
	* gcc.target/mips/movdf-3.c: New.
	* gcc.target/mips/oddspreg-1.c: New.
	* gcc.target/mips/oddspreg-2.c: New.
	* gcc.target/mips/oddspreg-3.c: New.
	* gcc.target/mips/oddspreg-4.c: New.
	* gcc.target/mips/oddspreg-5.c: New.
	* gcc.target/mips/oddspreg-6.c: New.

libgcc/
	* config/mips/mips16.S: Set .module when supported.  Update O32
	FP64 calling convention and use for FPXX when possible.  Add FPXX
	calling convention fallback case.

From-SVN: r217446
2014-11-12 21:39:46 +00:00
Tobias Burnus d62352f9c7 Makefile.in (CLOOGLIBS, CLOOGINC): Remove.
2014-11-12  Tobias Burnus  <burnus@net-b.de>

        * Makefile.in (CLOOGLIBS, CLOOGINC): Remove.
        * configure.ac: Ditto.
        * graphite-interchange.c: Remove HAVE_CLOOG block.
        * config.in: Regenerate.
        * configure: Regenerate.

From-SVN: r217436
2014-11-12 19:28:36 +01:00
David Malcolm 35485da996 Merger of dmalcolm/jit branch from git
ChangeLog:
	* ChangeLog.jit: New.
	* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.

contrib/ChangeLog:
	* ChangeLog.jit: New.
	* jit-coverage-report.py: New file: a script to print crude
	code-coverage information for the libgccjit API.

gcc/ChangeLog:
	* ChangeLog.jit: New.
	* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
	sphinx is installed, falling back to "texinfo" otherwise.
	(FULL_DRIVER_NAME): New variable, adapted from the
	install-driver target.  New target, a symlink within the builddir,
	linked to "xgcc", for use when running the JIT library from the
	builddir.
	(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
	(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
	out.
	* configure.ac (doc_build_sys): New variable, set to "sphinx" if
	sphinx is installed, falling back to "texinfo" otherwise.
	(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
	GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
	* configure: Regenerate.
	* doc/install.texi (--enable-host-shared): Specify that this is
	required when building libgccjit.
	(Tools/packages necessary for modifying GCC): Add Sphinx.
	* timevar.def (TV_JIT_REPLAY): New.
	(TV_ASSEMBLE): New.
	(TV_LINK): New.
	(TV_LOAD): New.

gcc/java/ChangeLog:
	* gcc/ChangeLog.jit: New.

gcc/jit/ChangeLog:
	* ChangeLog.jit: New.
	* ChangeLog: New.
	* Make-lang.in: New.
	* TODO.rst: New.
	* config-lang.in: New.
	* docs/Makefile: New.
	* docs/_build/texinfo/Makefile: New.
	* docs/_build/texinfo/factorial.png: New.
	* docs/_build/texinfo/libgccjit.texi: New.
	* docs/_build/texinfo/sum-of-squares.png: New.
	* docs/conf.py: New.
	* docs/examples/tut01-hello-world.c: New.
	* docs/examples/tut02-square.c: New.
	* docs/examples/tut03-sum-of-squares.c: New.
	* docs/examples/tut04-toyvm/Makefile: New.
	* docs/examples/tut04-toyvm/factorial.toy: New.
	* docs/examples/tut04-toyvm/fibonacci.toy: New.
	* docs/examples/tut04-toyvm/toyvm.c: New.
	* docs/index.rst: New.
	* docs/internals/index.rst: New.
	* docs/intro/factorial.png: New.
	* docs/intro/index.rst: New.
	* docs/intro/sum-of-squares.png: New.
	* docs/intro/tutorial01.rst: New.
	* docs/intro/tutorial02.rst: New.
	* docs/intro/tutorial03.rst: New.
	* docs/intro/tutorial04.rst: New.
	* docs/topics/contexts.rst: New.
	* docs/topics/expressions.rst: New.
	* docs/topics/functions.rst: New.
	* docs/topics/index.rst: New.
	* docs/topics/locations.rst: New.
	* docs/topics/objects.rst: New.
	* docs/topics/results.rst: New.
	* docs/topics/types.rst: New.
	* dummy-frontend.c: New.
	* jit-builtins.c: New.
	* jit-builtins.h: New.
	* jit-common.h: New.
	* jit-playback.c: New.
	* jit-playback.h: New.
	* jit-recording.c: New.
	* jit-recording.h: New.
	* libgccjit++.h: New.
	* libgccjit.c: New.
	* libgccjit.h: New.
	* libgccjit.map: New.
	* notes.txt: New.

gcc/testsuite/ChangeLog:
	* ChangeLog.jit: New.
	* jit.dg/all-non-failing-tests.h: New.
	* jit.dg/harness.h: New.
	* jit.dg/jit.exp: New.
	* jit.dg/test-accessing-struct.c: New.
	* jit.dg/test-accessing-union.c: New.
	* jit.dg/test-array-as-pointer.c: New.
	* jit.dg/test-arrays.c: New.
	* jit.dg/test-calling-external-function.c: New.
	* jit.dg/test-calling-function-ptr.c: New.
	* jit.dg/test-combination.c: New.
	* jit.dg/test-dot-product.c: New.
	* jit.dg/test-empty.c: New.
	* jit.dg/test-error-accessing-field-in-other-struct.c: New.
	* jit.dg/test-error-adding-to-terminated-block.c: New.
	* jit.dg/test-error-array-as-pointer.c: New.
	* jit.dg/test-error-bad-cast.c: New.
	* jit.dg/test-error-block-in-wrong-function.c: New.
	* jit.dg/test-error-call-through-ptr-with-mismatching-args.c: New.
	* jit.dg/test-error-call-through-ptr-with-non-function.c: New.
	* jit.dg/test-error-call-through-ptr-with-non-pointer.c: New.
	* jit.dg/test-error-call-through-ptr-with-not-enough-args.c: New.
	* jit.dg/test-error-call-through-ptr-with-too-many-args.c: New.
	* jit.dg/test-error-call-with-mismatching-args.c: New.
	* jit.dg/test-error-call-with-not-enough-args.c: New.
	* jit.dg/test-error-call-with-too-many-args.c: New.
	* jit.dg/test-error-dereference-field-of-non-pointer.c: New.
	* jit.dg/test-error-dereference-read-of-non-pointer.c: New.
	* jit.dg/test-error-get-type-bad-enum.c: New.
	* jit.dg/test-error-index-not-a-numeric-type.c: New.
	* jit.dg/test-error-mismatching-types-in-assignment.c: New.
	* jit.dg/test-error-mismatching-types-in-call.c: New.
	* jit.dg/test-error-missing-return.c: New.
	* jit.dg/test-error-new-binary-op-bad-op.c: New.
	* jit.dg/test-error-new-function-bad-kind.c: New.
	* jit.dg/test-error-new-unary-op-bad-op.c: New.
	* jit.dg/test-error-null-passed-to-api.c: New.
	* jit.dg/test-error-return-within-void-function.c: New.
	* jit.dg/test-error-unreachable-block.c: New.
	* jit.dg/test-error-unterminated-block.c: New.
	* jit.dg/test-error-value-not-a-numeric-type.c: New.
	* jit.dg/test-expressions.c: New.
	* jit.dg/test-factorial.c: New.
	* jit.dg/test-fibonacci.c: New.
	* jit.dg/test-functions.c: New.
	* jit.dg/test-fuzzer.c: New.
	* jit.dg/test-hello-world.c: New.
	* jit.dg/test-linked-list.c: New.
	* jit.dg/test-long-names.c: New.
	* jit.dg/test-nested-contexts.c: New.
	* jit.dg/test-nested-loops.c: New.
	* jit.dg/test-operator-overloading.cc: New.
	* jit.dg/test-quadratic.c: New.
	* jit.dg/test-quadratic.cc: New.
	* jit.dg/test-reading-struct.c: New.
	* jit.dg/test-string-literal.c: New.
	* jit.dg/test-sum-of-squares.c: New.
	* jit.dg/test-threads.c: New.
	* jit.dg/test-types.c: New.
	* jit.dg/test-using-global.c: New.
	* jit.dg/test-volatile.c: New.

include/ChangeLog:
	* ChangeLog.jit: New.

libbacktrace/ChangeLog:
	* ChangeLog.jit: New.

libcpp/ChangeLog:
	* ChangeLog.jit: New.

libdecnumber/ChangeLog:
	* ChangeLog.jit: New.

libiberty/ChangeLog:
	* ChangeLog.jit: New.

zlib/ChangeLog:
	* ChangeLog.jit: New.

From-SVN: r217374
2014-11-11 21:55:52 +00:00
Francois-Xavier Coudert ebf6d33b73 re PR target/63610 (Fixing the libtool bug for Yosemite (darwin14))
toplevel:
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* libtool.m4: Fix globbing of darwin versions.

boehm-gc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

gcc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libatomic/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libbacktrace/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcc1/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libcilkrts/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libffi/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgfortran/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libgomp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libitm/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libobjc/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libquadmath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libsanitizer/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libssp/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libstdc++-v3/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libvtv/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

lto-plugin/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

libjava/classpath/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

zlib/
2014-11-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR target/63610
	* configure: Regenerate.

From-SVN: r217366
2014-11-11 20:25:18 +00:00
Joseph Myers 2f73a6c7b4 Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV for powerpc*-*-linux* soft-float and e500.
This patch implements support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV for
powerpc*-*-linux* soft-float and e500, provided GCC is configured for
glibc 2.19 or later on the target.

New functions __atomic_feholdexcept, __atomic_feclearexcept and
__atomic_feupdateenv were added (to libc) in that glibc version (for
powerpc soft-float / e500 only) in order to support this part of C11.
For soft-float, libc functions are needed because the floating-point
exception state is in TLS variables in libc that aren't directly
accessible outside of glibc.  For e500, they are also needed because
of the prctl syscalls involved in controlling trapping for exceptions
and informing the kernel when certain exception flags have been
cleared.  The actual implementation in GCC is a straightforward matter
of calling those functions.

Tested with no regressions for cross to powerpc-linux-gnu
(soft-float); the c11-atomic-exec-5.c results go from FAIL to PASS.

	* configure.ac (TARGET_GLIBC_MAJOR, TARGET_GLIBC_MINOR): Define
	macros.
	* configure, config.h.in: Regenerate.
	* config/rs6000/linux.h [TARGET_GLIBC_MAJOR > 2 ||
	(TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)]
	(RS6000_GLIBC_ATOMIC_FENV): New macro.
	* config/rs6000/linux64.h [TARGET_GLIBC_MAJOR > 2 ||
	(TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 19)]
	(RS6000_GLIBC_ATOMIC_FENV): New macro.
	* config/rs6000/rs6000.c (atomic_hold_decl, atomic_clear_decl)
	(atomic_update_decl): New static variables.
	(rs6000_atomic_assign_expand_fenv) [RS6000_GLIBC_ATOMIC_FENV]:
	Generate calls to __atomic_feholdexcept, __atomic_feclearexcept
	and __atomic_feupdateenv for soft-float and no-FPRs.

From-SVN: r217040
2014-11-03 13:40:50 +00:00
Phil Muldoon ddc8de034a Let GDB reuse GCC's parser.
2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* aclocal.m4: New file.
	* callbacks.cc: New file.
	* callbacks.hh: New file.
	* cc1plugin-config.h.in: New file.
	* configure: New file.
	* configure.ac: New file.
	* connection.cc: New file.
	* connection.hh: New file.
	* findcomp.cc: New file.
	* findcomp.hh: New file.
	* libcc1.cc: New file.
	* libcc1plugin.sym: New file.
	* libcc1.sym: New file.
	* Makefile.am: New file.
	* Makefile.in: New file.
	* marshall.cc: New file.
	* marshall.hh: New file.
	* names.cc: New file.
	* names.hh: New file.
	* plugin.cc: New file.
	* rpc.hh: New file.
	* status.hh: New file.

2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* gcc-c-fe.def: New file.
	* gcc-c-interface.h: New file.
	* gcc-interface.h: New file.

2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* c-tree.h (enum c_oracle_request): New.
	(c_binding_oracle_function): New typedef.
	(c_binding_oracle, c_pushtag, c_bind): Declare.
	* c-decl.c (c_binding_oracle): New global.
	(I_SYMBOL_CHECKED): New macro.
	(i_symbol_binding): New function.
	(I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
	(I_TAG_CHECKED): New macro.
	(i_tag_binding): New function.
	(I_TAG_BINDING, I_TAG_DECL): Redefine.
	(I_LABEL_CHECKED): New macro.
	(i_label_binding): New function.
	(I_LABEL_BINDING, I_LABEL_DECL): Redefine.
	(c_print_identifier): Save and restore c_binding_oracle.
	(c_pushtag, c_bind): New functions.

2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* aclocal.m4, configure: Rebuild.
	* Makefile.in (aclocal_deps): Add gcc-plugin.m4.
	* configure.ac: Use GCC_ENABLE_PLUGINS.
	* stor-layout.c (finish_bitfield_layout): Now public.  Change
	argument type to 'tree'.
	(finish_record_layout): Update.
	* stor-layout.h (finish_bitfield_layout): Declare.

2014-10-27  Tom Tromey  <tromey@redhat.com>

	* gcc-plugin.m4: New file.

2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* Makefile.def: Add libcc1 to host_modules.
	* configure.ac (host_tools): Add libcc1.
	* Makefile.in, configure: Rebuild.

From-SVN: r216748
2014-10-27 17:21:42 +00:00
Ilya Verbin d856054bc7 Set SECTION_EXCLUDE flag for LTO sections.
gcc/
	* configure: Regenerate.
	* configure.ac: Move the test for section attribute specifier "e" in GAS
	out to all i[34567]86-*-* | x86_64-*-* targets and add --fatal-warnings.
	* langhooks.c (lhd_begin_section): Set SECTION_EXCLUDE flag.
	* varasm.c (default_elf_asm_named_section): Guard SECTION_EXCLUDE with
	ifdef HAVE_GAS_SECTION_EXCLUDE.

From-SVN: r216442
2014-10-19 19:40:59 +00:00
Kyrylo Tkachov 5e396da6b4 [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
* configure.ac: Add --enable-fix-cortex-a53-835769 option.
	* configure: Regenerate.
	* config/aarch64/aarch64.c (aarch64_override_options): Handle
	TARGET_FIX_ERR_A53_835769_DEFAULT.
	* config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init
	value to 2.
	* doc/install.texi (aarch64*-*-*): Document 
	new --enable-fix-cortex-a53-835769 option.

From-SVN: r216076
2014-10-10 12:31:51 +00:00
Thomas Schwinge 2a4fa5dcae Properly regenerate gcc/configure.
gcc/
	* configure: Regenerate.

From-SVN: r215532
2014-09-23 23:15:36 +02:00
Hans-Peter Nilsson 7d7d00bac5 configure.ac (target_header_dir): Move block defining this to before the block setting inhibit_libc.
* configure.ac (target_header_dir): Move block defining
	this to before the block setting inhibit_libc.
	(inhibit_libc): When considering $with_headers, just
	check it it's explicitly "no".  If not, also check if
	$target_header_dir/stdio.h is present.  If not, set
	inhibit_libc=true.
	* configure: Regenerate.

From-SVN: r215439
2014-09-21 23:38:05 +00:00
H.J. Lu 95204cd5b8 Set install_gold_as_default to no first
PR other/62168
	* configure.ac: Set install_gold_as_default to no first.
	 * configure: Regenerated.

From-SVN: r214168
2014-08-19 09:23:36 -07:00
Rainer Orth 56e675ce85 Restore Sun as COMDAT group support
* configure.ac (gcc_cv_as_comdat_group_group): Only default to no
	if unset.
	* configure: Regenerate.

From-SVN: r214137
2014-08-19 10:13:24 +00:00
H.J. Lu f8df6750f4 Set install_gold_as_default to no for --enable-gold=no
PR other/62168
	* configure.ac: Set install_gold_as_default to no for
	 --enable-gold=no.
	 * configure: Regenerated.

From-SVN: r214108
2014-08-18 08:49:16 -07:00
Roman Gareev eae1a5d419 configure.ac: Eliminate ClooG installation dependency.
* configure.ac: Eliminate ClooG installation dependency.
	* configure: Regenerate.
	* Makefile.tpl: Add definition of ISLLIBS and HOST_ISLLIBS.
	* Makefile.in: Regenerate.

[config/]

	* cloog.m4: Remove the path to isllibs from clooglibs.
	* isl.m4: Add paths to islinc, isllibs.

[gcc/]

	* Makefile.in: Add definition of ISLLIBS, HOST_ISLLIBS.
	* config.in: Add undef of HAVE_isl.
	* configure: Regenerate.
	* configure.ac: Add definition of HAVE_isl.
	* graphite-blocking.c: Add checking of HAVE_isl.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* toplev.c: Replace the checking of HAVE_cloog with the checking
	of HAVE_isl.

From-SVN: r214106
2014-08-18 15:42:11 +00:00
Mike Stump b6d9404508 configure.ac: Also check for popen.
* configure.ac: Also check for popen.
	* tree-loop-distribution.c (dot_rdg): Autoconfize popen use.
	* configure: Regenerate.
	* config.in:  Regenerate.

From-SVN: r213309
2014-07-30 18:29:41 +00:00
Rainer Orth 29d7cbd1b9 Support compressed debug sections
* configure.ac (gcc_cv_as_compress_debug): Check for assembler
	compressed debug support.
	(gcc_cv_ld_compress_debug): Check for linker compressed debug
	support.
	* configure: Regenerate.
	* config.in: Regenerate.
	* common.opt (compressed_debug_sections): New enum.
	(gz, gz=): New options.
	* gcc.c (LINK_COMPRESS_DEBUG_SPEC, ASM_COMPRESS_DEBUG_SPEC):
	Define.
	(LINK_COMMAND_SPEC): Invoke LINK_COMPRESS_DEBUG_SPEC.
	(asm_options): Invoke ASM_COMPRESS_DEBUG_SPEC.
	* config/darwin.h (LINK_COMMAND_SPEC_A): Invoke
	LINK_COMPRESS_DEBUG_SPEC.
	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.
	* opts.c (common_handle_option): Handle OPT_gz, OPT_gz_.
	* doc/invoke.texi (Option Summary, Debugging Options): Add
	-gz[=type].
	(Debugging Options): Document -gz[=type].

From-SVN: r212072
2014-06-27 13:48:54 +00:00
Thomas Schwinge 35fa894ae3 [PR lto/61334] Declare prototype for strnlen, if needed.
include/
	* libiberty.h [defined (HAVE_DECL_STRNLEN) &&
	!HAVE_DECL_STRNLEN] (strnlen): New prototype.
	gcc/
	* configure.ac: Use gcc_AC_CHECK_DECLS to check for strnlen
	prototype.
	* config.in: Regenerate.
	* configure: Likewise.

From-SVN: r211401
2014-06-10 11:45:00 +02:00
Richard Biener 35987ae95d configure.ac: Check whether the underlying type of int64_t is long or long long.
2014-06-04  Richard Biener  <rguenther@suse.de>

	* configure.ac: Check whether the underlying type of int64_t
	is long or long long.
	* configure: Regenerate.
	* config.in: Likewise.
	* hwint.h (HOST_WIDE_INT): Match the underlying type of int64_t.
	(HOST_WIDE_INT_PRINT_*): Define in terms of PRI*64.

From-SVN: r211228
2014-06-04 12:35:26 +00:00
Rainer Orth 3c698bf09b Centralise clearing hardware capabilities with Sun ld
gcc:
	* configure.ac ($gcc_cv_ld_clearcap): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sol2.opt (mclear-hwcap): New option.
	* config/sol2.h (LINK_CLEARCAP_SPEC): Define.
	* config/sol2-clearcap.map: Moved here from
	testsuite/gcc.target/i386/clearcap.map.
	* config/sol2-clearcapv2.map: Move here from
	gcc.target/i386/clearcapv2.map.
	* config/t-sol2 (install): Depend on install-clearcap-map.
	(install-clearcap-map): New target.
	* doc/invoke.texi (Option Summary, Solaris 2 Options): Document
	-mclear-hwcap.

	gcc/testsuite:
	* lib/clearcap.exp: New file.
	* gcc.dg/vect/vect.exp: Load clearcap.exp.
	Remove clearcap_ldflags handling.
	Call clearcap-init, clearcap-finish.
	* gcc.target/i386/i386.exp: Likewise.
	* gcc.target/i386/clearcap.map: Move to ../config/sol2-clearcap.map.
	* gcc.target/i386/clearcapv2.map: Move to
	../config/sol2-clearcapv2.map.
	* gcc.target/x86_64/abi/avx/abi-avx.exp: Likewise.
	* gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Likewise.

	libitm:
	* acinclude.m4 (LIBITM_CHECK_LINKER_HWCAP): Check for
	-mclear-hwcap instead.
	* configure: Regenerate.
	* clearcap.map: Remove.

From-SVN: r211014
2014-05-28 11:32:54 +00:00
Richard Biener edf6ddf677 configure.ac: Remove long long and __int64 type checks...
2014-05-26  Richard Biener  <rguenther@suse.de>

	libcpp/
	* configure.ac: Remove long long and __int64 type checks,
	add check for uint64_t and fail if that wasn't found.
	* include/cpplib.h (cpp_num_part): Use uint64_t.
	* config.in: Regenerate.
	* configure: Likewise.

	gcc/
	* configure.ac: Drop __int64 type check.  Insist that we
	found uint64_t and int64_t.
	* hwint.h (HOST_BITS_PER___INT64): Remove.
	(HOST_BITS_PER_WIDE_INT): Define to 64 and remove
	__int64 case.
	(HOST_WIDE_INT_PRINT_*): Remove 32bit case.
	(HOST_WIDEST_INT*): Define to HOST_WIDE_INT*.
	(HOST_WIDEST_FAST_INT): Remove __int64 case.
	* vmsdbg.h (struct _DST_SRC_COMMAND): Use int64_t
	for dst_q_src_df_rms_cdt.
	* configure: Regenerate.
	* config.in: Likewise.

From-SVN: r210928
2014-05-26 08:19:02 +00:00
John Marino dbed5a9bff config.gcc (*-*-dragonfly*): New target.
2014-05-21  John Marino  <gnugcc@marino.st>

gcc:

	* config.gcc (*-*-dragonfly*): New target.
	* configure.ac: Detect dl_iterate_phdr (*freebsd*, *dragonfly*).
	* configure: Regenerate.
	* config/dragonfly-stdint.h: New.
	* config/dragonfly.h: New.
	* config/dragonfly.opt: New.
	* config/i386/dragonfly.h: New.
	* ginclude/stddef.h: Detect _PTRDIFF_T_DECLARED for DragonFly.

include:

	* liberty.h: Use basename function on DragonFly.

libcilkrts:

	* runtime/os-unix.c (__DragonFly__): New target.

libgcc:

	* config.host (*-*-dragonfly*): New target.
	* crtstuff.c: Make dl_iterate_support generic on *bsd.
	* enable-execute-stack-mprotect.c: Always mprotect on FreeBSD.
	* unwind-dw2-fde-dip.c: Add dl_iterate_phr support for DragonFly.
	* config/i386/dragonfly-unwind.h: New.

libitm:

	* configure.tgt (*-*-dragonfly*): New target.

libstdc++-v3:

	* acinclude.m4 (*-*-dragonfly*): New target.
	* configure: Regenerate.
	* configure.host (*-*-dragonfly*): New target.
	* config/locale/dragonfly/c_locale.cc: New.
	* config/locale/dragonfly/ctype_members.cc: New.
	* config/os/bsd/dragonfly/ctype_base.h: New.
	* config/os/bsd/dragonfly/ctype_configure_char.cc: New.
	* config/os/bsd/dragonfly/ctype_inline.h: New.
	* config/os/bsd/dragonfly/os_defines.h: New.

From-SVN: r210694
2014-05-21 12:08:58 +01:00
Richard Biener 54da09ee20 config.gcc: Remove need_64bit_hwint.
2014-05-20  Richard Biener  <rguenther@suse.de>

	gcc/
	* config.gcc: Remove need_64bit_hwint.
	* configure.ac: Do not define NEED_64BIT_HOST_WIDE_INT.
	* hwint.h: Do not check NEED_64BIT_HOST_WIDE_INT but assume
	it to be true.
	* config.in: Regenerate.
	* configure: Likewise.

	libcpp/
	* configure.ac: Copy gcc logic of detecting a 64bit type.
	Remove HOST_WIDE_INT define.
	* include/cpplib.h: typedef cpp_num_part to a 64bit type,
	similar to how hwint.h does it.
	* config.in: Regenerate.
	* configure: Likewise.

From-SVN: r210632
2014-05-20 08:01:32 +00:00