]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use -xbrace_comment=no with recent Solaris/x86 as
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 13 Nov 2017 12:54:00 +0000 (12:54 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 13 Nov 2017 12:54:00 +0000 (12:54 +0000)
Backport from mainline
2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
supports -xbrace_comment option.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
(ASM_CPU_SPEC): Use it.

From-SVN: r254682

gcc/ChangeLog
gcc/config.in
gcc/config/i386/sol2.h
gcc/configure
gcc/configure.ac

index 62c477344ea90ae2588f3b2660a72f7e9c5e4a8b..809adfcd915878f28c8789e13290f83e42051752 100644 (file)
@@ -1,3 +1,15 @@
+2017-11-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline
+       2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
+       supports -xbrace_comment option.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
+       (ASM_CPU_SPEC): Use it.
+
 2017-11-09  Andre McCurdy  <armccurdy@gmail.com>
 
        * config/arm/arm-cores.def: Fix missing FL_LPAE flag for armv7ve
index 4a70ddfa315719528fbce0ceecc12107fb84535d..59f4c3733117f7299e138d2b4dd750d20b69f1be 100644 (file)
 #endif
 
 
+/* Define if your assembler supports -xbrace_comment option. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_AS_XBRACE_COMMENT_OPTION
+#endif
+
+
 /* Define to 1 if you have the `atoq' function. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_ATOQ
index 368c2d2d211aaaeb876a48847c70722be01a06ce..4c64f5341a50757d77898323f4a7b6a4e42f1169 100644 (file)
@@ -65,8 +65,16 @@ along with GCC; see the file COPYING3.  If not see
 #define ASM_CPU64_DEFAULT_SPEC "-xarch=generic64"
 #endif
 
+/* Since Studio 12.6, as needs -xbrace_comment=no so its AVX512 syntax is
+   fully compatible with gas.  */
+#ifdef HAVE_AS_XBRACE_COMMENT_OPTION
+#define ASM_XBRACE_COMMENT_SPEC "-xbrace_comment=no"
+#else
+#define ASM_XBRACE_COMMENT_SPEC ""
+#endif
+
 #undef ASM_CPU_SPEC
-#define ASM_CPU_SPEC "%(asm_cpu_default)"
+#define ASM_CPU_SPEC "%(asm_cpu_default) " ASM_XBRACE_COMMENT_SPEC
 
 /* Don't include ASM_PIC_SPEC.  While the Solaris 10+ assembler accepts -K PIC,
    it gives many warnings: 
index 954673c1c4361c4898c25f9c38f80a5c7e9d4916..ba0ea994309813e28853efb20e476bb9db58d9ef 100755 (executable)
@@ -25366,6 +25366,37 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers
        ;;
     esac
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -xbrace_comment" >&5
+$as_echo_n "checking assembler for -xbrace_comment... " >&6; }
+if test "${gcc_cv_as_ix86_xbrace_comment+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_ix86_xbrace_comment=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.text' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags -xbrace_comment=no -o conftest.o conftest.s >&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+    then
+       gcc_cv_as_ix86_xbrace_comment=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_xbrace_comment" >&5
+$as_echo "$gcc_cv_as_ix86_xbrace_comment" >&6; }
+if test $gcc_cv_as_ix86_xbrace_comment = yes; then
+
+$as_echo "#define HAVE_AS_XBRACE_COMMENT_OPTION 1" >>confdefs.h
+
+fi
+
     # Test if the assembler supports the section flag 'e' for specifying
     # an excluded section.
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .section with e" >&5
index 4c65d441e72fb0edf5e18c709b30629c4bfd05a7..fb48d207d3803f2d97e4f8069b2ef0851773dc22 100644 (file)
@@ -4017,6 +4017,11 @@ foo:     nop
        ;;
     esac
 
+    gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,,
+      [-xbrace_comment=no], [.text],,
+      [AC_DEFINE(HAVE_AS_XBRACE_COMMENT_OPTION, 1,
+               [Define if your assembler supports -xbrace_comment option.])])
+
     # Test if the assembler supports the section flag 'e' for specifying
     # an excluded section.
     gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e,