diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config.in | 7 | ||||
-rw-r--r-- | gcc/config/i386/darwin.h | 10 | ||||
-rwxr-xr-x | gcc/configure | 35 | ||||
-rw-r--r-- | gcc/configure.ac | 9 |
4 files changed, 60 insertions, 1 deletions
diff --git a/gcc/config.in b/gcc/config.in index 7f5b01f..d8a810b 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -616,6 +616,13 @@ #endif +/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false. + */ +#ifndef USED_FOR_TARGET +#undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN +#endif + + /* Define if your Mac OS X assembler supports the -mmacos-version-min option. */ #ifndef USED_FOR_TARGET diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index bac3219..73b06e2 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -125,10 +125,18 @@ along with GCC; see the file COPYING3. If not see %{mfentry*:%eDarwin does not support -mfentry or associated options}" \ DARWIN_CC1_SPEC +/* This is a workaround for a tool bug: see PR100340. */ + +#ifdef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN +#define EXTRA_ASM_OPTS " -mllvm -x86-pad-for-align=false" +#else +#define EXTRA_ASM_OPTS "" +#endif + #undef ASM_SPEC #define ASM_SPEC "-arch %(darwin_arch) \ " ASM_OPTIONS " -force_cpusubtype_ALL \ - %{static}" ASM_MMACOSX_VERSION_MIN_SPEC + %{static}" ASM_MMACOSX_VERSION_MIN_SPEC EXTRA_ASM_OPTS #undef ENDFILE_SPEC #define ENDFILE_SPEC \ diff --git a/gcc/configure b/gcc/configure index 08c2867..a2d1003 100755 --- a/gcc/configure +++ b/gcc/configure @@ -27082,6 +27082,41 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers fi ;; esac + case $target_os in + darwin2[0-9]* | darwin19*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for llvm assembler x86-pad-for-align option" >&5 +$as_echo_n "checking assembler for llvm assembler x86-pad-for-align option... " >&6; } +if ${gcc_cv_as_mllvm_x86_pad_for_align+:} false; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_mllvm_x86_pad_for_align=no + if test x$gcc_cv_as != x; then + $as_echo '.text' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mllvm -x86-pad-for-align=false -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_mllvm_x86_pad_for_align=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_mllvm_x86_pad_for_align" >&5 +$as_echo "$gcc_cv_as_mllvm_x86_pad_for_align" >&6; } +if test $gcc_cv_as_mllvm_x86_pad_for_align = yes; then + +$as_echo "#define HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN 1" >>confdefs.h + +fi + + ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -xbrace_comment" >&5 $as_echo_n "checking assembler for -xbrace_comment... " >&6; } diff --git a/gcc/configure.ac b/gcc/configure.ac index 653a1cc..ad8fa5a 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4799,6 +4799,15 @@ foo: nop fi ;; esac + case $target_os in + darwin2[[0-9]]* | darwin19*) + gcc_GAS_CHECK_FEATURE([llvm assembler x86-pad-for-align option], + gcc_cv_as_mllvm_x86_pad_for_align,, + [-mllvm -x86-pad-for-align=false], [.text],, + [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1, + [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])]) + ;; + esac gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, [-xbrace_comment=no], [.text],, |