diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2017-10-26 12:22:21 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2017-10-26 12:22:21 +0000 |
commit | 8c2e5ecf991b9427afab0679b26a7a99dae2e078 (patch) | |
tree | 2300a4f981b5b74fd38080d60b842abec9ffbcab /gcc | |
parent | f073de07ad00d4be604bdbaeab14786850932601 (diff) | |
download | gcc-8c2e5ecf991b9427afab0679b26a7a99dae2e078.zip gcc-8c2e5ecf991b9427afab0679b26a7a99dae2e078.tar.gz gcc-8c2e5ecf991b9427afab0679b26a7a99dae2e078.tar.bz2 |
Use -xbrace_comment=no with recent Solaris/x86 as
* 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: r254103
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config.in | 6 | ||||
-rw-r--r-- | gcc/config/i386/sol2.h | 10 | ||||
-rwxr-xr-x | gcc/configure | 32 | ||||
-rw-r--r-- | gcc/configure.ac | 5 |
5 files changed, 61 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3033a7f..95d9e39 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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-10-26 Richard Sandiford <richard.sandiford@linaro.org> * target.def (static_rtx_alignment): New hook. diff --git a/gcc/config.in b/gcc/config.in index 89d7108..5651bcb 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -717,6 +717,12 @@ #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 diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 6173360..05e5e1a 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -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: diff --git a/gcc/configure b/gcc/configure index aa5937d..c49e665 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25552,6 +25552,38 @@ $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 diff --git a/gcc/configure.ac b/gcc/configure.ac index d905d0d..7c0a903 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4103,6 +4103,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, |