aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/sol2.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/config/sol2.h')
-rw-r--r--gcc-4.9/gcc/config/sol2.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/config/sol2.h b/gcc-4.9/gcc/config/sol2.h
index eb8e0b91f..db7844b29 100644
--- a/gcc-4.9/gcc/config/sol2.h
+++ b/gcc-4.9/gcc/config/sol2.h
@@ -183,12 +183,21 @@ along with GCC; see the file COPYING3. If not see
#define LINK_LIBGCC_MAPFILE_SPEC ""
#endif
+/* Clear hardware capabilities, either explicitly or with OpenMP:
+ #pragma openmp declare simd creates clones for SSE2, AVX, and AVX2. */
+#ifdef HAVE_LD_CLEARCAP
+#define LINK_CLEARCAP_SPEC " %{mclear-hwcap|fopenmp*:-M %sclearcap.map}"
+#else
+#define LINK_CLEARCAP_SPEC ""
+#endif
+
#undef LINK_SPEC
#define LINK_SPEC \
"%{h*} %{v:-V} \
%{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
%{static:-dn -Bstatic} \
- %{shared:-G -dy %{!mimpure-text:-z text}} " LINK_LIBGCC_MAPFILE_SPEC " \
+ %{shared:-G -dy %{!mimpure-text:-z text}} " \
+ LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \
%{symbolic:-Bsymbolic -G -dy -z text} \
%(link_arch) \
%{Qy:} %{!Qn:-Qy}"