Commit Graph

673 Commits

Author SHA1 Message Date
Richard Biener f877b3adba isl.m4: Remove support for ISL 0.14.
2017-02-13  Richard Biener  <rguenther@suse.de>

	config/
	* isl.m4: Remove support for ISL 0.14.

	* configure: Re-generate.

	gcc/
	* configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
	Remove.
	* configure: Re-generate.
	* config.in: Likewise.
	* graphite-dependences.c: Simplify as if
	HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.h: Likewise.
	* toplev.c: Include isl/version.h and use isl_version () for
	printing the ISL version.
	* doc/install.texi: Update ISL requirement.

From-SVN: r245382
2017-02-13 08:54:02 +00:00
Gerald Pfeifer 9334ef9e73 configure.ac (ACX_BUGURL): Update.
* configure.ac (ACX_BUGURL): Update.
	* configure: Regenerate.

From-SVN: r245296
2017-02-09 08:30:30 +00:00
Palmer Dabbelt 09cae7507d RISC-V Port: gcc
gcc/ChangeLog:

2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>

        * config/riscv/riscv.c: New file.
        * gcc/common/config/riscv/riscv-common.c: Likewise.
        * config.gcc: Likewise.
        * config/riscv/constraints.md: Likewise.
        * config/riscv/elf.h: Likewise.
        * config/riscv/generic.md: Likewise.
        * config/riscv/linux.h: Likewise.
        * config/riscv/multilib-generator: Likewise.
        * config/riscv/peephole.md: Likewise.
        * config/riscv/pic.md: Likewise.
        * config/riscv/predicates.md: Likewise.
        * config/riscv/riscv-builtins.c: Likewise.
        * config/riscv/riscv-c.c: Likewise.
        * config/riscv/riscv-ftypes.def: Likewise.
        * config/riscv/riscv-modes.def: Likewise.
        * config/riscv/riscv-opts.h: Likewise.
        * config/riscv/riscv-protos.h: Likewise.
        * config/riscv/riscv.h: Likewise.
        * config/riscv/riscv.md: Likewise.
        * config/riscv/riscv.opt: Likewise.
        * config/riscv/sync.md: Likewise.
        * config/riscv/t-elf-multilib: Likewise.
        * config/riscv/t-linux: Likewise.
        * config/riscv/t-linux-multilib: Likewise.
        * config/riscv/t-riscv: Likewise.
        * configure.ac: Likewise.
        * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
        Waterman as RISC-V maintainers.
        * doc/install.texi: Add RISC-V entries.
        * doc/invoke.texi: Add RISC-V options section.
        * doc/md.texi: Add RISC-V constraints section.

From-SVN: r245224
2017-02-06 21:38:37 +00:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Iain Sandoe 74edc8a9b9 [Darwin, configury] No longer expect to find cross-target headers on the host.
Earlier Darwin (esp. Darwin8 and Darwin9) had FAT libraries and suitable header
installations in /usr/include such that one could build a cross-toolchain 
(including cross-arch) using a common sysroot (including / for “current” version).

However this is no longer true on a number of levels.  A vanilla Darwin system has
no headers installed in /usr and it's certainly not appropriate to try and find
headers/libs for (say) x86-64-darwinNN X powerpc-darwin in /usr on any Darwin NN > 10 
(even Darwin10 is incomplete in that it omits the ppc64 multilib).  In the latter
example, the catch-all in the current configury to mean that 
"foo-darwin" == “foo-version-on-this-system” breaks the cross case 
—target=powerpc-apple-darwin —host=some-system-later-than-darwin10.

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

	* configure.ac (CROSS directory tests): Remove the assumption that
	Darwin hosts contain suitable target sysroots in "/".
	* configure: Regenerate.

From-SVN: r243533
2016-12-11 19:37:05 +00:00
Iain Sandoe c6d01ef8ca [Darwin, config] Fix version number extraction to portable method
The method used in the applied patch caused configuration errors on freeBSD and hppa.

2016-11-28  Iain Sandoe  <iain@codesourcery.com>

	PR target/71767
	* configure.ac (with_ld64): Use portable method to extract the
	major part of the version number.
	* configure: Regenerated.

From-SVN: r242912
2016-11-28 10:29:19 +00:00
Iain Sandoe b410cf1dc0 [Darwin] fix PR67710 by updating 'as' specs to handle newer assembler versions.
A/ Newer versions of ld64 check the min_version command, and newer versions of
   the system assembler inserts this in response to "-mmacosx-version-min=" on
   the assembler line. Unless one makes sensible versions, some object is bound
   to conflict.

B/ Additionally, there's a difference in behaviour between "as" and "ld" when
   presented with xx.yy.zz (ld truncates to xx.yy, as doesn't); net result is
   that one needs to pass a truncated version to "as".

So (if the assembler supports minversion commands)
(a) provide a truncated minversion (as asm_macosx_version_min, which is a
    driver-only var).
(b) pass this to "as"
(c) Update tests to determine 'HAVE_AS_MMACOSX_VERSION_MIN_OPTION'
    (Rainer's patch)
(d) For some reason the testcases are "run" (it's not obvious they need to be,
    they are checking compile-time issues)
  - anyway, to preserve the status quo, I've left them as exec.  However, the
    minimum version that can be code-gened for is target-dependent (there are no
    released x86 versions before 10.4, for example).  To avoid conflicts where
    the "as" is assuming some minimum, I've set the testversion to 10.5 (which
    is supported by all the archs we have)
(e) We need to ensure that libgcc and crts are generated with a sufficiently
    old minversion not to conflict.

gcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/67710
	* config.in: Regenerate
	* config/darwin-driver.c (darwin_driver_init): Emit a version string
	for the assembler.
	* config/darwin.h(ASM_MMACOSX_VERSION_MIN_SPEC): New, new tests.
	* config/darwin.opt(asm_macosx_version_min): New.
	* config/i386/darwin.h: Handle ASM_MMACOSX_VERSION_MIN_SPEC.
	* configure: Regenerate
	* configure.ac: Check for mmacosx-version-min handling.

gcc/testsuite/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	    Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR target/67710
	*  gcc.dg/darwin-minversion-1.c: Update min version check.
	*  gcc.dg/darwin-minversion-2.c: Likewise.
	*  gcc.dg/darwin-minversion-3.c: Likewise.

libgcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/67710
	*  config/t-darwin: Default builds to 10.5 codegen.


Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
Co-Authored-By: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

From-SVN: r242898
2016-11-27 15:07:22 +00:00
Iain Sandoe eb89c82f46 [Darwin, config] Arrange for ld64 to be detected as Darwin's linker.
This is an initial patch in a series that converts Darwin's configury
 to detect ld64 features, rather than the current process of hard-coding
 them on target system version.

 A ld64-compatible linker is currently required and assumed by Darwin.
 If a DEFAULT_LINKER is set via --with-ld= then this will be tested to
 see if it is ld64.

 The ld64 version is determined for the chosen ld and this is exported for
 use in setting a default value for -mtarget-linker (needed for run-time
 code-gen changes to section choices).
 The support for -rdynamic is converted to be detected at config time, or
 by the ld64 version if that is found.

gcc/

2016-11-27  Iain Sandoe  <iain@codesourcery.com>

	PR target/71767
	* configure.ac (with-ld64): New var, set for Darwin, set on
	detection of ld64, gcc_cv_ld64_export_dynamic: New, New test.
	* config/darwin.h: Use LD64_HAS_DYNAMIC export. DEF_LD64: New,
	define.
	* config/darwin10.h(DEF_LD64): Update for this target version.
	* config/darwin12.h(LINK_GCC_C_SEQUENCE_SPEC): Remove rdynamic
	test.  (DEF_LD64): Update for this target version.
	* configure: Regenerated.
	* config.in: Regenerated.

From-SVN: r242894
2016-11-27 14:29:36 +00:00
Trevor Saunders 61214be10b remove conditional compilation of HAVE_AS_LEB128 code
gcc/ChangeLog:

2016-08-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* acinclude.m4 (gcc_GAS_CHECK_FEATURE): Support doing an action
	if the feature isn't available.
	* configure: Regenerate.
	* configure.ac: define HAVE_AS_LEB128 to 0 when not available.
	* dwarf2asm.c (dw2_asm_output_data_uleb128): Always compile code
	for HAVE_AS_LEB128.
	(dw2_asm_output_data_sleb128): Likewise.
	(dw2_asm_output_delta_uleb128): Likewise.
	(dw2_asm_output_delta_sleb128): Likewise.
	* except.c (output_one_function_exception_table): Likewise.
	(dw2_size_of_call_site_table): Likewise.
	(sjlj_size_of_call_site_table): Likewise.
	* dwarf2out.c (output_loc_list): Likewise.
	(output_rnglists): Likewise.

From-SVN: r242381
2016-11-14 10:58:48 +00:00
David Edelsohn 8d91472f6e configure.ac (.hidden): Change to conftest_s string.
* configure.ac (.hidden): Change to conftest_s string. Provide string
for AIX assembler.
(gcc_cv_ld_hidden): Yes for AIX.
* configure: Regenerate.

* dwarf2asm.c (USE_LINKONCE_INDIRECT): Don't set for AIX (XCOFF).

* config/rs6000/rs6000-protos.h (rs6000_asm_weaken_decl): Declare
(rs6000_xcoff_asm_output_aligned_decl_common): Declare.
* config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_DECL_NAME): Define.
(ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
(ASM_OUTPUT_ALIGNED_COMMON): Delete.
* config/rs6000/rs6000.c (rs6000_init_builtins): Change clog rename
from #if to if.
(rs6000_xcoff_visibility): New.
(rs6000_xcoff_declare_function_name): Add visibility support.
(rs6000_xcoff_asm_globalize_decl_name): New.
(rs6000_xcoff_asm_output_aligned_decl_common): New.
(rs6000_asm_weaken_decl): New.
(rs6000_code_end): Disable HIDDEN_LINKONCE on XCOFF.
config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Change definition to
reference function.

From-SVN: r241930
2016-11-07 15:16:13 -05:00
Uros Bizjak ec9d5ad13b configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning...
* configure.ac (strict_warn): Merge -Wmissing-format-attribute and
	-Woverloaded-virtual checks for warning options.
	* configure: Regenerate.

From-SVN: r240721
2016-10-03 17:51:33 +02:00
Bernd Edlinger b06f87c7eb configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING.
2016-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * configure.ac: Split CHECKING_P into CHECKING_P and
        ENABLE_EXTRA_CHECKING.
        * configure: Regenerated.
        * config.in: Adjust commment of CHECKING_P.  Add ENABLE_EXTRA_CHECKING.
        * common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING.

From-SVN: r240677
2016-09-30 18:57:49 +00:00
Alan Modra e9dda04f07 [RS6000] .gnu.attributes Tag_GNU_Power_ABI_FP
Extend this attribute to cover long double ABIs, for 64-bit too.

This patch also corrects an error that crept in to code setting
rs6000_passes_float.  See the added comment.  Passing IEEE128 values
in vsx regs ought to set both Tag_GNU_Power_ABI_FP and
Tag_GNU_Power_ABI_Vector.  Also adds a new option, default on, that
disables output of .gnu_attribute assembly directives.

	* config/rs6000/sysv4.opt (mgnu-attribute): New option.
	* doc/invoke.texi: Document it.
	* config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define.
	(rs6000_passes_float): Comment.
	(rs6000_passes_long_double): New static var.
	(call_ABI_of_interest): Return false unless rs6000_gnu_attr is set.
	(init_cumulative_args): Set up to emit fp .gnu_attribute for
	ELF 64-bit ABIs as well as 32-bit ELF.  Correct rs6000_passes_float
	to include fp values returned in vectors.
	Set rs6000_passes_long_double.
	(rs6000_function_arg_advance_1): Likewise for function args.
	(rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs,
	and SPE.  Emit long double tag value too.
	(rs6000_opt_vars): Add gnu-attr.
	* configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test.
	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r240601
2016-09-29 07:31:48 +09:30
David Edelsohn eb657a4926 configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment.
* configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment.
        * configure: Regenerate.

From-SVN: r240465
2016-09-24 12:59:18 -04:00
Alexander Ivchenko 7e4955774f re PR target/77267 (MPX does not work in a presence of "-Wl,-as-needed" option (Ubuntu default))
Fix PR target/77267

2016-09-10  Alexander Ivchenko  <alexander.ivchenko@intel.com>

	PR target/77267
	* config.in: Regenerate.
	* config/i386/linux-common.h (MPX_LD_AS_NEEDED_GUARD_PUSH):
	New macro.
	(MPX_LD_AS_NEEDED_GUARD_PUSH): Ditto.
	(LIBMPXWRAPPERS_SPEC): Remove "--no-whole-archive" from
	static-libmpxwrappers case.
	(LIBMPX_SPEC): Add guards with MPX_LD_AS_NEEDED_GUARD_PUSH and
	MPX_LD_AS_NEEDED_GUARD_POP.
	* configure: Regenerate.
	* configure.ac (HAVE_LD_PUSHPOPSTATE_SUPPORT): New variable.
	defined if linker support "--push-state"/"--pop-state".

From-SVN: r240057
2016-09-09 14:38:06 -07:00
Patrick Palka 25e08379b8 Build libbackend.a as a thin archive if possible
gcc/ChangeLog:

	* configure.ac (thin_archive_support): New variable.  AC_SUBST it.
	* configure: Regenerate.
	* Makefile.in (THIN_ARCHIVE_SUPPORT): New variable.
	(USE_THIN_ARCHIVES): New variable.
	(libbackend.a): If USE_THIN_ARCHIVES then pass T to ar to build
	this archive as a thin archive.

From-SVN: r238524
2016-07-20 14:09:20 +00:00
H.J. Lu de86ff8f97 Call tls_get_addr via GOT for GNU TLS if possible
There are extensions to x86-64 psABI:

https://groups.google.com/forum/#!topic/x86-64-abi/de5_KnLHxtI

and i386 psABI:

https://groups.google.com/forum/#!topic/ia32-abi/awsRSvJOJfs

to call tls_get_addr via GOT.  X86 assembler and linker in binutils 2.27
implemented

call *__tls_get_addr@GOTPCREL(%rip)

in 64-bit and

call *___tls_get_addr@GOT(%reg)

in 32-bit to access global and local thread loal variables in shared
library.  We check if 32-bit x86 assembler and linker work with

call *___tls_get_addr@GOT(%reg)

as 32-bit and 64-bit assembler and linker are enabled togther.

In 32-bit, since any integer register except EAX, which is used to pass
parameter to ___tls_get_addr, and ESP, can be used as GOT base, a new
register class, TLS_GOTBASE_REGS, along with a new constraint, Yb, are
added.  They are used to improve register allocation for 32-bit dynamic
TLS patterns.

gcc/

	* configure.ac (calling ___tls_get_addr via GOT): New
	assembler/linker check.
	(HAVE_AS_IX86_TLS_GET_ADDR_GOT): New.  Defined to 1 if 32-bit
	assembler and linker supports calling ___tls_get_addr via GOT.
	Otherise, defined to 0.
	* config.in: Regenerated.
	* configure: Likewise.
	* config/i386/constraints.md (Yb): New constraint.
	* config/i386/i386.h (reg_class): Add TLS_GOTBASE_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/i386/i386.md (*tls_global_dynamic_32_gnu): Replace
	the b constraint with the Yb constraint.  Call ___tls_get_addr
	via GOT for GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT
	is 1.
	(*tls_local_dynamic_base_32_gnu): Likewise.
	(*tls_global_dynamic_64_<mode>): Call _tls_get_addr via GOT for
	GNU TLS with -fno-plt if HAVE_AS_IX86_TLS_GET_ADDR_GOT is 1.
	(*tls_local_dynamic_base_64_<mode>): Likewise.

gcc/testsuite/

	* gcc.target/i386/noplt-gd-1.c: New test.
	* gcc.target/i386/noplt-gd-2.c: Likewise.
	* gcc.target/i386/noplt-gd-3.c: Likewise.
	* gcc.target/i386/noplt-ld-1.c: Likewise.
	* gcc.target/i386/noplt-ld-2.c: Likewise.
	* gcc.target/i386/noplt-ld-3.c: Likewise.
	* lib/target-supports.exp
	(check_effective_target_tls_get_addr_via_got): New.

From-SVN: r237765
2016-06-24 10:32:52 -07:00
Uros Bizjak e1ebd31d5a configure.ac (HAVE_AS_GOTOF_IN_DATA): Use $as_ix86_gas_32_opt to assemble for 32bit target.
* configure.ac (HAVE_AS_GOTOF_IN_DATA): Use $as_ix86_gas_32_opt to
	assemble for 32bit target.
	(HAVE_AS_IX86_TLSGDPLT): Use $as_ix86_gas_32_opt to assemble
	and $ld_ix86_gld_32_opt to link for 32bit target.
	(HAVE_AS_IX86_TLSLDMPLT): Ditto.
	* configure: Regenerate.

From-SVN: r237758
2016-06-24 15:37:06 +02:00
H.J. Lu 4967753008 Apply missing changes
From-SVN: r237737
2016-06-23 09:46:46 -07:00
H.J. Lu c05977599a i386: Access external function via GOT slot for -fno-plt
i386 psABI has been updated to clarify that R_386_GOT32X and R_386_GOT32
relocations can be used to access GOT without base register when PIC is
disabled:

https://groups.google.com/forum/#!topic/ia32-abi/awsRSvJOJfs

32-bit x86 assembler and linker from binutils 2.26.1 and 2.27 support

call/jmp *_start@GOT
cmpl $0, bar@GOT

for both normal and IFUNC functions.  We check if 32-bit x86 assembler
and linker have the fix for:

https://sourceware.org/bugzilla/show_bug.cgi?id=20244

before accessing external function via GOT slot for -fno-plt in both PIC
and non-PIC modes.

	PR target/66232
	PR target/67400
	* configure.ac (as_ix86_tls_ldm_opt): Renamed to ...
	(as_ix86_gas_32_opt): This.
	(ld_ix86_tls_ldm_opt): Renamed to ...
	(ld_ix86_gld_32_opt): This.
	(R_386_TLS_LDM reloc): Updated.
	(R_386_GOT32X reloc): New assembler/linker check.
	(HAVE_AS_IX86_GOT32X): New.  Defined to 1 if 32-bit assembler and
	linker support "jmp *_start@GOT" and "cmpl $0, bar@GOT".  Otherise,
	defined to 0.
	* config.in: Regenerated.
	* configure: Likewise.
	* config/i386/i386.c (ix86_force_load_from_GOT_p): Return
	true if HAVE_AS_IX86_GOT32X is 1 in 32-bit mode.
	(ix86_legitimate_address_p): Allow UNSPEC_GOT for -fno-plt
	if ix86_force_load_from_GOT_p returns true.
	(ix86_print_operand_address_as): Also support UNSPEC_GOT if
	ix86_force_load_from_GOT_p returns true.
	(ix86_expand_move): Generate UNSPEC_GOT in 32-bit mode to load
	the external function address via the GOT slot.
	(ix86_nopic_noplt_attribute_p): Check both TARGET_64BIT and
	HAVE_AS_IX86_GOT32X before returning false.
	(ix86_output_call_insn): Generate "%!jmp/call\t*%p0@GOT" in
	32-bit mode if ix86_nopic_noplt_attribute_p returns true.

gcc/testsuite/

	PR target/66232
	PR target/67400
	* gcc.target/i386/pr66232-14.c: New file.
	* gcc.target/i386/pr66232-15.c: Likewise.
	* gcc.target/i386/pr66232-16.c: Likewise.
	* gcc.target/i386/pr66232-17.c: Likewise.
	* gcc.target/i386/pr67400-1.c: Don't disable for ia32.  Scan for
	ia32 if R_386_GOT32X relocation is supported.
	* gcc.target/i386/pr67400-2.c: Likewise.
	* gcc.target/i386/pr67400-3.c: Likewise.
	* gcc.target/i386/pr67400-4.c: Likewise.
	* gcc.target/i386/pr67400-6.c: Likewise.
	* gcc.target/i386/pr67400-7.c: Likewise.
	* lib/target-supports.exp (check_effective_target_got32x_reloc):
	New.

From-SVN: r237736
2016-06-23 09:30:43 -07:00
Rainer Orth 7320a4b519 Handle gas/gld --compress-debug-sections=type
* configure.ac (gcc_cv_as_compress_debug): Remove
	--compress-debug-sections as extra as switch.
	Handle gas --compress-debug-sections=type.
	(gcc_cv_ld_compess_debug): Remove bogus ld_date check.
	Handle gld --compress-debug-sections=type.
	* configure: Regenerate.

From-SVN: r237680
2016-06-22 09:09:27 +00:00
Trevor Saunders 8466af0668 remove knetbsd support
gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove support for knetbsd.
	* configure.ac: Likewise.
	* config/i386/knetbsd-gnu.h: Remove.  * config/i386/knetbsd-gnu64.h: Remove.
	* config/knetbsd-gnu.h: Remove.
	* configure: Regenerate.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove support for knetbsd.

libstdc++-v3/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* configure: Regenerate.
	* configure.host: Remove support for knetbsd.
	* crossconfig.m4: Likewise.

contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: stop testing knetbsd.

From-SVN: r237662
2016-06-21 21:57:30 +00:00
Trevor Saunders ee2499b4d4 remove support for the interix target
contrib/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config-list.mk: Remove interix target.

libgcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.host: Remove interix support.
	* config/i386/t-interix: Remove.

config/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* elf.m4: Remove interix support.
	* picflag.m4: Likewise.

fixincludes/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* mkfixinc.sh: Remove interix support.

gcc/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config.gcc: Remove interix support.
	* config/i386/i386-interix.h: Remove.
	* config/i386/interix.opt: Remove.
	* config/i386/t-interix: Remove.
	* configure: Regenerate.
	* configure.ac: Remove interix support.
	* doc/install.texi: Remove interix documentation.

gcc/testsuite/ChangeLog:

2016-06-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* gcc.dg/attr-ms_struct-1.c: Stop testing interix.
	* gcc.dg/attr-ms_struct-2.c: Likewise.
	* gcc.dg/attr-ms_struct-packed1.c: Likewise.
	* gcc.dg/bf-ms-attrib.c: Likewise.
	* gcc.dg/bf-ms-layout-2.c: Likewise.
	* gcc.dg/bf-ms-layout-3.c: Likewise.
	* gcc.dg/bf-ms-layout.c: Likewise.
	* gcc.dg/bf-no-ms-layout.c: Likewise.
	* gcc.target/i386/bitfield1.c: Likewise.
	* gcc.target/i386/bitfield2.c: Likewise.
	* gcc.target/i386/bitfield3.c: Likewise.

From-SVN: r237660
2016-06-21 21:57:20 +00:00
Jose E. Marchesi 690f24b775 sparc: support for the SPARC M7 and VIS 4.0
gcc/ChangeLog:
    
2016-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* config/sparc/sparc.md (cpu): Add niagara7 cpu type.
    	Include the M7 SPARC DFA scheduler.
    	New attribute v3pipe.
    	Annotate insns with v3pipe where appropriate.
    	Define cpu_feature vis4.
    	Add lzd instruction type and set it on clzdi_sp64 and clzsi_sp64.
    	Add (V8QI "8") to vbits.
    	Add insns {add,sub}v8qi3
    	Add insns ss{add,sub}v8qi3
    	Add insns us{add,sub}{v8qi,v4hi}3
    	Add insns {min,max}{v8qi,v4hi,v2si}3
    	Add insns {minu,maxu}{v8qi,v4hi,v2si}3
    	Add insns fpcmp{le,gt,ule,ug,ule,ugt}{8,16,32}_vis.
    	* config/sparc/niagara4.md: Add a comment explaining the
    	discrepancy between the documented latenty numbers and the
    	implemented ones.
    	* config/sparc/niagara7.md: New file.
    	* configure.ac (HAVE_AS_SPARC5_VIS4): Define if the assembler
    	supports SPARC5 and VIS 4.0 instructions.
    	* configure: Regenerate.
    	* config.in: Likewise.
    	* config.gcc: niagara7 is a supported cpu in sparc*-*-* targets.
    	* config/sparc/sol2.h (ASM_CPU32_DEFAUILT_SPEC): Set for
    	TARGET_CPU_niagara7.
    	(ASM_CPU64_DEFAULT_SPEC): Likewise.
    	(CPP_CPU_SPEC): Handle niagara7.
    	(ASM_CPU_SPEC): Likewise.
    	* config/sparc/sparc-opts.h (processor_type): Add
    	PROCESSOR_NIAGARA7.
    	(mvis4): New option.
    	* config/sparc/sparc.h (TARGET_CPU_niagara7): Define.
    	(AS_NIAGARA7_FLAG): Define.
    	(ASM_CPU64_DEFAULT_SPEC): Set for niagara7.
    	(CPP_CPU64_DEFAULT_SPEC): Likewise.
    	(CPP_CPU_SPEC): Handle niagara7.
    	(ASM_CPU_SPEC): Likewise.
    	* config/sparc/sparc.c (niagara7_costs): Define.
    	(sparc_option_override): Handle niagara7 and adjust cache-related
    	parameters with better values for niagara cpus.  Also support VIS4.
    	(sparc32_initialize_trampoline): Likewise.
    	(sparc_use_sched_lookahead): Likewise.
    	(sparc_issue_rate): Likewise.
    	(sparc_register_move_cost): Likewise.
    	(dump_target_flag_bits): Support VIS4.
    	(sparc_vis_init_builtins): Likewise.
    	(sparc_builtins): Likewise.
    	* config/sparc/sparc-c.c (sparc_target_macros): Define __VIS__ for
    	VIS4 4.0.
    	* config/sparc/driver-sparc.c (cpu_names): Add SPARC-M7 and
    	UltraSparc M7.
    	* config/sparc/sparc.opt (sparc_processor_type): New value
    	niagara7.
    	* config/sparc/visintrin.h (__attribute__): Prototypes for the
    	VIS4 builtins.
    	* doc/invoke.texi (SPARC Options): Document -mcpu=niagara7 and
    	-mvis4.
    	* doc/extend.texi (SPARC VIS Built-in Functions): Document the
    	VIS4 builtins.
    
gcc/testsuite/ChangeLog:
    
2016-06-06  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* gcc.target/sparc/vis4misc.c: New file.
    	* gcc.target/sparc/fpcmp.c: Likewise.
    	* gcc.target/sparc/fpcmpu.c: Likewise.

From-SVN: r237132
2016-06-06 13:40:02 +02:00
Ulrich Weigand 9b2bf368d7 configure.ac: Treat a --with-headers option without argument the same as the default (i.e.
* configure.ac: Treat a --with-headers option without argument
	the same as the default (i.e. consult sys-include directory).
	* configure: Regenerate.

From-SVN: r236825
2016-05-27 14:50:06 +00:00
Eric Botcazou 47e62307a7 configure.ac: Add ACX_NONCANONICAL_HOST.
gnattools/
	* configure.ac: Add ACX_NONCANONICAL_HOST.
	* configure: Regenerate.
	* Makefile.in: Replace host_alias with host_noncanonical.
	(gnattools-cross): Do not rename the tools.
gcc/
	* configure.ac: Add ACX_NONCANONICAL_HOST.
	* configure: Regenerate.
	* Makefile.in: Set host_noncanonical.
gcc/ada
	* gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
	cross case, use host_noncanonical instead of host as prefix.
	(GNATBIND_FOR_HOST): Likewise.
	(GNATLINK_FOR_HOST): Likewise.
	(GNATLS_FOR_HOST): Likewise.

From-SVN: r236267
2016-05-16 08:55:12 +00:00
Rainer Orth ad103b0153 Error out on -fvtable-verify without --enable-vtable-verify
* configure.ac (enable_vtable_verify): Handle --enable-vtable-verify.
	* configure: Regenerate.
	* config.in: Regenerate.
	* gcc.c (VTABLE_VERIFICATION_SPEC) [!ENABLE_VTABLE_VERIFY]: Error
	on -fvtable-verify.
	* config/sol2.h [!ENABLE_VTABLE_VERIFY] (STARTFILE_VTV_SPEC): Define.
	(ENDFILE_VTV_SPEC): Define.

From-SVN: r236029
2016-05-09 11:54:55 +00:00
Claudiu Zissulescu 28633bbd10 [ARC] Add TLS support.
gcc/
2016-04-28  Claudiu Zissulescu  <claziss@synopsys.com>
	    Joern Rennecke  <joern.rennecke@embecosm.com>

	* config/arc/arc-protos.h (arc_legitimize_pic_address): Remove
	declaration.
	(emit_pic_move): Remove.
	(arc_eh_uses, insn_is_tls_gd_dispatch): Declare.
	* config/arc/arc.c (emit_pic_move): Removed.
	(TARGET_HAVE_TLS): Define.
	(arc_conditional_register_usage): Test for arc_tp_regno.
	(arc_print_operand, arc_print_operand_address): Handle TLS
	unspecs.
	(arc_needs_pcl_p): New function.
	(arc_legitimate_pc_offset_p): Use arc_needs_pcl_p.
	(arc_legitimate_pic_addr_p): Handle TLS unspecs.
	(arc_raw_symbolic_reference_mentioned_p): Likewise.
	(arc_get_tp, arc_emit_call_tls_get_addr): New function.
	(arc_legitimize_tls_address): Likewise.
	(DTPOFF_ZERO_SYM): Define.
	(arc_legitimize_pic_address): Make it static, handle TLS cases.
	(arc_output_pic_addr_const): Print TLS unspecs.
	(prepare_pic_move): New function, replaces emit_pic_move.
	(arc_legitimate_constant_p): Handle TLS unspecs.
	(arc_legitimate_address_p): Likewise.
	(arc_rewrite_small_data_p): Use assert for TLS constants.
	(prepare_move_operands): Use prepare_pic_move.
	(arc_legitimize_address): Legitimize tls addresses.
	(arc_epilogue_uses): Check for arc_tp_regno.
	(arc_eh_uses, insn_is_tls_gd_dispatch): New function.
	* config/arc/arc.h [DEFAULT_LIBC != LIBC_UCLIBC] (EXTRA_SPECS):
	Define.
	[DEFAULT_LIBC != LIBC_UCLIBC] (ARC_TLS_EXTRA_START_SPEC):
	Likewise.
	[DEFAULT_LIBC != LIBC_UCLIBC] (STARTFILE_SPEC): Add
	%(arc_tls_extra_start_spec).
	(TARGET_CPU_CPP_BUILTINS): Define __ARC_TLS_REGNO__.
	(REGNO_OK_FOR_BASE_P): Check for arc_tp_regno.
	(EH_USES): Define.
	(INSN_REFERENCES_ARE_DELAYED): Use insn_is_tls_gd_dispatch.
	* config/arc/arc.md (UNSPEC_TLS_GD, UNSPEC_TLS_LD, UNSPEC_TLS_IE)
	(UNSPEC_TLS_OFF): Add.
	(R10_REG): Define.
	(tls_load_tp_soft, tls_gd_load, tls_gd_get_addr, tls_gd_dispatch)
	(get_thread_pointersi): New patterns.
	* config/arc/arc.opt (mtp-regno): New option.
	* config/arc/predicates.md (move_src_operand): Handle TLS symbols.
	(move_dest_operand): Likewise.
	* configure: Regenerate.
	* configure.ac: Add arc*-*-* case to test for tls.
	* doc/invoke.texi (ARC options): Document mtp-regno.

Co-Authored-By: Joern Rennecke <joern.rennecke@embecosm.com>

From-SVN: r235559
2016-04-28 13:53:46 +02:00
Jakub Jelinek 7db11a5a32 re PR bootstrap/70704 (AIX bootstrap comparison failure)
PR bootstrap/70704
	* configure.ac (--enable-stage1-checking): For --disable-checking or
	implicit --enable-checking, make sure extra flag matches in between
	stage1 and later checking.
	* configure: Regenerated.
gcc/
	* configure.ac (--enable-checking): Document extra flag, for
	non-release builds default to --enable-checking=yes,extra.
	If misc checking and extra checking, define CHECKING_P to 2 instead
	of 1.
	* common.opt (fchecking=): Add.
	* doc/invoke.texi (-fchecking=): Document.
	* doc/install.texi: Document --enable-checking changes.
	* configure: Regenerated.
	* config.in: Regenerated.
gcc/cp/
	* pt.c (build_non_dependent_expr): Use flag_checking > 1 instead of
	just flag_checking.

From-SVN: r235430
2016-04-26 08:10:43 +02:00
Thomas Klausner 388dc9e6fd re PR target/68380 (NetBSD has SSP in libc)
2016-01-27  Thomas Klausner  <wiz@NetBSD.org>

	PR target/68380
	* configure.ac: NetBSD provides SSP in its C library.
	* configure: Updated.

From-SVN: r232884
2016-01-27 09:54:48 -07:00
Michael Matz 3dde4d658b configure.ac (ac_cv_std_swap_in_utility): New test.
* configure.ac (ac_cv_std_swap_in_utility): New test.
	* system.h (<algorithm>): Check HAVE_SWAP_IN_UTILITY as well.
	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r232836
2016-01-26 16:34:24 +00:00
David Edelsohn 4b7a526411 configure.ac (gcc_cv_as_powerpc_mfcrf, [...]): Detangle.
* configure.ac (gcc_cv_as_powerpc_mfcrf, gcc_cv_as_machine_directive):
        Detangle.

From-SVN: r232697
2016-01-21 13:50:17 -05:00
David Edelsohn 975b10daea Fix typo
From-SVN: r232675
2016-01-21 09:08:35 -05:00
David Edelsohn a52f938b1b configure.ac (gcc_cv_as_dwloc): Test support for debug frame section label reference.
* configure.ac (gcc_cv_as_dwloc): Test support for debug frame section
label reference.
* configure: Regenerate.

From-SVN: r232673
2016-01-21 08:53:28 -05:00
Peter Bergner 26a2e6aed4 ppc-auxv.h: New file.
gcc/
	* config/rs6000/ppc-auxv.h: New file.
	* config/rs6000/rs6000-builtin.def (cpu_init): Add new builtin.
	(cpu_is): Likewise.
	(cpu_supports): Likewise.
	* config/rs6000/rs6000.c: include "ppc-auxv.h".
	(cpu_is_info): New variable.
	(cpu_supports_info): Likewise.
	(tcb_verification_symbol): Likewise.
	(cpu_builtin_p): Likewise.
	(cpu_expand_builtin): New function.
	(rs6000_expand_ternop_builtin): Add support for CPU builtin functions.
	(rs6000_init_builtins): Likewise.
	(rs6000_elf_file_end): Emit HWCAP in TCB verification symbol.
	* config/rs6000/rs6000.h (TLS_REGNUM): New define.
	* configure.ac (gcc_cv_libc_provides_hwcap_in_tcb): New test.
	* configure: Regenerate.
	* config.in: Likewise.
	* doc/extend.texi (PowerPC Built-in Functions): Document
	__builtin_cpu_init, __builtin_cpu_is and __builtin_cpu_supports.

gcc/testsuite/
	* gcc.target/powerpc/cpu-builtin-1.c: New test.

From-SVN: r232634
2016-01-20 14:30:24 -06:00
Martin Jambor b2b4005150 Merge of HSA
2016-01-19  Martin Jambor  <mjambor@suse.cz>
	    Martin Liska  <mliska@suse.cz>
	    Michael Matz <matz@suse.de>

libgomp/
	* plugin/Makefrag.am: Add HSA plugin requirements.
	* plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
	(HSA_RUNTIME_LIB): Likewise.
	(HSA_RUNTIME_CPPFLAGS): Likewise.
	(HSA_RUNTIME_INCLUDE): New substitution.
	(HSA_RUNTIME_LIB): Likewise.
	(HSA_RUNTIME_LDFLAGS): Likewise.
	(hsa-runtime): New configure option.
	(hsa-runtime-include): Likewise.
	(hsa-runtime-lib): Likewise.
	(PLUGIN_HSA): New substitution variable.
	Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
	configure options.
	(PLUGIN_HSA_CPPFLAGS): Likewise.
	(PLUGIN_HSA_LDFLAGS): Likewise.
	(PLUGIN_HSA_LIBS): Likewise.
	Check that we have access to HSA run-time.
	* libgomp-plugin.h (offload_target_type): New element
	OFFLOAD_TARGET_TYPE_HSA.
	* libgomp.h (gomp_target_task): New fields firstprivate_copies and
	args.
	(bool gomp_create_target_task): Updated.
	(gomp_device_descr): Extra parameter of run_func and async_run_func,
	new field can_run_func.
	* libgomp_g.h (GOMP_target_ext): Update prototype.
	* oacc-host.c (host_run): Added a new parameter args.
	* target.c (calculate_firstprivate_requirements): New function.
	(copy_firstprivate_data): Likewise.
	(gomp_target_fallback_firstprivate): Use them.
	(gomp_target_unshare_firstprivate): New function.
	(gomp_get_target_fn_addr): Allow returning NULL for shared memory
	devices.
	(GOMP_target): Do host fallback for all shared memory devices.  Do not
	pass any args to plugins.
	(GOMP_target_ext): Introduce device-specific argument parameter args.
	Allow host fallback if device shares memory.  Do not remap data if
	device has shared memory.
	(gomp_target_task_fn): Likewise.  Also treat shared memory devices
	like host fallback for mappings.
	(GOMP_target_data): Treat shared memory devices like host fallback.
	(GOMP_target_data_ext): Likewise.
	(GOMP_target_update): Likewise.
	(GOMP_target_update_ext): Likewise.  Also pass NULL as args to
	gomp_create_target_task.
	(GOMP_target_enter_exit_data): Likewise.
	(omp_target_alloc): Treat shared memory devices like host fallback.
	(omp_target_free): Likewise.
	(omp_target_is_present): Likewise.
	(omp_target_memcpy): Likewise.
	(omp_target_memcpy_rect): Likewise.
	(omp_target_associate_ptr): Likewise.
	(gomp_load_plugin_for_device): Also load can_run.
	* task.c (GOMP_PLUGIN_target_task_completion): Free
	firstprivate_copies.
	(gomp_create_target_task): Accept new argument args and store it to
	ttask.
	* plugin/plugin-hsa.c: New file.

gcc/
	* Makefile.in (OBJS): Add new source files.
	(GTFILES): Add hsa.c.
	* common.opt (disable_hsa): New variable.
	(-Whsa): New warning.
	* config.in (ENABLE_HSA): New.
	* configure.ac: Treat hsa differently from other accelerators.
	(OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to
	$enable_offloading.
	(ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa.
	* doc/install.texi (Configuration): Document --with-hsa-runtime,
	--with-hsa-runtime-include, --with-hsa-runtime-lib and
	--with-hsa-kmt-lib.
	* doc/invoke.texi (-Whsa): Document.
	(hsa-gen-debug-stores): Likewise.
	* lto-wrapper.c (compile_images_for_offload_targets): Do not attempt
	to invoke offload compiler for hsa acclerator.
	* opts.c (common_handle_option): Determine whether HSA offloading
	should be performed.
	* params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter.
	* builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
	* gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY.
	* gimple-pretty-print.c (dump_gimple_omp_for): Also handle
	GF_OMP_FOR_KIND_GRID_LOOP.
	(dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY.
	(pp_gimple_stmt_1): Likewise.
	* gimple-walk.c (walk_gimple_stmt): Likewise.
	* gimple.c (gimple_build_omp_grid_body): New function.
	(gimple_copy): Also handle GIMPLE_OMP_GRID_BODY.
	* gimple.def (GIMPLE_OMP_GRID_BODY): New.
	* gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY,
	GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and
	GF_OMP_TEAMS_GRID_PHONY.
	(gimple_statement_omp_single_layout): Updated comments.
	(gimple_build_omp_grid_body): New function.
	(gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY.
	(gimple_omp_for_grid_phony): New function.
	(gimple_omp_for_set_grid_phony): Likewise.
	(gimple_omp_parallel_grid_phony): Likewise.
	(gimple_omp_parallel_set_grid_phony): Likewise.
	(gimple_omp_teams_grid_phony): Likewise.
	(gimple_omp_teams_set_grid_phony): Likewise.
	(gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY.
	* omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New.
	(BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise.
	(BUILT_IN_GOMP_TARGET): Updated type.
	* omp-low.c: Include symbol-summary.h, hsa.h and params.h.
	(adjust_for_condition): New function.
	(get_omp_for_step_from_incr): Likewise.
	(extract_omp_for_data): Moved parts to adjust_for_condition and
	get_omp_for_step_from_incr.
	(build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY.
	(fixup_child_record_type): Bail out if receiver_decl is NULL.
	(scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_.
	(scan_omp_parallel): Do not create child functions for phony
	constructs.
	(check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY.
	(scan_omp_1_op): Checking assert we are not remapping to
	ERROR_MARK.  Also also handle GIMPLE_OMP_GRID_BODY.
	(parallel_needs_hsa_kernel_p): New function.
	(expand_parallel_call): Register apprpriate parallel child
	functions as HSA kernels.
	(grid_launch_attributes_trees): New type.
	(grid_attr_trees): New variable.
	(grid_create_kernel_launch_attr_types): New function.
	(grid_insert_store_range_dim): Likewise.
	(grid_get_kernel_launch_attributes): Likewise.
	(get_target_argument_identifier_1): Likewise.
	(get_target_argument_identifier): Likewise.
	(get_target_argument_value): Likewise.
	(push_target_argument_according_to_value): Likewise.
	(get_target_arguments): Likewise.
	(expand_omp_target): Call get_target_arguments instead of looking
	up for teams and thread limit.
	(grid_expand_omp_for_loop): New function.
	(grid_arg_decl_map): New type.
	(grid_remap_kernel_arg_accesses): New function.
	(grid_expand_target_kernel_body): New function.
	(expand_omp): Call it.
	(lower_omp_for): Do not emit phony constructs.
	(lower_omp_taskreg): Do not emit phony constructs but create for them
	a temporary variable receiver_decl.
	(lower_omp_taskreg): Do not emit phony constructs.
	(lower_omp_teams): Likewise.
	(lower_omp_grid_body): New function.
	(lower_omp_1): Call it.
	(grid_reg_assignment_to_local_var_p): New function.
	(grid_seq_only_contains_local_assignments): Likewise.
	(grid_find_single_omp_among_assignments_1): Likewise.
	(grid_find_single_omp_among_assignments): Likewise.
	(grid_find_ungridifiable_statement): Likewise.
	(grid_target_follows_gridifiable_pattern): Likewise.
	(grid_remap_prebody_decls): Likewise.
	(grid_copy_leading_local_assignments): Likewise.
	(grid_process_kernel_body_copy): Likewise.
	(grid_attempt_target_gridification): Likewise.
	(grid_gridify_all_targets_stmt): Likewise.
	(grid_gridify_all_targets): Likewise.
	(execute_lower_omp): Call grid_gridify_all_targets.
	(make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY.
	* tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_.
	(tree_omp_clause): Added union field dimension.
	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_.
	* tree.c (omp_clause_num_ops): Added number of arguments of
	OMP_CLAUSE__GRIDDIM_.
	(omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_.
	(walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_.
	* tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New.
	(OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise.
	(OMP_CLAUSE_GRIDDIM_SIZE): Likewise.
	(OMP_CLAUSE_GRIDDIM_GROUP): Likewise.
	* passes.def: Schedule pass_ipa_hsa and pass_gen_hsail.
	* tree-pass.h (make_pass_gen_hsail): Declare.
	(make_pass_ipa_hsa): Likewise.
	* ipa-hsa.c: New file.
	* lto-section-in.c (lto_section_name): Add hsa section name.
	* lto-streamer.h (lto_section_type): Add hsa section.
	* timevar.def (TV_IPA_HSA): New.
        * hsa-brig-format.h: New file.
	* hsa-brig.c: New file.
	* hsa-dump.c: Likewise.
	* hsa-gen.c: Likewise.
	* hsa.c: Likewise.
	* hsa.h: Likewise.
	* toplev.c (compile_file): Call hsa_output_brig.
	* hsa-regalloc.c: New file.

gcc/fortran/
	* types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.

gcc/lto/
	* lto-partition.c: Include "hsa.h"
	(add_symbol_to_partition_1): Put hsa implementations into the
	same partition as host implementations.

liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New
	unused parameter.
	(GOMP_OFFLOAD_run): Likewise.

include/
	* gomp-constants.h (GOMP_DEVICE_HSA): New macro.
	(GOMP_VERSION_HSA): Likewise.
	(GOMP_TARGET_ARG_DEVICE_MASK): Likewise.
	(GOMP_TARGET_ARG_DEVICE_ALL): Likewise.
	(GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise.
	(GOMP_TARGET_ARG_ID_MASK): Likewise.
	(GOMP_TARGET_ARG_NUM_TEAMS): Likewise.
	(GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
	(GOMP_TARGET_ARG_VALUE_SHIFT): Likewise.
	(GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise.

From-SVN: r232549
2016-01-19 11:35:10 +01:00
Gerald Pfeifer 72665d8d49 configure.ac (isl_options_set_schedule_serialize_sccs): Also use GMPINC.
* configure.ac (isl_options_set_schedule_serialize_sccs): Also
	use GMPINC.
	* configure: Regenerate.

From-SVN: r232190
2016-01-09 13:25:22 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Sebastian Pop e357a5e03c replace ISL with isl
From-SVN: r231784
2015-12-17 18:50:05 +00:00
Rainer Orth 01704e5ad9 Only support -gstabs on Mac OS X if assember supports it (PR target/67973)
gcc:
	PR target/67973
	* configure.ac (gcc_cv_as_stabs_directive): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/darwin.h (DBX_DEBUGGING_INFO): Wrap in
	HAVE_AS_STABS_DIRECTIVE.
	(PREFERRED_DEBUGGING_TYPE): Likewise.
	* config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Only include
	DBX_DEBUG if HAVE_AS_STABS_DIRECTIVE.

	* doc/sourcebuild.texi (Effective-Target Keywords, Environment
	attributes): Document stabs.

	gcc/testsuite:
	PR target/67973
	* lib/target-supports.exp (check_effective_target_stabs): New
	proc.
	* g++.dg/cpp0x/alias-decl-debug-0.C: Restrict to stabs targets.
	* g++.dg/other/PR23205.C: Likewise.
	* g++.dg/other/pr23205-2.C: Likewise.
	* gcc.dg/20040813-1.c: Likewise.
	* gcc.dg/darwin-20040809-2.c: Likewise.
	* objc.dg/stabs-1.m: Likewise.

From-SVN: r231747
2015-12-17 09:23:08 +00:00
Aditya Kumar 560d18d3ed update required isl version
we check for a the isl compute timeout function added in isl 0.13.
That means GCC could still be configured with isl 0.13, 0.14, and 0.15.

	* config/isl.m4 (ISL_CHECK_VERSION): Check for
	isl_ctx_get_max_operations.
	* configure: Regenerate.

	gcc/
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Remove checks for functions that exist in isl 0.13 or
	later.
	* graphite-isl-ast-to-gimple.c: Remove #ifdefs and code for isl 0.12.
        * graphite-optimize-isl.c: Same.
	* graphite-poly.c: Same.
	* graphite-sese-to-poly.c: Same.
	* graphite.h: Add comment for isl 0.14.
	* toplev.c (print_version): Print isl version.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r231706
2015-12-16 17:27:57 +00:00
Dominik Vogt ec47b0863a [PATCH 1/2] S/390: Implement "target" attribute.
gcc/ChangeLog

	* config/s390/s390.opt (s390_arch_string): Remove.
	(s390_tune_string): Likewise.
	(s390_cost_pointer): Add Variable.
	(s390_tune_flags): Add TargetVariable.
	(s390_arch_flags, march=, mbackchain, mdebug, mesa, mhard-dfp),
	(mhard-float, mlong-double-128, mlong-double-64, mhtm, mvx),
	(mpacked-stack, msmall-exec, msoft-float, mstack-guard=, mstack-size=),
	(mtune=, mmvcle, mzvector, mzarch, mbranch-cost=, mwarn-dynamicstack),
	(mwarn-framesize=): Save option.
	(mno-stack-guard, mno-stack-guard): New option.
	(mwarn-dynamicstack): Allow mno-warn-dynamicstack.
	(mwarn-framesize=): Convert to UInteger (negative values are rejected
	now).
	* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Split setting
	macros changeable through the GCC target pragma into a separate
	function.
	(s390_cpu_cpp_builtins): Likewise.
	(s390_pragma_target_parse): New function, implement GCC target pragma
	if enabled.
	(s390_register_target_pragmas): Register s390_pragma_target_parse if
	available.
	* common/config/s390/s390-common.c (s390_handle_option):
	Export.
	Move setting s390_arch_flags to s390.c.
	Remove s390_tune_flags.
	Allow 0 as argument to -mstack-size (switch to default value).
	Allow 0 as argument to -mstack-guard (switch off).
	Remove now unnecessary explicit parsing code for -mwarn-framesize.
	* config/s390/s390-protos.h (s390_handle_option): Export.
	(s390_valid_target_attribute_tree): Export.
	(s390_reset_previous_fndecl): Export.
	* config/s390/s390-builtins.def: Use new macro B_GROUP to mark the start
	and end of HTM and VX builtins.
	(s390_asm_output_function_prefix): Declare hook.
	(s390_asm_declare_function_size): Likewise.
	* config/s390/s390-builtins.h (B_GROUP): Use macro.
	* config/s390/s390-opts.h: Add comment about processor_type usage.
	* config/s390/s390.h (TARGET_CPU_IEEE_FLOAT_P, TARGET_CPU_ZARCH_P),
	(TARGET_CPU_LONG_DISPLACEMENT_P, TARGET_CPU_EXTIMM_P, TARGET_CPU_DFP_P),
	(TARGET_CPU_Z10_P, TARGET_CPU_Z196_P, TARGET_CPU_ZEC12_P),
	(TARGET_CPU_HTM_P, TARGET_CPU_Z13_P, TARGET_CPU_VX_P),
	(TARGET_HARD_FLOAT_P, TARGET_LONG_DISPLACEMENT_P, TARGET_EXTIMM_P),
	(TARGET_DFP_P, TARGET_Z10_P, TARGET_Z196_P, TARGET_ZEC12_P),
	(TARGET_HTM_P, TARGET_Z13_P, TARGET_VX_P, TARGET_CPU_EXTIMM),
	(TARGET_CPU_DFP, TARGET_CPU_Z10, TARGET_CPU_Z196, TARGET_CPU_ZEC12),
	(TARGET_CPU_HTM, TARGET_CPU_Z13, TARGET_LONG_DISPLACEMENT),
	(TARGET_EXTIMM, TARGET_DFP, TARGET_Z10, TARGET_Z196, TARGET_ZEC12),
	(TARGET_Z13, TARGET_VX, S390_USE_TARGET_ATTRIBUTE),
	(S390_USE_ARCHITECTURE_MODIFIERS, SWITCHABLE_TARGET),
	(ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_FUNCTION_PREFIX): Likewise.
	* config/s390/vecintrin.h: Use vector definitions even if __VEC__ is
	undefined.
	(vec_all_nan): Rewrite as macro using statement expressions to avoid
	that the vector keyword needs to be defined when including the file.
	(vec_all_numeric): Likewise.
	(vec_any_nan): Likewise.
	(vec_any_numeric):  Likewise.
	* config/s390/s390.c (s390_previous_fndecl): New static variable.
	(s390_set_current_function): New function.
	(s390_cost): Wrapper macro to allow defining the cost table pointer in
	the options file.
	(processor_table): Table for march= and mtune= parsing.
	(s390_init_builtins): Enable all builtins and types unconditionally.
	(s390_expand_builtin): Generate an error message if builtin is not
	supported by current options.
	Correct an error message.
	(s390_function_specific_restore): New function to set s390_cost.
	(s390_asm_output_machine_for_arch): New function for emitting .machine
	and .machinmode directives to the assembler file.
	(s390_asm_output_function_prefix): Likewise.
	(s390_asm_declare_function_size):  Likewise.
	(s390_asm_output_function_label): Add mdebug output for feature testing.
	(s390_option_override): Move implementation into internal function.
	(s390_option_override_internal): Likewise.
	Implement option overriding based on current options.
	(s390_valid_target_attribute_inner_p): New function implementing target
	attribute logic.
	(s390_valid_target_attribute_tree): Likewise.
	(s390_valid_target_attribute_p): Likewise.
	(s390_reset_previous_fndecl): Likewise.
	(s390_set_current_function): Likewise.
	(TARGET_SET_CURRENT_FUNCTION): Provide target hook function.
	(TARGET_OPTION_VALID_ATTRIBUTE_P): Likewise.
	(TARGET_OPTION_RESTORE): Likewise.
	* doc/extend.texi: S390: Document target attribute and pragma.
	* config.in: Regenerated.
	* configure: Regenerated.
	* configure.ac: S390: Check for .machinemode and .machine in gas.
	S390: Check for architecture modifiers support in gas.

gcc/testsuite/ChangeLog

	* gcc.target/s390/asm-machine-1.c: New test.
	* gcc.target/s390/asm-machine-2.c: New test.
	* gcc.target/s390/asm-machine-3.c: New test.
	* gcc.target/s390/asm-machine-4.c: New test.
	* gcc.target/s390/target-attribute/tattr-1.c: New test.
	* gcc.target/s390/target-attribute/tattr-2.c: New test.
	* gcc.target/s390/target-attribute/tattr-3.c: New test.
	* gcc.target/s390/target-attribute/tattr-4.c: New test.
	* gcc.target/s390/target-attribute/tattr-5.c: New test.
	* gcc.target/s390/target-attribute/tattr-6.c: New test.
	* gcc.target/s390/target-attribute/tattr-7.c: New test.
	* gcc.target/s390/target-attribute/tattr-8.c: New test.
	* gcc.target/s390/target-attribute/tattr-9.c: New test.
	* gcc.target/s390/target-attribute/tattr-10.c: New test.
	* gcc.target/s390/target-attribute/tattr-11.c: New test.
	* gcc.target/s390/target-attribute/tattr-12.c: New test.
	* gcc.target/s390/target-attribute/tattr-13.c: New test.
	* gcc.target/s390/target-attribute/tattr-14.c: New test.
	* gcc.target/s390/target-attribute/tattr-15.c: New test.
	* gcc.target/s390/target-attribute/tattr-16.c: New test.
	* gcc.target/s390/target-attribute/tattr-17.c: New test.
	* gcc.target/s390/target-attribute/tattr-18.c: New test.
	* gcc.target/s390/target-attribute/tattr-19.c: New test.
	* gcc.target/s390/target-attribute/tattr-arch-tune-1.c: New test.
	* gcc.target/s390/target-attribute/tattr-arch-tune-2.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-1.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-2.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-3.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-4.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-5.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-6.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-7.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-8.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-9.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-10.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-11.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-12.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-13.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-14.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-15.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-16.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-17.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-18.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-19.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-20.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-21.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-22.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-23.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-24.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-25.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-26.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-27.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-28.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-29.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-30.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-31.c: New test.
	* gcc.target/s390/target-attribute/tattr-m31-32.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-1.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-2.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-3.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-4.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-5.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-6.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-7.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-8.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-9.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-10.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-11.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-12.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-13.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-14.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-15.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-16.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-17.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-18.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-19.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-20.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-21.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-22.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-23.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-24.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-25.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-26.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-27.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-28.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-29.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-30.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-31.c: New test.
	* gcc.target/s390/target-attribute/tattr-m64-32.c: New test.
	* gcc.target/s390/target-attribute/tpragma-struct-vx-2.c: New test.
	* gcc.target/s390/s390.exp (check_effective_target_target_attribute):
	Add check whether target attribute is available.
	Run test in target-attribute subdir.
	* gcc.target/s390/s390-c++.exp
	(check_effective_target_target_attribute): Likewise.

From-SVN: r231271
2015-12-04 14:30:42 +00:00
Ulrich Weigand 157bb85d48 configure.ac: Check assembler support for R_PPC64_ENTRY relocation.
* configure.ac: Check assembler support for R_PPC64_ENTRY relocation.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/rs6000/rs6000.c (rs6000_global_entry_point_needed_p): New
	function.
	(rs6000_output_function_prologue): Use it instead of checking
	cfun->machine->r2_setup_needed.  Use internal labels instead of
	GNU as local label extension.  Handle ELFv2 large code model.
	(rs6000_output_mi_thunk): Do not set cfun->machine->r2_setup_needed.
	(rs6000_elf_declare_function_name): Handle ELFv2 large code model.

From-SVN: r231202
2015-12-02 19:52:53 +00:00
Eric Botcazou bcefc3444c re PR lto/61313 (configure incorrectly strips $target_alias from PLUGIN_LD_SUFFIX)
PR lto/61313
	* configure.ac (PLUGIN_LD_SUFFIX): Do not touch the value specified
	by the user.
	* configure: Regenerate.

From-SVN: r230603
2015-11-19 13:31:33 +00:00
Alan Modra 458bc9b1d0 A default of -z relro (as on Fedora) defeats the deliberate mis-alignment of .got in the testcase.
POWERPC64_TOC_POINTER_ALIGNMENT

A default of -z relro (as on Fedora) defeats the deliberate
mis-alignment of .got in the testcase.

	* configure.ac (POWERPC64_TOC_POINTER_ALIGNMENT): Pass -z norelro
	to ld.
	* configure: Regenerate.

From-SVN: r230509
2015-11-18 09:54:30 +10:30
Trevor Saunders 1d899da297 always define ENABLE_OFFLOADING
gcc/cp/ChangeLog:

2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* parser.c (cp_parser_omp_declare_target): Adjust.

gcc/ChangeLog:

2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* configure: Regenerate.
	* configure.ac: Always define ENABLE_OFFLOADING.
	* cgraph.c (cgraph_node::create): Adjust.
	* gcc.c (process_command): Likewise.
	* omp-low.c (create_omp_child_function): Likewise.
	(expand_omp_target): Likewise.
	* varpool.c (varpool_node::get_create): Likewise.

gcc/c/ChangeLog:

2015-11-14  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* c-parser.c (c_parser_omp_declare_target): Adjust.

From-SVN: r230393
2015-11-15 00:18:08 +00:00
Mike Frysinger 9a55713856 gcc: configure: fix test == bashisms
From-SVN: r230146
2015-11-11 08:06:03 +00:00
Michael Meissner d1f0d3769e rs6000.opt (-mpower9-fusion): Add new switches for ISA 3.0 (power9).
2015-11-09  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.opt (-mpower9-fusion): Add new switches for
	ISA 3.0 (power9).
	(-mpower9-vector): Likewise.
	(-mpower9-dform): Likewise.
	(-mpower9-minmax): Likewise.
	(-mtoc-fusion): Likewise.
	(-mmodulo): Likewise.
	(-mfloat128-hardware): Likewise.

	* config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add option
	mask for ISA 3.0 (power9).
	(POWERPC_MASKS): Add new ISA 3.0 switches.
	(power9 cpu): Add power9 cpu.

	* config/rs6000/rs6000.h (ASM_CPU_POWER9_SPEC): Add support for
	power9.
	(ASM_CPU_SPEC): Likewise.
	(EXTRA_SPECS): Likewise.

	* config/rs6000/rs6000-opts.h (enum processor_type): Add
	PROCESSOR_POWER9.

	* config/rs6000/rs6000.c (power9_cost): Initial cost setup for
	power9.
	(rs6000_debug_reg_global): Add support for power9 fusion.
	(rs6000_setup_reg_addr_masks): Cache mode size.
	(rs6000_option_override_internal): Until real power9 tuning is
	added, use -mtune=power8 for -mcpu=power9.
	(rs6000_setup_reg_addr_masks): Do not allow pre-increment,
	pre-decrement, or pre-modify on SFmode/DFmode if we allow the use
	of Altivec registers.
	(rs6000_option_override_internal): Add support for ISA 3.0
	switches.
	(rs6000_loop_align): Add support for power9 cpu.
	(rs6000_file_start): Likewise.
	(rs6000_adjust_cost): Likewise.
	(rs6000_issue_rate): Likewise.
	(insn_must_be_first_in_group): Likewise.
	(insn_must_be_last_in_group): Likewise.
	(force_new_group): Likewise.
	(rs6000_register_move_cost): Likewise.
	(rs6000_opt_masks): Likewise.

	* config/rs6000/rs6000.md (cpu attribute): Add power9.
	* config/rs6000/rs6000-tables.opt: Regenerate.

	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
	_ARCH_PWR9 if power9 support is available.

	* config/rs6000/aix61.h (ASM_CPU_SPEC): Add power9.
	* config/rs6000/aix53.h (ASM_CPU_SPEC): Likewise.

	* configure.ac: Determine if the assembler supports the ISA 3.0
	instructions.
	* config.in (HAVE_AS_POWER9): Likewise.
	* configure: Regenerate.

	* doc/invoke.texi (RS/6000 and PowerPC Options): Document ISA 3.0
	switches.

From-SVN: r230031
2015-11-09 16:56:22 +00:00
Rainer Orth e6b6bf09dd Support init priority on Solaris
libgcc:
	* config/ia64/crtbegin.S: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.
	* config/ia64/crtend.S: Likewise.

	gcc:
	* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Allow for differences in
	assembler syntax.
	Support Solaris ld.
	Define HAVE_INITFINI_ARRAY_SUPPORT as 0/1.

	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Define to
	HAVE_INITFINI_ARRAY_SUPPORT.
	* config/initfini-array.h: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.

	* configure.ac (gcc_cv_as_sparc_nobits): Remove.
	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section):
	Don't check HAVE_AS_SPARC_NOBITS.
	Heed SECTION_NOTYPE.

	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r230013
2015-11-09 11:33:30 +00:00