diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2018-05-25 07:57:10 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2018-05-25 07:57:10 +0000 |
commit | f8d704048f0900b88a459a60c5fed0e9b7ed8658 (patch) | |
tree | 9946373293ac81d336c677b6b3aa3049f182b4bd /gcc/configure | |
parent | 9d4ac06e0235697c7fa3144b6790b779e6385ea5 (diff) | |
download | gcc-f8d704048f0900b88a459a60c5fed0e9b7ed8658.zip gcc-f8d704048f0900b88a459a60c5fed0e9b7ed8658.tar.gz gcc-f8d704048f0900b88a459a60c5fed0e9b7ed8658.tar.bz2 |
Support SHF_EXCLUDE on non-x86 and with Solaris as
* configure.ac (gcc_cv_as_section_has_e): Move to common section.
Rename to...
(gcc_cv_as_section_exclude): ... this.
Try Solaris as #exclude syntax.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/i386.c (i386_solaris_elf_named_section): Handle
SECTION_EXCLUDE.
* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
[HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
* varasm.c (default_elf_asm_named_section): Don't check if
HAVE_GAS_SECTION_EXCLUDE is defined.
From-SVN: r260708
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 123 |
1 files changed, 83 insertions, 40 deletions
diff --git a/gcc/configure b/gcc/configure index 7d69faf..60d3739 100755 --- a/gcc/configure +++ b/gcc/configure @@ -23514,6 +23514,89 @@ $as_echo "#define USE_AS_TRADITIONAL_FORMAT 1" >>confdefs.h fi +# Test if the assembler supports the section flag 'e' or #exclude for +# specifying an excluded section. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section exclude flag" >&5 +$as_echo_n "checking assembler for section exclude flag... " >&6; } +if test "${gcc_cv_as_section_exclude_e+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_section_exclude_e=no + if test $in_tree_gas = yes; then + if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 22 \) \* 1000 + 51` + then gcc_cv_as_section_exclude_e=yes +fi + elif test x$gcc_cv_as != x; then + $as_echo '.section foo1,"e" + .byte 0,0,0,0' > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -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_section_exclude_e=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_section_exclude_e" >&5 +$as_echo "$gcc_cv_as_section_exclude_e" >&6; } + + +if test $gcc_cv_as_section_exclude_e = no; then + case "${target}" in + # Solaris as uses #exclude instead. + *-*-solaris2*) + case "${target}" in + sparc*-*-solaris2*) + conftest_s='.section "foo1", #exclude' + ;; + i?86-*-solaris2* | x86_64-*-solaris2*) + conftest_s='.section foo1, #exclude' + ;; + esac + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section exclude flag" >&5 +$as_echo_n "checking assembler for section exclude flag... " >&6; } +if test "${gcc_cv_as_section_exclude_hash+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + gcc_cv_as_section_exclude_hash=no + if test x$gcc_cv_as != x; then + $as_echo "$conftest_s + .byte 0,0,0,0" > conftest.s + if { ac_try='$gcc_cv_as $gcc_cv_as_flags -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_section_exclude_hash=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_section_exclude_hash" >&5 +$as_echo "$gcc_cv_as_section_exclude_hash" >&6; } + + +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_exclude_e = yes || test $gcc_cv_as_section_exclude_hash = yes; then echo 1; else echo 0; fi` +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for section merging support" >&5 $as_echo_n "checking assembler for section merging support... " >&6; } if test "${gcc_cv_as_shf_merge+set}" = set; then : @@ -25671,46 +25754,6 @@ $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 -$as_echo_n "checking assembler for .section with e... " >&6; } -if test "${gcc_cv_as_section_has_e+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gcc_cv_as_section_has_e=no - if test $in_tree_gas = yes; then - if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 22 \) \* 1000 + 51` - then gcc_cv_as_section_has_e=yes -fi - elif test x$gcc_cv_as != x; then - $as_echo '.section foo1,"e" -.byte 0,0,0,0' > conftest.s - if { ac_try='$gcc_cv_as $gcc_cv_as_flags --fatal-warnings -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_section_has_e=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_section_has_e" >&5 -$as_echo "$gcc_cv_as_section_has_e" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define HAVE_GAS_SECTION_EXCLUDE `if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi` -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for filds and fists mnemonics" >&5 $as_echo_n "checking assembler for filds and fists mnemonics... " >&6; } if test "${gcc_cv_as_ix86_filds+set}" = set; then : |