Fix openmp support to use libgomp/config/linux

See a38e7b29885b25278b1d356b2efd21622376695d

Change-Id: I4e2671ea3aa8a67e9b5c6d5974b7486eb7ae54b7
Use READELF_FOR_TARGET in GCC 4.8

See
  b159d4300781ae367096e05076df56b1467d0d9b
  4ecf441b08bb3f039e3836b7517f079be70583ad
  651152db0b741de25918b21c42d604b8b6564eaa
  3c138513fb44386c87bd5276725d5459f9243833

Change-Id: I6a76c29b0cca118dba4ae012ef053a872f461da1
GNU libstdc++ --enable-linux-futex

See fe1a20404b19d5dd0cd0988d080cff8a455c2a76

Change-Id: I93f281d919bce84796670dc1b29917c690d39c15
Maintain default visibility for helper functions in libgcc.a.

Change-Id: If7890947b3391ec87a3fc2be9baa87ba821fa4ec
Misc fixes

1. Fixed darwin build of GCC 4.8/X86 by removing trailing
   ',' from the last item of enum.  Not discovered before
   because GCC 4.8 now builds with -Wall -Werror, and gcc-4.2.1
   in darwin is picky about that
2. Fixed -fuse-ld=mcld

Change-Id: I7b65edfb76841f14c3290acb5a98f556d00e1139
Add -fuse-ld=mcld

GCC 4.8 differs from previous GCCs where the option is -fuse-ld=
Also form Negative() circle for bfd/gold/mcld which is mutually
exclusive

Change-Id: I814c3380ad5199691e5a930f5d02696d283d19df
Disable aarch64/linux-unwind.h for now

Change-Id: I5ab969f1f7f049ebd043fe6e5a2b219c30338571
Update -mstack-protector-guard= support based on upstream comments

See http://gcc.gnu.org/ml/gcc-patches/2013-04/msg00764.html

Change-Id: I8aad144f579def5629fcb7cb29a68d057b809be2
Fix GNU4.7/4.8 libstdc++ for clang

Two fixes
1) Undefine GCC4.7/4.8 _GLIBCXX_ATOMIC_BUILTINS

   Clang arm/mips can't compile the following atomic intrinsics yet
     __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
     __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);

   Use library calls instead

2) Undefine GCC4.7/4.8 _GLIBCXX_USE_FLOAT128.  Clang doesn't support
   __float128 yet

Change-Id: I0ff0eb208665beeb3e5e09917fd4c7dd378fc54e
Add new GCC/MIPS option -mldc1-sdc1

ldc1/sdc1 needs memory to be 8-byte aligned.
This option is on by default for arch supports it, but can be turned
off by "-mno-ldc1-sdc1" to workaround issue, for example.

Change-Id: I14291dc4280e75f6c765c933b60eb1b7cd44f974
Fix ARM/GCC-4.7,4.8 generates insufficient alignment for NEON vst/vld

GCC allocates memory buffer and passes it as the first hidden argument
for function return large composite type (ie. > 4 bytes for all NDK
toolchain).  Problem is that GCC doesn't observe the aligement
required by the type, and ARM EABI only requires stack to be aligned
to 8-byte.

Please see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271 for external
bug tracking this issue and testcase.  This CL offers temp relief before
formal one

Change-Id: I8004bc4208487e539ba8b0c9686c44ac86c37d83
Remove hardcoded -m32 in compiler options

It's required for x86_64 targets where we obviously don't want to
enforce -m32.
It shouldn't affect standard i686 targets because i686 is enforced on
configure stage and it effectively removes 64-bit support, keeping -m32
default.
Patch changes 4.7 and 4.8 only. x86_64 targets are not expected to be
supported in older gcc versions due to many issues and dependencies.

Change-Id: Id15a677a9d3b1712eb95aba92c2c5bd98f9ed1cc
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Release basic tuning for new Silvermont architecture

Support new switches: -march=slm/-mtune=slm

This is backport of trunk r199444:

	2013-05-30 Yuri Rumyantsev <yuri.s.rumyantsev@intel.com>
		Igor Zamyatin <igor.zamyatin@intel.com>

	Silvermont (SLM) architecture pipeline model, tuning and
        insn selection.
        * config.gcc: Add slm config options and target.

        * config/i386/slm.md: New.

        * config/i386/driver-i386.c (host_detect_local_cpu): Check
        * movbe.

        * gcc/config/i386/i386-c.c (ix86_target_macros_internal):  New
        * case
        PROCESSOR_SLM.
        (ix86_target_macros_internal): Likewise.

        * gcc/config/i386/i386.c (slm_cost): New cost.
        (m_SLM): New macro flag.
        (initial_ix86_tune_features): Set m_SLM.
        (x86_accumulate_outgoing_args): Likewise.
        (x86_arch_always_fancy_math_387): Likewise.
        (processor_target_table): Add slm cost.
        (cpu_names): Add slm cpu name.
        (x86_option_override_internal): Set SLM ISA.
        (ix86_issue_rate): New case PROCESSOR_SLM.
        (ia32_multipass_dfa_lookahead): Likewise.
        (fold_builtin_cpu): Add slm.

        * config/i386/i386.h (TARGET_SLM): New target macro.
        (target_cpu_default): Add TARGET_CPU_DEFAULT_slm.
        (processor_type): Add PROCESSOR_SLM.

        * config/i386/i386.md (cpu): Add new value "slm".
        (slm.md): Include slm.md.

        * libgcc/config/i386/cpuinfo.c (INTEL_SLM): New enum value.

Change-Id: I3ad6f5584e3fd5de52ac608dc699daaad24f2fe4
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Extended Silvermont tuning.

Backport r199546 from trunk:

	2013-05-31  Yuri Rumyantsev  <yuri.s.rumyantsev@intel.com>
	    Igor Zamyatin  <igor.zamyatin@intel.com>

	Silvermont (SLM) architecture performance tuning.
	* config/i386/i386.h (enum ix86_tune_indices): Add
	X86_TUNE_SPLIT_MEM_OPND_FOR_FP_CONVERTS.
	(TARGET_SPLIT_MEM_OPND_FOR_FP_CONVERTS): New define.

	* config/i386/i386.c (initial_ix86_tune_features)
	<X86_TUNE_SPLIT_MEM_OPND_FOR_FP_CONVERTS>: Initialize.
	(ix86_lea_outperforms): Handle Silvermont tuning.
	(ix86_avoid_lea_for_add): Add new argument to
	ix86_lea_outperforms call.
	(ix86_use_lea_for_mov): Likewise.
	(ix86_avoid_lea_for_addr): Likewise.
	(ix86_lea_for_add_ok): Likewise.
	(exact_dependency_1): New function.
	(exact_store_load_dependency): Likewise.
	(ix86_adjust_cost): Handle Silvermont tuning.
	(do_reoder_for_imul): Likewise.
	(swap_top_of_ready_list): New function.
	(ix86_sched_reorder): Changed to handle Silvermont tuning.

	* config/i386/i386.md (peepholes that split memory operand in fp
	converts): New.

Also backport r199611 with fixes for the patch above and previous SLM patch:

	2013-06-03 Yuri Rumyantsev <yuri.s.rumyantsev@intel.com>

	* config/i386/i386.c (ix86_lea_outperforms): Fix formatting.
	(ix86_avoid_lea_for_addr): Likewise.
	(exact_dependency_1): Likewise.
	(ix86_adjust_cost): Likewise.
	(swap_top_of_ready_list): Fix formatting and !reload_completed
	check removed.
	(do_reorder_for_imul): Fix typo, formatting and
	!reload_completed check removed.
	(ix86_sched_reorder): Fix typo and formatting.
	(fold_builtin_cpu): Move M_INTEL_SLM at the end of processor
	types list.

	* config/i386/cpuinfo.c (INTEL_SLM): New enum value.

Note that [4.7] part of the patch doesn't contain some of optimizations
(IMUL) due to missed dependencies. [4.8] part of this backport is
complete.

Change-Id: I4b5f92b025aab217046f5b393527636f3cf25669
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>