Commit 8ada417f by Zack Weinberg Committed by Zack Weinberg

aclocal.m4 (gcc_AC_CHECK_TYPE): Clone of AC_CHECK_TYPE...

	* aclocal.m4 (gcc_AC_CHECK_TYPE): Clone of AC_CHECK_TYPE,
	uses three-argument AC_DEFINE so no acconfig.h entries are
	needed.
	(_gcc_COMPUTE_GAS_VERSION): Also provide gcc_cv_gas_vers
	which contains the GAS version number as a scaled integer.
	(gcc_GAS_VERSION_GTE_IFELSE): Use gcc_cv_gas_vers.  Add
	ability to check for ELF assembler.
	(gcc_GAS_CHECK_FEATURE): New macro.
	* configure.in: Use gcc_AC_CHECK_TYPE.  Rewrite all
	assembler feature checks using gcc_GAS_CHECK_FEATURE.
	Use three-argument AC_DEFINE everywhere.
	* acconfig.h: Deleted.
	* config.in, configure: Regenerate.

From-SVN: r69272
parent d33fb69b
2003-07-12 Zack Weinberg <zack@codesourcery.com>
* aclocal.m4 (gcc_AC_CHECK_TYPE): Clone of AC_CHECK_TYPE,
uses three-argument AC_DEFINE so no acconfig.h entries are
needed.
(_gcc_COMPUTE_GAS_VERSION): Also provide gcc_cv_gas_vers
which contains the GAS version number as a scaled integer.
(gcc_GAS_VERSION_GTE_IFELSE): Use gcc_cv_gas_vers. Add
ability to check for ELF assembler.
(gcc_GAS_CHECK_FEATURE): New macro.
* configure.in: Use gcc_AC_CHECK_TYPE. Rewrite all
assembler feature checks using gcc_GAS_CHECK_FEATURE.
Use three-argument AC_DEFINE everywhere.
* acconfig.h: Deleted.
* config.in, configure: Regenerate.
2003-07-12 Nathanael Nerode <neroden@gcc.gnu.org> 2003-07-12 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in * fixinc/inclhack.def (struct_sockaddr): Avoid "fixing" sockaddr_in
......
/* Define if your assembler supports specifying the maximum number
of bytes to skip when using the GAS .p2align command. */
#undef HAVE_GAS_MAX_SKIP_P2ALIGN
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
/* Define if your assembler uses the old HImode fild and fist notation. */
#undef HAVE_GAS_FILDS_FISTS
/* Define to `int' if <sys/types.h> doesn't define. */
#undef ssize_t
/* Define if cpp should also search $prefix/include. */
#undef PREFIX_INCLUDE_DIR
@BOTTOM@
/* Bison unconditionally undefines `const' if neither `__STDC__' nor
__cplusplus are defined. That's a problem since we use `const' in
the GCC headers, and the resulting bison code is therefore type
unsafe. Thus, we must match the bison behavior here. */
#ifndef __STDC__
#ifndef __cplusplus
#undef const
#define const
#endif
#endif
...@@ -16,6 +16,27 @@ if test $ac_cv_header_stdbool_h = yes; then ...@@ -16,6 +16,27 @@ if test $ac_cv_header_stdbool_h = yes; then
fi fi
]) ])
dnl Fixed AC_CHECK_TYPE that doesn't need anything in acconfig.h.
dnl Remove after migrating to 2.5x.
AC_DEFUN(gcc_AC_CHECK_TYPE,
[AC_REQUIRE([AC_HEADER_STDC])dnl
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
changequote([,]), [#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2, [Define as \`$2' if <sys/types.h> doesn't define.])
fi
])
dnl See whether we can include both string.h and strings.h. dnl See whether we can include both string.h and strings.h.
AC_DEFUN(gcc_AC_HEADER_STRING, AC_DEFUN(gcc_AC_HEADER_STRING,
[AC_CACHE_CHECK([whether string.h and strings.h may both be included], [AC_CACHE_CHECK([whether string.h and strings.h may both be included],
...@@ -659,9 +680,12 @@ done ...@@ -659,9 +680,12 @@ done
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"` gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"` gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)"` gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)"`
gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ $gcc_cv_gas_minor_version \) \* 1000 \
+ $gcc_cv_gas_patch_version`
]) []dnl # _gcc_COMPUTE_GAS_VERSION ]) []dnl # _gcc_COMPUTE_GAS_VERSION
dnl # gcc_GAS_VERSION_GTE_IFELSE(major, minor, patchlevel, dnl # gcc_GAS_VERSION_GTE_IFELSE([elf,] major, minor, patchlevel,
dnl # [command_if_true = :], [command_if_false = :]) dnl # [command_if_true = :], [command_if_false = :])
dnl # Check to see if the version of GAS is greater than or dnl # Check to see if the version of GAS is greater than or
dnl # equal to the specified version. dnl # equal to the specified version.
...@@ -670,23 +694,54 @@ dnl # The first ifelse() shortens the shell code if the patchlevel ...@@ -670,23 +694,54 @@ dnl # The first ifelse() shortens the shell code if the patchlevel
dnl # is unimportant (the usual case). The others handle missing dnl # is unimportant (the usual case). The others handle missing
dnl # commands. Note that the tests are structured so that the most dnl # commands. Note that the tests are structured so that the most
dnl # common version number cases are tested first. dnl # common version number cases are tested first.
AC_DEFUN([_gcc_GAS_VERSION_GTE_IFELSE],
[ifelse([$1], elf,
[if test $in_tree_gas_is_elf = yes \
&&],
[if]) test $gcc_cv_gas_vers -ge `expr \( \( $2 \* 1000 \) + $3 \) \* 1000 + $4`
then dnl
ifelse([$5],,:,[$5])[]dnl
ifelse([$6],,,[
else $6])
fi])
AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE], AC_DEFUN([gcc_GAS_VERSION_GTE_IFELSE],
[AC_REQUIRE([_gcc_COMPUTE_GAS_VERSION]) []dnl [AC_REQUIRE([_gcc_COMPUTE_GAS_VERSION])dnl
ifelse([$3],[0], ifelse([$1], elf, [_gcc_GAS_VERSION_GTE_IFELSE($@)],
[if test $gcc_cv_gas_major_version -eq $1 \ [_gcc_GAS_VERSION_GTE_IFELSE(,$@)])])
&& test $gcc_cv_gas_minor_version -ge $2 \
|| test $gcc_cv_gas_major_version -gt $1 ; then dnl gcc_GAS_CHECK_FEATURE(description, cv, [[elf,]major,minor,patchlevel],
], dnl [extra switches to as], [assembler input],
[if test $gcc_cv_gas_major_version -eq $1 \ dnl [extra testing logic], [command if feature available])
&& (test $gcc_cv_gas_minor_version -gt $2 \ dnl
|| (test $gcc_cv_gas_minor_version -eq $2 \ dnl Checks for an assembler feature. If we are building an in-tree
&& test $gcc_cv_gas_patch_version -ge $3 )) \ dnl gas, the feature is available if the associated assembler version
|| test $gcc_cv_gas_major_version -gt $1 ; then dnl is greater than or equal to major.minor.patchlevel. If not, then
]) dnl ASSEMBLER INPUT is fed to the assembler and the feature is available
ifelse([$4],[],[:],[$4]) dnl if assembly succeeds. If EXTRA TESTING LOGIC is not the empty string,
ifelse([$5],[],[],[else $5]) dnl then it is run instead of simply setting CV to "yes" - it is responsible
fi dnl for doing so, if appropriate.
]) []dnl # gcc_GAS_VERSION_GTE_IFELSE AC_DEFUN([gcc_GAS_CHECK_FEATURE],
[AC_CACHE_CHECK([assembler for $1], [$2],
[[$2]=no
ifelse([$3],,,[dnl
if test $in_tree_gas = yes; then
gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
el])if test x$gcc_cv_as != x; then
echo ifelse(substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AC_FD_CC])
then
ifelse([$6],, [$2]=yes, [$6])
else
echo "configure: failed program was" >&AC_FD_CC
cat conftest.s >&AC_FD_CC
fi
rm -f conftest.o conftest.s
fi])
ifelse([$7],,,[dnl
if test $[$2] = yes; then
$7
fi])])
# lcmessage.m4 serial 3 (gettext-0.11.3) # lcmessage.m4 serial 3 (gettext-0.11.3)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
......
...@@ -34,22 +34,6 @@ ...@@ -34,22 +34,6 @@
/* Define vfork as fork if vfork does not work. */ /* Define vfork as fork if vfork does not work. */
#undef vfork #undef vfork
/* Define if your assembler supports specifying the maximum number
of bytes to skip when using the GAS .p2align command. */
#undef HAVE_GAS_MAX_SKIP_P2ALIGN
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
/* Define if your assembler uses the old HImode fild and fist notation. */
#undef HAVE_GAS_FILDS_FISTS
/* Define to `int' if <sys/types.h> doesn't define. */
#undef ssize_t
/* Define if cpp should also search $prefix/include. */
#undef PREFIX_INCLUDE_DIR
/* Define if you have the alphasort function. */ /* Define if you have the alphasort function. */
#undef HAVE_ALPHASORT #undef HAVE_ALPHASORT
...@@ -288,6 +272,9 @@ ...@@ -288,6 +272,9 @@
first argument is NULL. */ first argument is NULL. */
#undef HAVE_WORKING_MBSTOWCS #undef HAVE_WORKING_MBSTOWCS
/* Define as `int' if <sys/types.h> doesn't define. */
#undef ssize_t
/* Define if printf supports %p. */ /* Define if printf supports %p. */
#undef HAVE_PRINTF_PTR #undef HAVE_PRINTF_PTR
...@@ -442,6 +429,13 @@ ...@@ -442,6 +429,13 @@
/* Define to be the last portion of registry key on windows hosts. */ /* Define to be the last portion of registry key on windows hosts. */
#undef WIN32_REGISTRY_KEY #undef WIN32_REGISTRY_KEY
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
/* Define if your assembler supports specifying the maximum number
of bytes to skip when using the GAS .p2align command. */
#undef HAVE_GAS_MAX_SKIP_P2ALIGN
/* Define if your assembler supports .subsection and .subsection -1 starts /* Define if your assembler supports .subsection and .subsection -1 starts
emitting at the beginning of your section. */ emitting at the beginning of your section. */
#undef HAVE_GAS_SUBSECTION_ORDERING #undef HAVE_GAS_SUBSECTION_ORDERING
...@@ -449,10 +443,10 @@ ...@@ -449,10 +443,10 @@
/* Define if your assembler supports .weak. */ /* Define if your assembler supports .weak. */
#undef HAVE_GAS_WEAK #undef HAVE_GAS_WEAK
/* Define if your assembler supports .hidden. */ /* Define if your assembler and linker support .hidden. */
#undef HAVE_GAS_HIDDEN #undef HAVE_GAS_HIDDEN
/* Define if your assembler supports .uleb128. */ /* Define if your assembler supports .sleb128 and .uleb128. */
#undef HAVE_AS_LEB128 #undef HAVE_AS_LEB128
/* Define if your assembler mis-optimizes .eh_frame data. */ /* Define if your assembler mis-optimizes .eh_frame data. */
...@@ -482,6 +476,9 @@ ...@@ -482,6 +476,9 @@
/* Define if your assembler supports offsetable %lo(). */ /* Define if your assembler supports offsetable %lo(). */
#undef HAVE_AS_OFFSETABLE_LO10 #undef HAVE_AS_OFFSETABLE_LO10
/* Define if your assembler uses the new HImode fild and fist notation. */
#undef HAVE_GAS_FILDS_FISTS
/* Define true if the assembler supports '.long foo@GOTOFF'. */ /* Define true if the assembler supports '.long foo@GOTOFF'. */
#undef HAVE_AS_GOTOFF_IN_DATA #undef HAVE_AS_GOTOFF_IN_DATA
...@@ -498,9 +495,6 @@ ...@@ -498,9 +495,6 @@
/* Define if your assembler supports the --gdwarf2 option. */ /* Define if your assembler supports the --gdwarf2 option. */
#undef HAVE_AS_GDWARF2_DEBUG_FLAG #undef HAVE_AS_GDWARF2_DEBUG_FLAG
/* Define if your assembler supports the --gstabs option. */
#undef HAVE_AS_GSTABS_DEBUG_FLAG
/* Define if your linker links a mix of read-only /* Define if your linker links a mix of read-only
and read-write sections into a read-write section. */ and read-write sections into a read-write section. */
#undef HAVE_LD_RO_RW_SECTION_MIXING #undef HAVE_LD_RO_RW_SECTION_MIXING
...@@ -514,15 +508,6 @@ ...@@ -514,15 +508,6 @@
/* Define if your MIPS libgloss linker scripts consistently include STARTUP directives. */ /* Define if your MIPS libgloss linker scripts consistently include STARTUP directives. */
#undef HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES #undef HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES
/* Define to PREFIX/include if cpp should also search that directory. */
#undef PREFIX_INCLUDE_DIR
/* Bison unconditionally undefines `const' if neither `__STDC__' nor
__cplusplus are defined. That's a problem since we use `const' in
the GCC headers, and the resulting bison code is therefore type
unsafe. Thus, we must match the bison behavior here. */
#ifndef __STDC__
#ifndef __cplusplus
#undef const
#define const
#endif
#endif
...@@ -5767,6 +5767,9 @@ done ...@@ -5767,6 +5767,9 @@ done
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"`
gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \
+ $gcc_cv_gas_minor_version \) \* 1000 \
+ $gcc_cv_gas_patch_version`
rm -f as$host_exeext rm -f as$host_exeext
$symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
...@@ -5855,7 +5858,7 @@ esac ...@@ -5855,7 +5858,7 @@ esac
# build->target linker and hope that it will have the same features # build->target linker and hope that it will have the same features
# as the host->target linker we'll be using. # as the host->target linker we'll be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6 echo $ac_n "checking what linker to use""... $ac_c" 1>&6
echo "configure:5859: checking what linker to use" >&5 echo "configure:5862: checking what linker to use" >&5
in_tree_ld=no in_tree_ld=no
gcc_cv_ld= gcc_cv_ld=
gcc_cv_gld_major_version= gcc_cv_gld_major_version=
...@@ -5963,7 +5966,7 @@ esac ...@@ -5963,7 +5966,7 @@ esac
# Figure out what nm we will be using. # Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
echo $ac_n "checking what nm to use""... $ac_c" 1>&6 echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:5967: checking what nm to use" >&5 echo "configure:5970: checking what nm to use" >&5
in_tree_nm=no in_tree_nm=no
if test -x nm$host_exeext; then if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext gcc_cv_nm=./nm$host_exeext
...@@ -5986,7 +5989,7 @@ esac ...@@ -5986,7 +5989,7 @@ esac
# Figure out what objdump we will be using. # Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
echo "configure:5990: checking what objdump to use" >&5 echo "configure:5993: checking what objdump to use" >&5
in_tree_objdump=no in_tree_objdump=no
if test -x objdump$host_exeext; then if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext gcc_cv_objdump=./objdump$host_exeext
...@@ -6010,305 +6013,318 @@ case $in_tree_objdump in ...@@ -6010,305 +6013,318 @@ case $in_tree_objdump in
esac esac
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 echo $ac_n "checking assembler for .balign and .p2align""... $ac_c" 1>&6
echo "configure:6015: checking assembler alignment features" >&5 echo "configure:6018: checking assembler for .balign and .p2align" >&5
gcc_cv_as_alignment_features=none if eval "test \"`echo '$''{'gcc_cv_as_balign_and_p2align'+set}'`\" = set"; then
if test $in_tree_gas = yes; then echo $ac_n "(cached) $ac_c" 1>&6
# Gas version 2.6 and later support for .balign and .p2align. else
if test $gcc_cv_gas_major_version -eq 2 \ gcc_cv_as_balign_and_p2align=no
&& test $gcc_cv_gas_minor_version -ge 6 \ if test $in_tree_gas = yes; then
|| test $gcc_cv_gas_major_version -gt 2 ; then if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0`
then gcc_cv_as_balign_and_p2align=yes
fi
elif test x$gcc_cv_as != x; then
echo '.balign 4
.p2align 2' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_balign_and_p2align=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
gcc_cv_as_alignment_features=".balign and .p2align" echo "$ac_t""$gcc_cv_as_balign_and_p2align" 1>&6
cat >> confdefs.h <<\EOF if test $gcc_cv_as_balign_and_p2align = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1 #define HAVE_GAS_BALIGN_AND_P2ALIGN 1
EOF EOF
fi fi
# Gas version 2.8 and later support specifying the maximum echo $ac_n "checking assembler for .p2align with maximum skip""... $ac_c" 1>&6
# bytes to skip when using .p2align. echo "configure:6050: checking assembler for .p2align with maximum skip" >&5
if test $gcc_cv_gas_major_version -eq 2 \ if eval "test \"`echo '$''{'gcc_cv_as_max_skip_p2align'+set}'`\" = set"; then
&& test $gcc_cv_gas_minor_version -ge 8 \ echo $ac_n "(cached) $ac_c" 1>&6
|| test $gcc_cv_gas_major_version -gt 2 ; then else
gcc_cv_as_max_skip_p2align=no
if test $in_tree_gas = yes; then
gcc_cv_as_alignment_features=".p2align including maximum skip" if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0`
cat >> confdefs.h <<\EOF then gcc_cv_as_max_skip_p2align=yes
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1 fi
EOF elif test x$gcc_cv_as != x; then
echo '.p2align 4,,7' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_max_skip_p2align=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
elif test x$gcc_cv_as != x; then echo "$ac_t""$gcc_cv_as_max_skip_p2align" 1>&6
# Check if we have .balign and .p2align if test $gcc_cv_as_max_skip_p2align = yes; then
echo ".balign 4" > conftest.s cat >> confdefs.h <<\EOF
echo ".p2align 2" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".balign and .p2align"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
EOF
fi
rm -f conftest.s conftest.o
# Check if specifying the maximum bytes to skip when
# using .p2align is supported.
echo ".p2align 4,,7" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".p2align including maximum skip"
cat >> confdefs.h <<\EOF
#define HAVE_GAS_MAX_SKIP_P2ALIGN 1 #define HAVE_GAS_MAX_SKIP_P2ALIGN 1
EOF EOF
fi
rm -f conftest.s conftest.o
fi fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:6076: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 9 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
test $in_tree_gas_is_elf = yes \
&& gcc_cv_as_subsections="working .subsection -1"
echo $ac_n "checking assembler for working .subsection -1""... $ac_c" 1>&6
echo "configure:6081: checking assembler for working .subsection -1" >&5
if eval "test \"`echo '$''{'gcc_cv_as_subsection_m1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_subsection_m1=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
then gcc_cv_as_subsection_m1=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo 'conftest_label1: .word 0
# Check if we have .subsection
echo ".subsection 1" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_subsections=".subsection"
if test x$gcc_cv_nm != x; then
cat > conftest.s <<EOF
conftest_label1: .word 0
.subsection -1 .subsection -1
conftest_label2: .word 0 conftest_label2: .word 0
.previous .previous' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then then
$gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 if test x$gcc_cv_nm != x; then
$gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
: if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
else then :
gcc_cv_as_subsections="working .subsection -1" else gcc_cv_as_subsection_m1=yes
fi fi
fi rm -f conftest.nm1 conftest.nm2
fi fi
fi else
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then
cat >> confdefs.h <<\EOF echo "$ac_t""$gcc_cv_as_subsection_m1" 1>&6
if test $gcc_cv_as_subsection_m1 = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_SUBSECTION_ORDERING 1 #define HAVE_GAS_SUBSECTION_ORDERING 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:6124: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 2 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_weak="yes"
echo $ac_n "checking assembler for .weak""... $ac_c" 1>&6
echo "configure:6124: checking assembler for .weak" >&5
if eval "test \"`echo '$''{'gcc_cv_as_weak'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_weak=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0`
then gcc_cv_as_weak=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo ' .weak foobar' > conftest.s
# Check if we have .weak if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
echo " .weak foobar" > conftest.s then
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then gcc_cv_as_weak=yes
gcc_cv_as_weak="yes" else
fi echo "configure: failed program was" >&5
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
if test x"$gcc_cv_as_weak" = xyes; then
cat >> confdefs.h <<\EOF echo "$ac_t""$gcc_cv_as_weak" 1>&6
if test $gcc_cv_as_weak = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_WEAK 1 #define HAVE_GAS_WEAK 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:6154: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& (test $gcc_cv_gas_minor_version -gt 12 \
|| (test $gcc_cv_gas_minor_version -eq 12 \
&& test $gcc_cv_gas_patch_version -ge 1 )) \
|| test $gcc_cv_gas_major_version -gt 2 ; then
# .hidden needs to be supported in both the assembler and the linker,
# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
# This is irritatingly difficult to feature test for; we have to check the
# date string after the version number. If we've got an in-tree
# ld, we don't know its patchlevel version, so we set the baseline at 2.13
# to be safe.
# The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
echo $ac_n "checking assembler for .hidden""... $ac_c" 1>&6
echo "configure:6162: checking assembler for .hidden" >&5
if eval "test \"`echo '$''{'gcc_cv_as_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_hidden=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0`
then gcc_cv_as_hidden=yes
fi
elif test x$gcc_cv_as != x; then
echo ' .hidden foobar
foobar:' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_hidden=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
test $in_tree_gas_is_elf = yes && gcc_cv_as_hidden="yes" echo "$ac_t""$gcc_cv_as_hidden" 1>&6
fi
elif test x$gcc_cv_as != x; then echo $ac_n "checking linker for .hidden support""... $ac_c" 1>&6
# Check if we have .hidden echo "configure:6190: checking linker for .hidden support" >&5
echo " .hidden foobar" > conftest.s if eval "test \"`echo '$''{'gcc_cv_ld_hidden'+set}'`\" = set"; then
echo "foobar:" >> conftest.s echo $ac_n "(cached) $ac_c" 1>&6
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then else
gcc_cv_as_hidden="yes" if test $in_tree_ld = yes ; then
fi gcc_cv_ld_hidden=no
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. gcc_cv_ld_hidden=yes
# This is irritatingly difficult to feature test for. Look for fi
# the date string after the version number. else
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` gcc_cv_ld_hidden=yes
if echo "$ld_ver" | grep GNU > /dev/null; then ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
ld_vers=`echo $ld_ver | sed -n \ if echo "$ld_ver" | grep GNU > /dev/null; then
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ ld_vers=`echo $ld_ver | sed -n \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
if test 0"$ld_date" -lt 20020404; then ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test -n "$ld_date"; then if test 0"$ld_date" -lt 20020404; then
# If there was date string, but was earlier than 2002-04-04, fail if test -n "$ld_date"; then
gcc_cv_as_hidden="no" # If there was date string, but was earlier than 2002-04-04, fail
elif test -z "$ld_vers"; then gcc_cv_ld_hidden=no
# If there was no date string nor ld version number, something is wrong elif test -z "$ld_vers"; then
gcc_cv_as_hidden="no" # If there was no date string nor ld version number, something is wrong
else gcc_cv_ld_hidden=no
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` else
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
test -z "$ld_vers_patch" && ld_vers_patch=0 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test "$ld_vers_major" -lt 2; then test -z "$ld_vers_patch" && ld_vers_patch=0
gcc_cv_as_hidden="no" if test "$ld_vers_major" -lt 2; then
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then gcc_cv_ld_hidden=no
gcc_cv_as_hidden="no" elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ gcc_cv_ld_hidden="no"
-a "$ld_vers_patch" -eq 0; then elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
gcc_cv_as_hidden="no" gcc_cv_ld_hidden=no
fi
fi
fi
fi fi
fi fi
case "$target" in
mips-sgi-irix6*)
if test x"$gnu_ld_flag" = x"no"; then
# Even if using gas with .hidden support, the resulting object files
# cannot be linked with the IRIX 6 O32 linker. With the N32 and
# N64 linkers, the problem is that the linker refuses to accept
# -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
gcc_cv_as_hidden=no
fi fi
;; else
esac case "$target" in
if test x"$gcc_cv_as_hidden" = xyes; then mips-sgi-irix6*)
cat >> confdefs.h <<\EOF if test x"$gnu_ld_flag" = x"no"; then
#define HAVE_GAS_HIDDEN 1 # Even if using gas with .hidden support, the resulting object files
EOF # cannot be linked with the IRIX 6 O32 linker. With the N32 and
# N64 linkers, the problem is that the linker refuses to accept
# -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
gcc_cv_ld_hidden=no
fi
;;
esac
fi
fi
fi fi
echo "$ac_t""$gcc_cv_as_hidden" 1>&6
libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:6239: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
echo "$ac_t""$gcc_cv_ld_hidden" 1>&6
libgcc_visibility=no
test $in_tree_gas_is_elf = yes && gcc_cv_as_leb128="yes" if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden=yes; then
libgcc_visibility=yes
cat >> confdefs.h <<\EOF
#define HAVE_GAS_HIDDEN 1
EOF
fi fi
elif test x$gcc_cv_as != x; then # Check if we have .[us]leb128, and support symbol arithmetic with it.
# Check if we have .[us]leb128, and support symbol arithmetic with it. echo $ac_n "checking assembler for .sleb128 and .uleb128""... $ac_c" 1>&6
cat > conftest.s <<EOF echo "configure:6264: checking assembler for .sleb128 and .uleb128" >&5
.data if eval "test \"`echo '$''{'gcc_cv_as_leb128'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_leb128=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
then gcc_cv_as_leb128=yes
fi
elif test x$gcc_cv_as != x; then
echo ' .data
.uleb128 L2 - L1 .uleb128 L2 - L1
L1: L1:
.uleb128 1280 .uleb128 1280
.sleb128 -1010 .sleb128 -1010
L2: L2:' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then then
gcc_cv_as_leb128="yes" # GAS versions before 2.11 do not support uleb128,
# despite appearing to.
# GAS versions before 2.11 do not support uleb128, # ??? There exists an elf-specific test that will crash
# despite appearing to. # the assembler. Perhaps it's better to figure out whether
# ??? There exists an elf-specific test that will crash # arbitrary sections are supported and try the test.
# the assembler. Perhaps it's better to figure out whether as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
# arbitrary sections are supported and try the test. if echo "$as_ver" | grep GNU > /dev/null; then
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
if echo "$as_ver" | grep GNU > /dev/null; then as_major=`echo $as_ver | sed 's/\..*//'`
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
as_major=`echo $as_ver | sed 's/\..*//'` if test $as_major -eq 2 && test $as_minor -lt 11
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` then :
if test $as_major -eq 2 -a $as_minor -lt 11; then else gcc_cv_as_leb128=yes
gcc_cv_as_leb128="no" fi
fi fi
fi else
fi echo "configure: failed program was" >&5
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
if test x"$gcc_cv_as_leb128" = xyes; then
cat >> confdefs.h <<\EOF echo "$ac_t""$gcc_cv_as_leb128" 1>&6
if test $gcc_cv_as_leb128 = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_LEB128 1 #define HAVE_AS_LEB128 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
echo "configure:6291: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
test $in_tree_gas_is_elf = yes && gcc_cv_as_eh_frame="yes"
# GAS versions up to and including 2.11.0 may mis-optimize
# .eh_frame data.
echo $ac_n "checking assembler for eh_frame optimization""... $ac_c" 1>&6
echo "configure:6317: checking assembler for eh_frame optimization" >&5
if eval "test \"`echo '$''{'gcc_cv_as_eh_frame'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
then gcc_cv_as_eh_frame=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo ' .text
# Check if this is GAS.
as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
rm -f a.out 2> /dev/null
if echo "$as_ver" | grep GNU > /dev/null; then
# Versions up to and including 2.11.0 may mis-optimize
# .eh_frame data. Try something.
cat > conftest.s <<EOF
.text
.LFB1: .LFB1:
.4byte 0 .4byte 0
.L1: .L1:
...@@ -6339,74 +6355,85 @@ __FRAME_BEGIN__: ...@@ -6339,74 +6355,85 @@ __FRAME_BEGIN__:
.4byte .LFE1-.LFB1 .4byte .LFE1-.LFB1
.byte 0x4 .byte 0x4
.4byte .L1-.LFB1 .4byte .L1-.LFB1
.LEFDE1: .LEFDE1:' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
cat > conftest.lit <<EOF then
cat > conftest.lit <<EOF
0000 10000000 00000000 017a0001 781a0004 .........z..x... 0000 10000000 00000000 017a0001 781a0004 .........z..x...
0010 01000000 12000000 18000000 00000000 ................ 0010 01000000 12000000 18000000 00000000 ................
0020 08000000 04080000 0044 .........D 0020 08000000 04080000 0044 .........D
EOF EOF
cat > conftest.big <<EOF cat > conftest.big <<EOF
0000 00000010 00000000 017a0001 781a0004 .........z..x... 0000 00000010 00000000 017a0001 781a0004 .........z..x...
0010 00000001 00000012 00000018 00000000 ................ 0010 00000001 00000012 00000018 00000000 ................
0020 00000008 04000000 0844 .........D 0020 00000008 04000000 0844 .........D
EOF EOF
# If the assembler didn't choke, and we can objdump, # If the assembler didn't choke, and we can objdump,
# and we got the correct data, then succeed. # and we got the correct data, then succeed.
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
| tail -3 > conftest.got \ | tail -3 > conftest.got \
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|| cmp conftest.big conftest.got > /dev/null 2>&1; } || cmp conftest.big conftest.got > /dev/null 2>&1; }
then then
gcc_cv_as_eh_frame="yes" gcc_cv_as_eh_frame=yes
else elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null'; { (eval echo configure:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
gcc_cv_as_eh_frame="bad" gcc_cv_as_eh_frame=buggy
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then else
cat >> confdefs.h <<\EOF # Uh oh, what do we do now?
#define USE_AS_TRADITIONAL_FORMAT 1 gcc_cv_as_eh_frame=no
EOF fi
else
fi echo "configure: failed program was" >&5
fi cat conftest.s >&5
fi fi
rm -f conftest.* rm -f conftest.o conftest.s
fi
fi fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo "configure:6379: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
test $in_tree_gas_is_elf = yes && gcc_cv_as_shf_merge="yes" if test $gcc_cv_as_eh_frame = buggy; then
cat >> confdefs.h <<\EOF
#define USE_AS_TRADITIONAL_FORMAT 1
EOF
fi fi
elif test x$gcc_cv_as != x; then echo $ac_n "checking assembler for section merging support""... $ac_c" 1>&6
# Check if we support SHF_MERGE sections echo "configure:6406: checking assembler for section merging support" >&5
echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s if eval "test \"`echo '$''{'gcc_cv_as_shf_merge'+set}'`\" = set"; then
if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then echo $ac_n "(cached) $ac_c" 1>&6
gcc_cv_as_shf_merge=yes else
fi gcc_cv_as_shf_merge=no
rm -f conftest.s conftest.o if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
then gcc_cv_as_shf_merge=yes
fi
elif test x$gcc_cv_as != x; then
echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_shf_merge=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
if test x"$gcc_cv_as_shf_merge" = xyes; then
cat >> confdefs.h <<\EOF echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
if test $gcc_cv_as_shf_merge = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_SHF_MERGE 1 #define HAVE_GAS_SHF_MERGE 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 # Thread-local storage - the check is heavily parametrized.
echo "configure:6409: checking assembler thread-local storage support" >&5
gcc_cv_as_tls=no
conftest_s= conftest_s=
tls_first_major= tls_first_major=
tls_first_minor= tls_first_minor=
...@@ -6583,58 +6610,57 @@ foo: .long 25 ...@@ -6583,58 +6610,57 @@ foo: .long 25
;; ;;
esac esac
if test -z "$tls_first_major"; then if test -z "$tls_first_major"; then
: : # If we don't have a check, assume no support.
elif test $in_tree_gas = yes ; then else
if test $gcc_cv_gas_major_version -eq $tls_first_major \ echo $ac_n "checking assembler for thread-local storage support""... $ac_c" 1>&6
&& test $gcc_cv_gas_minor_version -ge $tls_first_minor \ echo "configure:6617: checking assembler for thread-local storage support" >&5
|| test $gcc_cv_gas_major_version -gt $tls_first_major ; then if eval "test \"`echo '$''{'gcc_cv_as_tls'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_tls=yes gcc_cv_as_tls=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0`
then gcc_cv_as_tls=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo "$conftest_s" > conftest.s
echo "$conftest_s" > conftest.s if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5'; { (eval echo configure:6628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 then
then gcc_cv_as_tls=yes
gcc_cv_as_tls=yes else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi fi
rm -f conftest.s conftest.o
fi fi
if test "$gcc_cv_as_tls" = yes; then
echo "$ac_t""$gcc_cv_as_tls" 1>&6
if test $gcc_cv_as_tls = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_TLS 1 #define HAVE_AS_TLS 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_tls" 1>&6 fi
# Target-specific assembler checks.
case "$target" in case "$target" in
# All TARGET_ABI_OSF targets. # All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
echo "configure:6619: checking assembler supports explicit relocations" >&5 echo "configure:6654: checking assembler for explicit relocation support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_alpha_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_alpha_explicit_relocs=no
gcc_cv_as_explicit_relocs=unknown if test $in_tree_gas = yes; then
if test $in_tree_gas = yes ; then if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0`
if test $gcc_cv_gas_major_version -eq 2 \ then gcc_cv_as_alpha_explicit_relocs=yes
&& test $gcc_cv_gas_minor_version -ge 12 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_explicit_relocs=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo ' .set nomacro
cat > conftest.s << 'EOF'
.set nomacro
.text .text
extbl $3, $2, $3 !lituse_bytoff!1 extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1 ldq $2, a($29) !literal!1
...@@ -6646,354 +6672,377 @@ fi ...@@ -6646,354 +6672,377 @@ fi
lda $0, c($29) !gprel lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3 lda $29, 0($29) !gpdisp!3' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then then
gcc_cv_as_explicit_relocs=yes gcc_cv_as_alpha_explicit_relocs=yes
else else
gcc_cv_as_explicit_relocs=no echo "configure: failed program was" >&5
fi cat conftest.s >&5
rm -f conftest.s conftest.o fi
fi rm -f conftest.o conftest.s
fi
fi fi
echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 echo "$ac_t""$gcc_cv_as_alpha_explicit_relocs" 1>&6
if test "x$gcc_cv_as_explicit_relocs" = xyes; then if test $gcc_cv_as_alpha_explicit_relocs = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_EXPLICIT_RELOCS 1 #define HAVE_AS_EXPLICIT_RELOCS 1
EOF EOF
fi fi
;; ;;
sparc*-*-*) sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 echo $ac_n "checking assembler for .register""... $ac_c" 1>&6
echo "configure:6672: checking assembler .register pseudo-op support" >&5 echo "configure:6699: checking assembler for .register" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_sparc_register_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_sparc_register_op=no
gcc_cv_as_register_pseudo_op=unknown if test x$gcc_cv_as != x; then
if test x$gcc_cv_as != x; then echo '.register %g2, #scratch' > conftest.s
# Check if we have .register if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
echo ".register %g2, #scratch" > conftest.s then
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then gcc_cv_as_sparc_register_op=yes
gcc_cv_as_register_pseudo_op=yes else
else echo "configure: failed program was" >&5
gcc_cv_as_register_pseudo_op=no cat conftest.s >&5
fi fi
rm -f conftest.s conftest.o rm -f conftest.o conftest.s
fi fi
fi fi
echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 echo "$ac_t""$gcc_cv_as_sparc_register_op" 1>&6
if test "x$gcc_cv_as_register_pseudo_op" = xyes; then if test $gcc_cv_as_sparc_register_op = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_REGISTER_PSEUDO_OP 1 #define HAVE_AS_REGISTER_PSEUDO_OP 1
EOF EOF
fi fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 echo $ac_n "checking assembler for -relax option""... $ac_c" 1>&6
echo "configure:6700: checking assembler supports -relax" >&5 echo "configure:6726: checking assembler for -relax option" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_sparc_relax'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_sparc_relax=no
gcc_cv_as_relax_opt=unknown if test x$gcc_cv_as != x; then
if test x$gcc_cv_as != x; then echo '.text' > conftest.s
# Check if gas supports -relax if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5'; { (eval echo configure:6733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
echo ".text" > conftest.s then
if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then gcc_cv_as_sparc_relax=yes
gcc_cv_as_relax_opt=yes else
else echo "configure: failed program was" >&5
gcc_cv_as_relax_opt=no cat conftest.s >&5
fi fi
rm -f conftest.s conftest.o rm -f conftest.o conftest.s
fi fi
fi fi
echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 echo "$ac_t""$gcc_cv_as_sparc_relax" 1>&6
if test "x$gcc_cv_as_relax_opt" = xyes; then if test $gcc_cv_as_sparc_relax = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_RELAX_OPTION 1 #define HAVE_AS_RELAX_OPTION 1
EOF EOF
fi fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 echo $ac_n "checking assembler for unaligned pcrel relocs""... $ac_c" 1>&6
echo "configure:6728: checking assembler and linker support unaligned pc related relocs" >&5 echo "configure:6753: checking assembler for unaligned pcrel relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_sparc_ua_pcrel=no
gcc_cv_as_sparc_ua_pcrel=unknown if test x$gcc_cv_as != x; then
if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then echo '.text
gcc_cv_as_sparc_ua_pcrel=no foo:
echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s nop
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ .data
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then .align 4
gcc_cv_as_sparc_ua_pcrel=yes .byte 0
fi .uaword %r_disp32(foo)' > conftest.s
rm -f conftest.s conftest.o conftest if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
fi then
if test x$gcc_cv_ld != x \
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
gcc_cv_as_sparc_ua_pcrel=yes
fi
rm -f conftest
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then if test $gcc_cv_as_sparc_ua_pcrel = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_SPARC_UA_PCREL 1 #define HAVE_AS_SPARC_UA_PCREL 1
EOF EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 echo $ac_n "checking assembler for unaligned pcrel relocs against hidden symbols""... $ac_c" 1>&6
echo "configure:6755: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 echo "configure:6789: checking assembler for unaligned pcrel relocs against hidden symbols" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_sparc_ua_pcrel_hidden=no
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then if test x$gcc_cv_as != x; then
gcc_cv_as_sparc_ua_pcrel_hidden=unknown echo '.data
if test x$gcc_cv_objdump != x; then .align 4
gcc_cv_as_sparc_ua_pcrel_hidden=no .byte 0x31
echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s .uaword %r_disp32(foo)
echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s .byte 0x32, 0x33, 0x34
echo "foo: .skip 4" >> conftest.s .global foo
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ .hidden foo
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ foo:
&& $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ .skip 4' > conftest.s
| grep ' 31000000 07323334' > /dev/null 2>&1; then if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5'; { (eval echo configure:6804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_objdump -R conftest 2> /dev/null \ then
| grep 'DISP32' > /dev/null 2>&1; then if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
: && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
else && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
gcc_cv_as_sparc_ua_pcrel_hidden=yes | grep ' 31000000 07323334' > /dev/null 2>&1; then
fi if $gcc_cv_objdump -R conftest 2> /dev/null \
fi | grep 'DISP32' > /dev/null 2>&1; then
:
else
gcc_cv_as_sparc_ua_pcrel_hidden=yes
fi fi
rm -f conftest.s conftest.o conftest fi
else rm -f conftest
gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" else
fi echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6
if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1
EOF EOF
fi fi
fi # unaligned pcrel relocs
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 echo $ac_n "checking assembler for offsetable %lo()""... $ac_c" 1>&6
echo "configure:6795: checking for assembler offsetable %lo() support" >&5 echo "configure:6837: checking assembler for offsetable %lo()" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_sparc_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_sparc_offsetable_lo10=no
gcc_cv_as_offsetable_lo10=unknown if test x$gcc_cv_as != x; then
if test "x$gcc_cv_as" != x; then echo '.text
# Check if assembler has offsetable %lo() or %g1, %lo(ab) + 12, %g1
echo "or %g1, %lo(ab) + 12, %g1" > conftest.s or %g1, %lo(ab + 12), %g1' > conftest.s
echo "or %g1, %lo(ab + 12), %g1" > conftest1.s if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5'; { (eval echo configure:6846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ then
> /dev/null 2>&1 && if test x$gcc_cv_objdump != x \
$gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
> /dev/null 2>&1; then | grep ' 82106000 82106000' > /dev/null 2>&1; then
if cmp conftest.o conftest1.o > /dev/null 2>&1; then gcc_cv_as_offsetable_lo10=yes
gcc_cv_as_offsetable_lo10=no fi
else else
gcc_cv_as_offsetable_lo10=yes echo "configure: failed program was" >&5
fi cat conftest.s >&5
else fi
gcc_cv_as_offsetable_lo10=no rm -f conftest.o conftest.s
fi fi
rm -f conftest.s conftest.o conftest1.s conftest1.o
fi
fi fi
echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 echo "$ac_t""$gcc_cv_as_sparc_offsetable_lo10" 1>&6
if test "x$gcc_cv_as_offsetable_lo10" = xyes; then if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_OFFSETABLE_LO10 1 #define HAVE_AS_OFFSETABLE_LO10 1
EOF EOF
fi fi
;; ;;
i[34567]86-*-* | x86_64-*-*) i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 echo $ac_n "checking assembler for filds and fists mnemonics""... $ac_c" 1>&6
echo "configure:6834: checking assembler instructions" >&5 echo "configure:6872: checking assembler for filds and fists mnemonics" >&5
gcc_cv_as_instructions= if eval "test \"`echo '$''{'gcc_cv_as_ix86_filds_fists'+set}'`\" = set"; then
if test $in_tree_gas = yes ; then echo $ac_n "(cached) $ac_c" 1>&6
if test $gcc_cv_gas_major_version -eq 2 \ else
&& test $gcc_cv_gas_minor_version -ge 9 \ gcc_cv_as_ix86_filds_fists=no
|| test $gcc_cv_gas_major_version -gt 2 ; then if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0`
then gcc_cv_as_ix86_filds_fists=yes
gcc_cv_as_instructions="filds fists"
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo 'filds mem; fists mem' > conftest.s
set "filds fists" "filds mem; fists mem" if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
while test $# -gt 0 then
do gcc_cv_as_ix86_filds_fists=yes
echo "$2" > conftest.s else
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then echo "configure: failed program was" >&5
gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " cat conftest.s >&5
fi
shift 2
done
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_instructions" != x; then
cat >> confdefs.h <<EOF
#define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1
EOF
fi fi
echo "$ac_t""$gcc_cv_as_instructions" 1>&6 rm -f conftest.o conftest.s
fi
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 fi
echo "configure:6868: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_gotoff_in_data=yes echo "$ac_t""$gcc_cv_as_ix86_filds_fists" 1>&6
if test $gcc_cv_as_ix86_filds_fists = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GAS_FILDS_FISTS 1
EOF
fi fi
elif test x$gcc_cv_as != x; then echo $ac_n "checking assembler for GOTOFF in data""... $ac_c" 1>&6
cat > conftest.s <<EOF echo "configure:6903: checking assembler for GOTOFF in data" >&5
.text if eval "test \"`echo '$''{'gcc_cv_as_ix86_gotoff_in_data'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_ix86_gotoff_in_data=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
then gcc_cv_as_ix86_gotoff_in_data=yes
fi
elif test x$gcc_cv_as != x; then
echo ' .text
.L0: .L0:
nop nop
.data .data
.long .L0@GOTOFF .long .L0@GOTOFF' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then then
gcc_cv_as_gotoff_in_data=yes gcc_cv_as_ix86_gotoff_in_data=yes
fi else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi fi
cat >> confdefs.h <<EOF rm -f conftest.o conftest.s
fi
fi
echo "$ac_t""$gcc_cv_as_ix86_gotoff_in_data" 1>&6
if test $gcc_cv_as_ix86_gotoff_in_data = yes; then
cat >> confdefs.h <<EOF
#define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`
EOF EOF
echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 fi
;; ;;
ia64*-*-*) ia64*-*-*)
echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 echo $ac_n "checking assembler for ltoffx and ldxmov relocs""... $ac_c" 1>&6
echo "configure:6902: checking assembler supports ltoffx and ldxmov" >&5 echo "configure:6940: checking assembler for ltoffx and ldxmov relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then if eval "test \"`echo '$''{'gcc_cv_as_ia64_ltoffx_ldxmov_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no
gcc_cv_as_ltoffx_ldxmov_relocs=unknown if test $in_tree_gas = yes; then
if test $in_tree_gas = yes ; then if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
if test $gcc_cv_gas_major_version -eq 2 \ then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes
&& test $gcc_cv_gas_minor_version -ge 14 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_ltoffx_ldxmov_relocs=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo ' .text
cat > conftest.s << 'EOF'
.text
addl r15 = @ltoffx(x#), gp addl r15 = @ltoffx(x#), gp
;; ;;
ld8.mov r16 = [r15], x# ld8.mov r16 = r15, x#' > conftest.s
EOF if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then then
gcc_cv_as_ltoffx_ldxmov_relocs=yes cat >> confdefs.h <<\EOF
else
gcc_cv_as_ltoffx_ldxmov_relocs=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6
if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1
EOF EOF
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi fi
rm -f conftest.o conftest.s
fi
fi
echo "$ac_t""$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" 1>&6
;; ;;
powerpc*-*-*) powerpc*-*-*)
echo $ac_n "checking assembler supports mfcr field""... $ac_c" 1>&6 case $target in
echo "configure:6946: checking assembler supports mfcr field" >&5 *-*-aix) conftest_s=' .csect .textPR';;
if eval "test \"`echo '$''{'gcc_cv_as_mfcrf'+set}'`\" = set"; then *) conftest_s=' .text';;
esac
conftest_s="$conftest_s
mfcr 3,128"
echo $ac_n "checking assembler for mfcr field support""... $ac_c" 1>&6
echo "configure:6982: checking assembler for mfcr field support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_powerpc_mfcrf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
gcc_cv_as_powerpc_mfcrf=no
gcc_cv_as_mfcrf=unknown if test $in_tree_gas = yes; then
if test $in_tree_gas = yes ; then if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
if test $gcc_cv_gas_major_version -eq 2 \ then gcc_cv_as_powerpc_mfcrf=yes
&& test $gcc_cv_gas_minor_version -ge 14 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_as_mfcrf=yes
fi fi
elif test x$gcc_cv_as != x; then
elif test x$gcc_cv_as != x; then echo "$conftest_s" > conftest.s
cat > conftest.s << 'EOF' if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:6993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
case "$target" in then
*-*-aix*) gcc_cv_as_powerpc_mfcrf=yes
.csect .text[PR] else
;; echo "configure: failed program was" >&5
*) cat conftest.s >&5
.text fi
;; rm -f conftest.o conftest.s
esac fi
mfcr 3,128
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_mfcrf=yes
else
gcc_cv_as_mfcrf=no
fi
rm -f conftest.s conftest.o
fi
fi fi
echo "$ac_t""$gcc_cv_as_mfcrf" 1>&6 echo "$ac_t""$gcc_cv_as_powerpc_mfcrf" 1>&6
if test "x$gcc_cv_as_mfcrf" = xyes; then if test $gcc_cv_as_powerpc_mfcrf = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_MFCRF 1 #define HAVE_AS_MFCRF 1
EOF EOF
fi
;;
mips*-*-*)
echo $ac_n "checking assembler for explicit relocation support""... $ac_c" 1>&6
echo "configure:7015: checking assembler for explicit relocation support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_mips_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_mips_explicit_relocs=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0`
then gcc_cv_as_mips_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_mips_explicit_relocs=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi fi
rm -f conftest.o conftest.s
fi
fi
echo "$ac_t""$gcc_cv_as_mips_explicit_relocs" 1>&6
if test $gcc_cv_as_mips_explicit_relocs = yes; then
if test x$target_cpu_default = x
then target_cpu_default=MASK_EXPLICIT_RELOCS
else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
fi
fi
;; ;;
esac esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:6996: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version # ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any # of gas. Moreover, we need to emit a valid instruction to trigger any
# info to the output file. So, as supported targets are added to gas 2.11, # info to the output file. So, as supported targets are added to gas 2.11,
...@@ -7012,121 +7061,150 @@ case "$target" in ...@@ -7012,121 +7061,150 @@ case "$target" in
mmix-*-*) mmix-*-*)
insn="swym 0" insn="swym 0"
;; ;;
esac esac
if test $in_tree_gas = yes ; then if test x"$insn" != x; then
if test $gcc_cv_gas_major_version -eq 2 \ conftest_s="\
&& test $gcc_cv_gas_minor_version -ge 11 \ .file 1 \"conftest.s\"
|| test $gcc_cv_gas_major_version -gt 2 ; then .loc 1 3 0
$insn"
echo $ac_n "checking assembler for dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:7072: checking assembler for dwarf2 debug_line support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_debug_line'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_dwarf2_debug_line=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
then gcc_cv_as_dwarf2_debug_line=yes
fi
elif test x$gcc_cv_as != x; then
echo "$conftest_s" > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
# ??? This fails with non-gnu grep. Maybe use objdump?
if grep debug_line conftest.o > /dev/null 2>&1; then
gcc_cv_as_dwarf2_debug_line=yes
fi
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& gcc_cv_as_dwarf2_debug_line="yes"
# The .debug_line file table must be in the exact order that
# we specified the files, since these indices are also used
# by DW_AT_decl_file. Approximate this test by testing if
# the assembler bitches if the same index is assigned twice.
echo $ac_n "checking assembler for buggy dwarf2 .file directive""... $ac_c" 1>&6
echo "configure:7106: checking assembler for buggy dwarf2 .file directive" >&5
if eval "test \"`echo '$''{'gcc_cv_as_dwarf2_file_buggy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_dwarf2_file_buggy=no
if test x$gcc_cv_as != x; then
echo ' .file 1 "foo.s"
.file 1 "bar.s"' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'; { (eval echo configure:7114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_dwarf2_file_buggy=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo "$ac_t""$gcc_cv_as_dwarf2_file_buggy" 1>&6
echo ' .file 1 "conftest.s"' > conftest.s
echo ' .loc 1 3 0' >> conftest.s
echo " $insn" >> conftest.s if test $gcc_cv_as_dwarf2_debug_line = yes \
# ??? This fails with non-gnu grep. && test $gcc_cv_as_dwarf2_file_buggy = no; then
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& grep debug_line conftest.o > /dev/null 2>&1 ; then
# The .debug_line file table must be in the exact order that
# we specified the files, since these indices are also used
# by DW_AT_decl_file. Approximate this test by testing if
# the assembler bitches if the same index is assigned twice.
echo ' .file 1 "foo.s"' > conftest.s
echo ' .file 1 "bar.s"' >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_dwarf2_debug_line="no"
else
gcc_cv_as_dwarf2_debug_line="yes"
fi
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define HAVE_AS_DWARF2_DEBUG_LINE 1 #define HAVE_AS_DWARF2_DEBUG_LINE 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
echo "configure:7060: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& gcc_cv_as_gdwarf2_flag="yes"
echo $ac_n "checking assembler for --gdwarf2 option""... $ac_c" 1>&6
echo "configure:7137: checking assembler for --gdwarf2 option" >&5
if eval "test \"`echo '$''{'gcc_cv_as_gdwarf2_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
then gcc_cv_as_gdwarf2_flag=yes
fi
elif test x$gcc_cv_as != x; then
echo "$insn" > conftest.s
if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5'; { (eval echo configure:7149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
gcc_cv_as_gdwarf2_flag=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo '' > conftest.s if test $gcc_cv_as_gdwarf2_flag = yes; then
# ??? This fails with non-gnu grep. cat >> confdefs.h <<\EOF
if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_gdwarf2_flag="yes"
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_GDWARF2_DEBUG_FLAG 1 #define HAVE_AS_GDWARF2_DEBUG_FLAG 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
echo "configure:7092: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 11 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& gcc_cv_as_gstabs_flag="yes"
echo $ac_n "checking assembler for --gstabs option""... $ac_c" 1>&6
echo "configure:7169: checking assembler for --gstabs option" >&5
if eval "test \"`echo '$''{'gcc_cv_as_gstabs_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes; then
if test $in_tree_gas_is_elf = yes \
&& test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0`
then gcc_cv_as_gstabs_flag=yes
fi
elif test x$gcc_cv_as != x; then
echo "$insn" > conftest.s
if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5'; { (eval echo configure:7181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then
# The native Solaris 9/Intel assembler doesn't understand --gstabs
# and warns about it, but still exits successfully. So check for
# this.
if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null'; { (eval echo configure:7186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
then :
else gcc_cv_as_gstabs_flag=yes
fi
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi fi
elif test x$gcc_cv_as != x -a x"$insn" != x ; then echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo '' > conftest.s if test $gcc_cv_as_gstabs_flag = yes; then
# ??? This fails with non-gnu grep. cat >> confdefs.h <<\EOF
if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
gcc_cv_as_gstabs_flag="yes"
# The native Solaris 9/Intel assembler doesn't understand --gstabs
# and warns about it, but still exits successfully. So check for
# this.
if $gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | \
grep -i warning > /dev/null ; then
gcc_cv_as_gstabs_flag="no"
fi
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gstabs_flag" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_GSTABS_DEBUG_FLAG 1 #define HAVE_AS_GSTABS_DEBUG_FLAG 1
EOF EOF
fi fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 fi
echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6
echo "configure:7130: checking linker read-only and read-write section mixing" >&5 echo "configure:7208: checking linker read-only and read-write section mixing" >&5
gcc_cv_ld_ro_rw_mix=unknown gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \
...@@ -7165,7 +7243,7 @@ fi ...@@ -7165,7 +7243,7 @@ fi
echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
echo "configure:7169: checking linker PT_GNU_EH_FRAME support" >&5 echo "configure:7247: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \
...@@ -7187,7 +7265,7 @@ fi ...@@ -7187,7 +7265,7 @@ fi
echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6
echo "configure:7191: checking linker position independent executable support" >&5 echo "configure:7269: checking linker position independent executable support" >&5
gcc_cv_ld_pie=no gcc_cv_ld_pie=no
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \
...@@ -7212,7 +7290,7 @@ echo "$ac_t""$gcc_cv_ld_pie" 1>&6 ...@@ -7212,7 +7290,7 @@ echo "$ac_t""$gcc_cv_ld_pie" 1>&6
case "$target" in case "$target" in
mips*-*-*) mips*-*-*)
echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
echo "configure:7216: checking whether libgloss uses STARTUP directives consistently" >&5 echo "configure:7294: checking whether libgloss uses STARTUP directives consistently" >&5
gcc_cv_mips_libgloss_startup=no gcc_cv_mips_libgloss_startup=no
gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
if test "x$exec_prefix" = xNONE; then if test "x$exec_prefix" = xNONE; then
...@@ -7238,35 +7316,6 @@ EOF ...@@ -7238,35 +7316,6 @@ EOF
fi fi
echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6
echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6
echo "configure:7244: checking whether the assembler has explicit relocation support" >&5
if test x$gcc_cv_mips_explicit_relocs = x; then
gcc_cv_mips_explicit_relocs=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_major_version -eq 2 \
&& test $gcc_cv_gas_minor_version -ge 14 \
|| test $gcc_cv_gas_major_version -gt 2 ; then
gcc_cv_mips_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
gcc_cv_mips_explicit_relocs=yes
fi
rm -f conftest.s conftest.o
fi
fi
if test $gcc_cv_mips_explicit_relocs = yes; then
test x$target_cpu_default != x || target_cpu_default=0
target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
fi
echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6
;; ;;
esac esac
...@@ -7446,7 +7495,7 @@ fi ...@@ -7446,7 +7495,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:7450: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:7499: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
......
...@@ -805,7 +805,7 @@ int main() ...@@ -805,7 +805,7 @@ int main()
fi fi
fi fi
AC_CHECK_TYPE(ssize_t, int) gcc_AC_CHECK_TYPE(ssize_t, int)
# Try to determine the array type of the second argument of getgroups # Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t). # for the target system (int or gid_t).
...@@ -1726,232 +1726,156 @@ case $in_tree_objdump in ...@@ -1726,232 +1726,156 @@ case $in_tree_objdump in
esac esac
# Figure out what assembler alignment features are present. # Figure out what assembler alignment features are present.
AC_MSG_CHECKING(assembler alignment features) gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,
gcc_cv_as_alignment_features=none [2,6,0],,
if test $in_tree_gas = yes; then [.balign 4
# Gas version 2.6 and later support for .balign and .p2align. .p2align 2],,
gcc_GAS_VERSION_GTE_IFELSE(2,6,0,[ [AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN, 1,
gcc_cv_as_alignment_features=".balign and .p2align" [Define if your assembler supports .balign and .p2align.])])
AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
]) gcc_GAS_CHECK_FEATURE([.p2align with maximum skip], gcc_cv_as_max_skip_p2align,
# Gas version 2.8 and later support specifying the maximum [2,8,0],,
# bytes to skip when using .p2align. [.p2align 4,,7],,
gcc_GAS_VERSION_GTE_IFELSE(2,8,0,[ [AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN, 1,
gcc_cv_as_alignment_features=".p2align including maximum skip" [Define if your assembler supports specifying the maximum number
AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN) of bytes to skip when using the GAS .p2align command.])])
])
elif test x$gcc_cv_as != x; then gcc_GAS_CHECK_FEATURE([working .subsection -1], gcc_cv_as_subsection_m1,
# Check if we have .balign and .p2align [elf,2,9,0],,
echo ".balign 4" > conftest.s [conftest_label1: .word 0
echo ".p2align 2" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".balign and .p2align"
AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
fi
rm -f conftest.s conftest.o
# Check if specifying the maximum bytes to skip when
# using .p2align is supported.
echo ".p2align 4,,7" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_alignment_features=".p2align including maximum skip"
AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
fi
rm -f conftest.s conftest.o
fi
AC_MSG_RESULT($gcc_cv_as_alignment_features)
AC_MSG_CHECKING(assembler subsection support)
gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,9,0,[
test $in_tree_gas_is_elf = yes \
&& gcc_cv_as_subsections="working .subsection -1"
])
elif test x$gcc_cv_as != x; then
# Check if we have .subsection
echo ".subsection 1" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_subsections=".subsection"
if test x$gcc_cv_nm != x; then
cat > conftest.s <<EOF
conftest_label1: .word 0
.subsection -1 .subsection -1
conftest_label2: .word 0 conftest_label2: .word 0
.previous .previous],
EOF [if test x$gcc_cv_nm != x; then
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
$gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
$gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1
if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then then :
: else gcc_cv_as_subsection_m1=yes
else fi
gcc_cv_as_subsections="working .subsection -1" rm -f conftest.nm1 conftest.nm2
fi fi],
fi [AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
fi [Define if your assembler supports .subsection and .subsection -1 starts
fi emitting at the beginning of your section.])])
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi gcc_GAS_CHECK_FEATURE([.weak], gcc_cv_as_weak,
if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then [2,2,0],,
AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1, [ .weak foobar],,
[Define if your assembler supports .subsection and .subsection -1 starts [AC_DEFINE(HAVE_GAS_WEAK, 1, [Define if your assembler supports .weak.])])
emitting at the beginning of your section.])
fi # .hidden needs to be supported in both the assembler and the linker,
AC_MSG_RESULT($gcc_cv_as_subsections) # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
# This is irritatingly difficult to feature test for; we have to check the
AC_MSG_CHECKING(assembler weak support) # date string after the version number. If we've got an in-tree
gcc_cv_as_weak=no # ld, we don't know its patchlevel version, so we set the baseline at 2.13
if test $in_tree_gas = yes ; then # to be safe.
gcc_GAS_VERSION_GTE_IFELSE(2,2,0,[ # The gcc_GAS_CHECK_FEATURE call just sets a cache variable.
gcc_cv_as_weak="yes" gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden,
]) [elf,2,13,0],,
elif test x$gcc_cv_as != x; then [ .hidden foobar
# Check if we have .weak foobar:])
echo " .weak foobar" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden,
gcc_cv_as_weak="yes" [if test $in_tree_ld = yes ; then
fi gcc_cv_ld_hidden=no
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \
fi && test $in_tree_ld_is_elf = yes; then
if test x"$gcc_cv_as_weak" = xyes; then gcc_cv_ld_hidden=yes
AC_DEFINE(HAVE_GAS_WEAK, 1, [Define if your assembler supports .weak.]) fi
fi else
AC_MSG_RESULT($gcc_cv_as_weak) gcc_cv_ld_hidden=yes
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
AC_MSG_CHECKING(assembler hidden support) if echo "$ld_ver" | grep GNU > /dev/null; then
gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,1,[
test $in_tree_gas_is_elf = yes && gcc_cv_as_hidden="yes"
])
elif test x$gcc_cv_as != x; then
# Check if we have .hidden
echo " .hidden foobar" > conftest.s
echo "foobar:" >> conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_hidden="yes"
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
# GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
# This is irritatingly difficult to feature test for. Look for
# the date string after the version number.
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
changequote(,)dnl changequote(,)dnl
ld_vers=`echo $ld_ver | sed -n \ ld_vers=`echo $ld_ver | sed -n \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test 0"$ld_date" -lt 20020404; then if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then if test -n "$ld_date"; then
# If there was date string, but was earlier than 2002-04-04, fail # If there was date string, but was earlier than 2002-04-04, fail
gcc_cv_as_hidden="no" gcc_cv_ld_hidden=no
elif test -z "$ld_vers"; then elif test -z "$ld_vers"; then
# If there was no date string nor ld version number, something is wrong # If there was no date string nor ld version number, something is wrong
gcc_cv_as_hidden="no" gcc_cv_ld_hidden=no
else else
ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
test -z "$ld_vers_patch" && ld_vers_patch=0 test -z "$ld_vers_patch" && ld_vers_patch=0
if test "$ld_vers_major" -lt 2; then if test "$ld_vers_major" -lt 2; then
gcc_cv_as_hidden="no" gcc_cv_ld_hidden=no
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
gcc_cv_as_hidden="no" gcc_cv_ld_hidden="no"
elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then
-a "$ld_vers_patch" -eq 0; then gcc_cv_ld_hidden=no
gcc_cv_as_hidden="no"
fi
fi
fi
changequote([,])dnl
fi fi
fi fi
case "$target" in changequote([,])dnl
mips-sgi-irix6*)
if test x"$gnu_ld_flag" = x"no"; then
# Even if using gas with .hidden support, the resulting object files
# cannot be linked with the IRIX 6 O32 linker. With the N32 and
# N64 linkers, the problem is that the linker refuses to accept
# -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
gcc_cv_as_hidden=no
fi fi
;; else
esac case "$target" in
if test x"$gcc_cv_as_hidden" = xyes; then mips-sgi-irix6*)
AC_DEFINE(HAVE_GAS_HIDDEN, 1, if test x"$gnu_ld_flag" = x"no"; then
[Define if your assembler supports .hidden.]) # Even if using gas with .hidden support, the resulting object files
fi # cannot be linked with the IRIX 6 O32 linker. With the N32 and
AC_MSG_RESULT($gcc_cv_as_hidden) # N64 linkers, the problem is that the linker refuses to accept
libgcc_visibility=$gcc_cv_as_hidden # -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
gcc_cv_ld_hidden=no
fi
;;
esac
fi
fi])
libgcc_visibility=no
AC_SUBST(libgcc_visibility) AC_SUBST(libgcc_visibility)
if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden=yes; then
libgcc_visibility=yes
AC_DEFINE(HAVE_GAS_HIDDEN, 1,
[Define if your assembler and linker support .hidden.])
fi
AC_MSG_CHECKING(assembler leb128 support) # Check if we have .[us]leb128, and support symbol arithmetic with it.
gcc_cv_as_leb128=no gcc_GAS_CHECK_FEATURE([.sleb128 and .uleb128], gcc_cv_as_leb128,
if test $in_tree_gas = yes ; then [elf,2,11,0],,
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ [ .data
test $in_tree_gas_is_elf = yes && gcc_cv_as_leb128="yes"
])
elif test x$gcc_cv_as != x; then
# Check if we have .[us]leb128, and support symbol arithmetic with it.
cat > conftest.s <<EOF
.data
.uleb128 L2 - L1 .uleb128 L2 - L1
L1: L1:
.uleb128 1280 .uleb128 1280
.sleb128 -1010 .sleb128 -1010
L2: L2:],
EOF [# GAS versions before 2.11 do not support uleb128,
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then # despite appearing to.
gcc_cv_as_leb128="yes" # ??? There exists an elf-specific test that will crash
# the assembler. Perhaps it's better to figure out whether
# GAS versions before 2.11 do not support uleb128, # arbitrary sections are supported and try the test.
# despite appearing to. as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
# ??? There exists an elf-specific test that will crash if echo "$as_ver" | grep GNU > /dev/null; then
# the assembler. Perhaps it's better to figure out whether
# arbitrary sections are supported and try the test.
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
if echo "$as_ver" | grep GNU > /dev/null; then
changequote(,)dnl changequote(,)dnl
as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
as_major=`echo $as_ver | sed 's/\..*//'` as_major=`echo $as_ver | sed 's/\..*//'`
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
changequote([,])dnl changequote([,])dnl
if test $as_major -eq 2 -a $as_minor -lt 11; then if test $as_major -eq 2 && test $as_minor -lt 11
gcc_cv_as_leb128="no" then :
fi else gcc_cv_as_leb128=yes
fi fi
fi fi],
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 [AC_DEFINE(HAVE_AS_LEB128, 1,
fi [Define if your assembler supports .sleb128 and .uleb128.])])
if test x"$gcc_cv_as_leb128" = xyes; then
AC_DEFINE(HAVE_AS_LEB128, 1, # GAS versions up to and including 2.11.0 may mis-optimize
[Define if your assembler supports .uleb128.]) # .eh_frame data.
fi gcc_GAS_CHECK_FEATURE(eh_frame optimization, gcc_cv_as_eh_frame,
AC_MSG_RESULT($gcc_cv_as_leb128) [elf,2,12,0],,
[ .text
AC_MSG_CHECKING(assembler eh_frame optimization)
gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[
test $in_tree_gas_is_elf = yes && gcc_cv_as_eh_frame="yes"
])
elif test x$gcc_cv_as != x; then
# Check if this is GAS.
as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
rm -f a.out 2> /dev/null
if echo "$as_ver" | grep GNU > /dev/null; then
# Versions up to and including 2.11.0 may mis-optimize
# .eh_frame data. Try something.
cat > conftest.s <<EOF
.text
.LFB1: .LFB1:
.4byte 0 .4byte 0
.L1: .L1:
...@@ -1982,61 +1906,45 @@ __FRAME_BEGIN__: ...@@ -1982,61 +1906,45 @@ __FRAME_BEGIN__:
.4byte .LFE1-.LFB1 .4byte .LFE1-.LFB1
.byte 0x4 .byte 0x4
.4byte .L1-.LFB1 .4byte .L1-.LFB1
.LEFDE1: .LEFDE1:],
EOF [ cat > conftest.lit <<EOF
cat > conftest.lit <<EOF
0000 10000000 00000000 017a0001 781a0004 .........z..x... 0000 10000000 00000000 017a0001 781a0004 .........z..x...
0010 01000000 12000000 18000000 00000000 ................ 0010 01000000 12000000 18000000 00000000 ................
0020 08000000 04080000 0044 .........D 0020 08000000 04080000 0044 .........D
EOF EOF
cat > conftest.big <<EOF cat > conftest.big <<EOF
0000 00000010 00000000 017a0001 781a0004 .........z..x... 0000 00000010 00000000 017a0001 781a0004 .........z..x...
0010 00000001 00000012 00000018 00000000 ................ 0010 00000001 00000012 00000018 00000000 ................
0020 00000008 04000000 0844 .........D 0020 00000008 04000000 0844 .........D
EOF EOF
# If the assembler didn't choke, and we can objdump, # If the assembler didn't choke, and we can objdump,
# and we got the correct data, then succeed. # and we got the correct data, then succeed.
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
| tail -3 > conftest.got \ | tail -3 > conftest.got \
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|| cmp conftest.big conftest.got > /dev/null 2>&1; } || cmp conftest.big conftest.got > /dev/null 2>&1; }
then then
gcc_cv_as_eh_frame="yes" gcc_cv_as_eh_frame=yes
else elif AC_TRY_COMMAND($gcc_cv_as -o conftest.o --traditional-format /dev/null); then
gcc_cv_as_eh_frame="bad" gcc_cv_as_eh_frame=buggy
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then else
AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1, # Uh oh, what do we do now?
[Define if your assembler mis-optimizes .eh_frame data.]) gcc_cv_as_eh_frame=no
fi fi])
fi
fi if test $gcc_cv_as_eh_frame = buggy; then
rm -f conftest.* AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1,
fi [Define if your assembler mis-optimizes .eh_frame data.])
AC_MSG_RESULT($gcc_cv_as_eh_frame)
AC_MSG_CHECKING(assembler section merging support)
gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[
test $in_tree_gas_is_elf = yes && gcc_cv_as_shf_merge="yes"
])
elif test x$gcc_cv_as != x; then
# Check if we support SHF_MERGE sections
echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s
if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_shf_merge=yes
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_shf_merge" = xyes; then
AC_DEFINE(HAVE_GAS_SHF_MERGE, 1,
[Define if your assembler supports marking sections with SHF_MERGE flag.])
fi fi
AC_MSG_RESULT($gcc_cv_as_shf_merge)
AC_MSG_CHECKING(assembler thread-local storage support) gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge,
gcc_cv_as_tls=no [elf,2,12,0], [--fatal-warnings],
[.section .rodata.str, "aMS", @progbits, 1],,
[AC_DEFINE(HAVE_GAS_SHF_MERGE, 1,
[Define if your assembler supports marking sections with SHF_MERGE flag.])])
# Thread-local storage - the check is heavily parametrized.
conftest_s= conftest_s=
tls_first_major= tls_first_major=
tls_first_minor= tls_first_minor=
...@@ -2215,38 +2123,23 @@ foo: .long 25 ...@@ -2215,38 +2123,23 @@ foo: .long 25
;; ;;
esac esac
if test -z "$tls_first_major"; then if test -z "$tls_first_major"; then
: : # If we don't have a check, assume no support.
elif test $in_tree_gas = yes ; then else
gcc_GAS_VERSION_GTE_IFELSE($tls_first_major,$tls_first_minor,0,[ gcc_GAS_CHECK_FEATURE(thread-local storage support, gcc_cv_as_tls,
gcc_cv_as_tls=yes [$tls_first_major,$tls_first_minor,0], [$tls_as_opt --fatal-warnings],
]) [$conftest_s],,
elif test x$gcc_cv_as != x; then [AC_DEFINE(HAVE_AS_TLS, 1,
echo "$conftest_s" > conftest.s [Define if your assembler supports thread-local storage.])])
if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_tls=yes
fi
rm -f conftest.s conftest.o
fi
if test "$gcc_cv_as_tls" = yes; then
AC_DEFINE(HAVE_AS_TLS, 1,
[Define if your assembler supports thread-local storage.])
fi fi
AC_MSG_RESULT($gcc_cv_as_tls)
# Target-specific assembler checks.
case "$target" in case "$target" in
# All TARGET_ABI_OSF targets. # All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
AC_CACHE_CHECK([assembler supports explicit relocations], gcc_GAS_CHECK_FEATURE([explicit relocation support],
gcc_cv_as_explicit_relocs, [ gcc_cv_as_alpha_explicit_relocs, [2,12,0],,
gcc_cv_as_explicit_relocs=unknown [ .set nomacro
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[
gcc_cv_as_explicit_relocs=yes
])
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.set nomacro
.text .text
extbl $3, $2, $3 !lituse_bytoff!1 extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1 ldq $2, a($29) !literal!1
...@@ -2258,257 +2151,144 @@ case "$target" in ...@@ -2258,257 +2151,144 @@ case "$target" in
lda $0, c($29) !gprel lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3 lda $29, 0($29) !gpdisp!3],,
EOF [AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then [Define if your assembler supports explicit relocations.])])
gcc_cv_as_explicit_relocs=yes
else
gcc_cv_as_explicit_relocs=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_explicit_relocs" = xyes; then
AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
[Define if your assembler supports explicit relocations.])
fi
;; ;;
sparc*-*-*)
AC_CACHE_CHECK([assembler .register pseudo-op support],
gcc_cv_as_register_pseudo_op, [
gcc_cv_as_register_pseudo_op=unknown
if test x$gcc_cv_as != x; then
# Check if we have .register
echo ".register %g2, #scratch" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_register_pseudo_op=yes
else
gcc_cv_as_register_pseudo_op=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
[Define if your assembler supports .register.])
fi
AC_CACHE_CHECK([assembler supports -relax],
gcc_cv_as_relax_opt, [
gcc_cv_as_relax_opt=unknown
if test x$gcc_cv_as != x; then
# Check if gas supports -relax
echo ".text" > conftest.s
if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_relax_opt=yes
else
gcc_cv_as_relax_opt=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_relax_opt" = xyes; then
AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
[Define if your assembler supports -relax option.])
fi
AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs], sparc*-*-*)
gcc_cv_as_sparc_ua_pcrel, [ gcc_GAS_CHECK_FEATURE([.register], gcc_cv_as_sparc_register_op,,,
gcc_cv_as_sparc_ua_pcrel=unknown [.register %g2, #scratch],,
if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then [AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
gcc_cv_as_sparc_ua_pcrel=no [Define if your assembler supports .register.])])
echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ gcc_GAS_CHECK_FEATURE([-relax option], gcc_cv_as_sparc_relax,,
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then [-relax], [.text],,
gcc_cv_as_sparc_ua_pcrel=yes [AC_DEFINE(HAVE_AS_RELAX_OPTION, 1,
fi [Define if your assembler supports -relax option.])])
rm -f conftest.s conftest.o conftest
fi gcc_GAS_CHECK_FEATURE([unaligned pcrel relocs],
]) gcc_cv_as_sparc_ua_pcrel,,
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then [-K PIC],
AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1, [.text
foo:
nop
.data
.align 4
.byte 0
.uaword %r_disp32(foo)],
[if test x$gcc_cv_ld != x \
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
gcc_cv_as_sparc_ua_pcrel=yes
fi
rm -f conftest],
[AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
[Define if your assembler and linker support unaligned PC relative relocs.]) [Define if your assembler and linker support unaligned PC relative relocs.])
fi
AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs against hidden symbols], gcc_GAS_CHECK_FEATURE([unaligned pcrel relocs against hidden symbols],
gcc_cv_as_sparc_ua_pcrel_hidden, [ gcc_cv_as_sparc_ua_pcrel_hidden,,
if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then [-K PIC],
gcc_cv_as_sparc_ua_pcrel_hidden=unknown [.data
if test x$gcc_cv_objdump != x; then .align 4
gcc_cv_as_sparc_ua_pcrel_hidden=no .byte 0x31
echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s .uaword %r_disp32(foo)
echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s .byte 0x32, 0x33, 0x34
echo "foo: .skip 4" >> conftest.s .global foo
if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ .hidden foo
&& $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ foo:
&& $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ .skip 4],
| grep ' 31000000 07323334' > /dev/null 2>&1; then [if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \
if $gcc_cv_objdump -R conftest 2> /dev/null \ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
| grep 'DISP32' > /dev/null 2>&1; then && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
: | grep ' 31000000 07323334' > /dev/null 2>&1; then
else if $gcc_cv_objdump -R conftest 2> /dev/null \
gcc_cv_as_sparc_ua_pcrel_hidden=yes | grep 'DISP32' > /dev/null 2>&1; then
fi :
fi
fi
rm -f conftest.s conftest.o conftest
else
gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
fi
])
if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
AC_DEFINE(HAVE_AS_SPARC_UA_PCREL_HIDDEN, 1,
[Define if your assembler and linker support unaligned PC relative relocs against hidden symbols.])
fi
AC_CACHE_CHECK([for assembler offsetable %lo() support],
gcc_cv_as_offsetable_lo10, [
gcc_cv_as_offsetable_lo10=unknown
if test "x$gcc_cv_as" != x; then
# Check if assembler has offsetable %lo()
echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \
> /dev/null 2>&1 &&
$gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \
> /dev/null 2>&1; then
if cmp conftest.o conftest1.o > /dev/null 2>&1; then
gcc_cv_as_offsetable_lo10=no
else
gcc_cv_as_offsetable_lo10=yes
fi
else else
gcc_cv_as_offsetable_lo10=no gcc_cv_as_sparc_ua_pcrel_hidden=yes
fi fi
rm -f conftest.s conftest.o conftest1.s conftest1.o fi
fi rm -f conftest],
]) [AC_DEFINE(HAVE_AS_SPARC_UA_PCREL_HIDDEN, 1,
if test "x$gcc_cv_as_offsetable_lo10" = xyes; then [Define if your assembler and linker support unaligned PC relative relocs against hidden symbols.])])
AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1, ]) # unaligned pcrel relocs
[Define if your assembler supports offsetable %lo().])
fi gcc_GAS_CHECK_FEATURE([offsetable %lo()],
gcc_cv_as_sparc_offsetable_lo10,,
[-xarch=v9],
[.text
or %g1, %lo(ab) + 12, %g1
or %g1, %lo(ab + 12), %g1],
[if test x$gcc_cv_objdump != x \
&& %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
| grep ' 82106000 82106000' > /dev/null 2>&1; then
gcc_cv_as_offsetable_lo10=yes
fi],
[AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
[Define if your assembler supports offsetable %lo().])])
;; ;;
changequote(,)dnl changequote(,)dnl
i[34567]86-*-* | x86_64-*-*) i[34567]86-*-* | x86_64-*-*)
changequote([,])dnl changequote([,])dnl
AC_MSG_CHECKING(assembler instructions) gcc_GAS_CHECK_FEATURE([filds and fists mnemonics],
gcc_cv_as_instructions= gcc_cv_as_ix86_filds_fists,
if test $in_tree_gas = yes ; then [2,9,0],, [filds mem; fists mem],,
gcc_GAS_VERSION_GTE_IFELSE(2,9,0,[ [AC_DEFINE(HAVE_GAS_FILDS_FISTS, 1,
gcc_cv_as_instructions="filds fists" [Define if your assembler uses the new HImode fild and fist notation.])])
])
elif test x$gcc_cv_as != x; then gcc_GAS_CHECK_FEATURE([GOTOFF in data],
set "filds fists" "filds mem; fists mem" gcc_cv_as_ix86_gotoff_in_data, [2,11,0],,
while test $# -gt 0 [ .text
do
echo "$2" > conftest.s
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
fi
shift 2
done
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_instructions" != x; then
AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr '[a-z ]' '[A-Z_]'`)
fi
AC_MSG_RESULT($gcc_cv_as_instructions)
AC_MSG_CHECKING(assembler GOTOFF in data directives)
gcc_cv_as_gotoff_in_data=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
gcc_cv_as_gotoff_in_data=yes
])
elif test x$gcc_cv_as != x; then
cat > conftest.s <<EOF
.text
.L0: .L0:
nop nop
.data .data
.long .L0@GOTOFF .long .L0@GOTOFF],,
EOF [AC_DEFINE_UNQUOTED(HAVE_AS_GOTOFF_IN_DATA,
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_gotoff_in_data=yes
fi
fi
AC_DEFINE_UNQUOTED(HAVE_AS_GOTOFF_IN_DATA,
[`if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`], [`if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`],
[Define true if the assembler supports '.long foo@GOTOFF'.]) [Define true if the assembler supports '.long foo@GOTOFF'.])])
AC_MSG_RESULT($gcc_cv_as_gotoff_in_data)
;; ;;
ia64*-*-*) ia64*-*-*)
AC_CACHE_CHECK([assembler supports ltoffx and ldxmov], gcc_GAS_CHECK_FEATURE([ltoffx and ldxmov relocs],
gcc_cv_as_ltoffx_ldxmov_relocs, [ gcc_cv_as_ia64_ltoffx_ldxmov_relocs, [2,14,0],,
gcc_cv_as_ltoffx_ldxmov_relocs=unknown changequote(<<,>>)dnl
if test $in_tree_gas = yes ; then << .text
gcc_GAS_VERSION_GTE_IFELSE(2,14,0,[
gcc_cv_as_ltoffx_ldxmov_relocs=yes
])
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
changequote(,)dnl
.text
addl r15 = @ltoffx(x#), gp addl r15 = @ltoffx(x#), gp
;; ;;
ld8.mov r16 = [r15], x# ld8.mov r16 = [r15], x#>>,
EOF
changequote([,])dnl changequote([,])dnl
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then [AC_DEFINE(HAVE_AS_LTOFFX_LDXMOV_RELOCS, 1,
gcc_cv_as_ltoffx_ldxmov_relocs=yes [Define if your assembler supports ltoffx and ldxmov relocations.])])
else
gcc_cv_as_ltoffx_ldxmov_relocs=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then
AC_DEFINE(HAVE_AS_LTOFFX_LDXMOV_RELOCS, 1,
[Define if your assembler supports ltoffx and ldxmov relocations.])
fi
;; ;;
powerpc*-*-*) powerpc*-*-*)
AC_CACHE_CHECK([assembler supports mfcr field], case $target in
gcc_cv_as_mfcrf, [ *-*-aix) conftest_s=' .csect .text[PR]';;
gcc_cv_as_mfcrf=unknown *) conftest_s=' .text';;
if test $in_tree_gas = yes ; then esac
gcc_GAS_VERSION_GTE_IFELSE(2,14,0,[ conftest_s="$conftest_s
gcc_cv_as_mfcrf=yes mfcr 3,128"
])
elif test x$gcc_cv_as != x; then gcc_GAS_CHECK_FEATURE([mfcr field support],
cat > conftest.s << 'EOF' gcc_cv_as_powerpc_mfcrf, [2,14,0],,
case "$target" in [$conftest_s],,
changequote(,)dnl [AC_DEFINE(HAVE_AS_MFCRF, 1,
*-*-aix*) [Define if your assembler supports mfcr field.])])
.csect .text[PR]
;;
*)
.text
;;
esac
mfcr 3,128
EOF
changequote([,])dnl
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_mfcrf=yes
else
gcc_cv_as_mfcrf=no
fi
rm -f conftest.s conftest.o
fi
])
if test "x$gcc_cv_as_mfcrf" = xyes; then
AC_DEFINE(HAVE_AS_MFCRF, 1,
[Define if your assembler supports mfcr field.])
fi
;; ;;
esac
AC_MSG_CHECKING(assembler dwarf2 debug_line support) mips*-*-*)
gcc_cv_as_dwarf2_debug_line=no gcc_GAS_CHECK_FEATURE([explicit relocation support],
gcc_cv_as_mips_explicit_relocs, [2,14,0],,
[ lw $4,%gp_rel(foo)($4)],,
[if test x$target_cpu_default = x
then target_cpu_default=MASK_EXPLICIT_RELOCS
else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS"
fi])
;;
esac
# ??? Not all targets support dwarf2 debug_line, even within a version # ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any # of gas. Moreover, we need to emit a valid instruction to trigger any
# info to the output file. So, as supported targets are added to gas 2.11, # info to the output file. So, as supported targets are added to gas 2.11,
...@@ -2527,90 +2307,55 @@ case "$target" in ...@@ -2527,90 +2307,55 @@ case "$target" in
mmix-*-*) mmix-*-*)
insn="swym 0" insn="swym 0"
;; ;;
esac esac
if test $in_tree_gas = yes ; then if test x"$insn" != x; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ conftest_s="\
test $in_tree_gas_is_elf = yes && test x"$insn" != x \ .file 1 \"conftest.s\"
&& gcc_cv_as_dwarf2_debug_line="yes" .loc 1 3 0
]) $insn"
elif test x$gcc_cv_as != x -a x"$insn" != x ; then gcc_GAS_CHECK_FEATURE([dwarf2 debug_line support],
echo ' .file 1 "conftest.s"' > conftest.s gcc_cv_as_dwarf2_debug_line,
echo ' .loc 1 3 0' >> conftest.s [elf,2,11,0],, [$conftest_s],
echo " $insn" >> conftest.s [# ??? This fails with non-gnu grep. Maybe use objdump?
# ??? This fails with non-gnu grep. if grep debug_line conftest.o > /dev/null 2>&1; then
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ gcc_cv_as_dwarf2_debug_line=yes
&& grep debug_line conftest.o > /dev/null 2>&1 ; then fi])
# The .debug_line file table must be in the exact order that
# we specified the files, since these indices are also used # The .debug_line file table must be in the exact order that
# by DW_AT_decl_file. Approximate this test by testing if # we specified the files, since these indices are also used
# the assembler bitches if the same index is assigned twice. # by DW_AT_decl_file. Approximate this test by testing if
echo ' .file 1 "foo.s"' > conftest.s # the assembler bitches if the same index is assigned twice.
echo ' .file 1 "bar.s"' >> conftest.s gcc_GAS_CHECK_FEATURE([buggy dwarf2 .file directive],
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 gcc_cv_as_dwarf2_file_buggy,,,
then [ .file 1 "foo.s"
gcc_cv_as_dwarf2_debug_line="no" .file 1 "bar.s"])
else
gcc_cv_as_dwarf2_debug_line="yes" if test $gcc_cv_as_dwarf2_debug_line = yes \
fi && test $gcc_cv_as_dwarf2_file_buggy = no; then
fi
rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
fi
if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1, AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1,
[Define if your assembler supports dwarf2 .file/.loc directives, [Define if your assembler supports dwarf2 .file/.loc directives,
and preserves file table indices exactly as given.]) and preserves file table indices exactly as given.])
fi
gcc_GAS_CHECK_FEATURE([--gdwarf2 option],
gcc_cv_as_gdwarf2_flag,
[elf,2,11,0], [--gdwarf2], [$insn],,
[AC_DEFINE(HAVE_AS_GDWARF2_DEBUG_FLAG, 1,
[Define if your assembler supports the --gdwarf2 option.])])
gcc_GAS_CHECK_FEATURE([--gstabs option],
gcc_cv_as_gstabs_flag,
[elf,2,11,0], [--gstabs], [$insn],
[# The native Solaris 9/Intel assembler doesn't understand --gstabs
# and warns about it, but still exits successfully. So check for
# this.
if AC_TRY_COMMAND([$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null])
then :
else gcc_cv_as_gstabs_flag=yes
fi],
[AC_DEFINE(HAVE_AS_GSTABS_DEBUG_FLAG, 1,
[Define if your assembler supports the --gstabs option.])])
fi fi
AC_MSG_RESULT($gcc_cv_as_dwarf2_debug_line)
AC_MSG_CHECKING(assembler --gdwarf2 support)
gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& gcc_cv_as_gdwarf2_flag="yes"
])
elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s
# ??? This fails with non-gnu grep.
if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
then
gcc_cv_as_gdwarf2_flag="yes"
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
AC_DEFINE(HAVE_AS_GDWARF2_DEBUG_FLAG, 1,
[Define if your assembler supports the --gdwarf2 option.])
fi
AC_MSG_RESULT($gcc_cv_as_gdwarf2_flag)
AC_MSG_CHECKING(assembler --gstabs support)
gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& gcc_cv_as_gstabs_flag="yes"
])
elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s
# ??? This fails with non-gnu grep.
if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
gcc_cv_as_gstabs_flag="yes"
# The native Solaris 9/Intel assembler doesn't understand --gstabs
# and warns about it, but still exits successfully. So check for
# this.
if $gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | \
grep -i warning > /dev/null ; then
gcc_cv_as_gstabs_flag="no"
fi
fi
rm -f conftest.s conftest.o
fi
if test x"$gcc_cv_as_gstabs_flag" = xyes; then
AC_DEFINE(HAVE_AS_GSTABS_DEBUG_FLAG, 1,
[Define if your assembler supports the --gstabs option.])
fi
AC_MSG_RESULT($gcc_cv_as_gstabs_flag)
AC_MSG_CHECKING(linker read-only and read-write section mixing) AC_MSG_CHECKING(linker read-only and read-write section mixing)
gcc_cv_ld_ro_rw_mix=unknown gcc_cv_ld_ro_rw_mix=unknown
...@@ -2716,33 +2461,13 @@ case "$target" in ...@@ -2716,33 +2461,13 @@ case "$target" in
[Define if your MIPS libgloss linker scripts consistently include STARTUP directives.]) [Define if your MIPS libgloss linker scripts consistently include STARTUP directives.])
fi fi
AC_MSG_RESULT($gcc_cv_mips_libgloss_startup) AC_MSG_RESULT($gcc_cv_mips_libgloss_startup)
AC_MSG_CHECKING(whether the assembler has explicit relocation support)
if test x$gcc_cv_mips_explicit_relocs = x; then
gcc_cv_mips_explicit_relocs=no
if test $in_tree_gas = yes; then
gcc_GAS_VERSION_GTE_IFELSE(2,14,0,[
gcc_cv_mips_explicit_relocs=yes
])
elif test x$gcc_cv_as != x; then
echo ' lw $4,%gp_rel(foo)($4)' > conftest.s
if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then
gcc_cv_mips_explicit_relocs=yes
fi
rm -f conftest.s conftest.o
fi
fi
if test $gcc_cv_mips_explicit_relocs = yes; then
test x$target_cpu_default != x || target_cpu_default=0
target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)"
fi
AC_MSG_RESULT($gcc_cv_mips_explicit_relocs)
;; ;;
esac esac
if test x$with_sysroot = x && test x$host = x$target \ if test x$with_sysroot = x && test x$host = x$target \
&& test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include") AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include",
[Define to PREFIX/include if cpp should also search that directory.])
fi fi
# Figure out what language subdirectories are present. # Figure out what language subdirectories are present.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment