summaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-06-07 08:32:03 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-06-07 08:32:03 +0000
commit43160d015f6a0d6657b2ad4e06a242918a4006c8 (patch)
treeecd8fa8934e7a082e52d6ac63f30a13d0ea35862 /gcc/configure.in
parent750c925888dd3194294ad91cb1920f5175648006 (diff)
downloadgcc-43160d015f6a0d6657b2ad4e06a242918a4006c8.tar.gz
configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support.
* configure.in (sparc*-*-*): Check assembler R_SPARC_UA32 support. * configure: Rebuilt. From-SVN: r42955
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 0c9117ad98a..0b89592e1ab 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -1587,6 +1587,42 @@ changequote([, ])
[Define if your assembler supports offsetable %lo().])
fi
fi
+ AC_CACHE_CHECK([assembler R_SPARC_UA32 relocation support],
+ gcc_cv_as_ua32_reloc, [
+ gcc_cv_as_ua32_reloc=
+ cat >conftest.s << EOF
+ .byte 0x1
+ .uaword foo
+EOF
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ if (readelf -r conftest.o > conftest.elf) 2>/dev/null ; then
+ true
+ elif (elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then
+ true
+ elif (`dirname $gcc_cv_as`/readelf -r conftest.o > conftest.elf) 2>/dev/null ; then
+ true
+ elif (`dirname $gcc_cv_as`/elfdump -r conftest.o > conftest.elf) 2>/dev/null ; then
+ true
+ else
+ gcc_cv_as_ua32_reloc=unknown
+ fi
+ if test x$gcc_cv_as_ua32_reloc = x && test `grep -c R_SPARC_UA32 conftest.elf` = 1 ; then
+ gcc_cv_as_ua32_reloc=yes
+ else
+ gcc_cv_as_ua32_reloc=no
+ fi
+ else
+ gcc_cv_as_ua32_reloc=unknown
+ fi
+ rm -f conftest.s conftest.o conftest.elf
+ ])
+ if test "x$gcc_cv_as_ua32_reloc" = xno; then
+ AC_MSG_ERROR([Assembler does not support R_SPARC_UA32 correctly.
+Please use native assembler or upgrade to binutils >= 2.11.1])
+ elif test "x$gcc_cv_as_ua32_reloc" != xyes ; then
+ AC_MSG_WARN([Cannot determine whether assembler supports R_SPARC_UA32 correctly.
+The resulting compiler might not produce useable executables.])
+ fi
;;
changequote(,)dnl