summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-08 10:27:54 +0000
committeroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-08 10:27:54 +0000
commit0569c094557413bc32a529511e589f673da919a1 (patch)
tree5b4aecc60b6dc31591809aaa034036a54ac3051b
parentd3b2db9a7f5e2d13f3f2717a00210e1fd14c1d61 (diff)
downloadppe42-gcc-0569c094557413bc32a529511e589f673da919a1.tar.gz
ppe42-gcc-0569c094557413bc32a529511e589f673da919a1.zip
* configure.in: When target is sparc* and tm_file contains 64,
test for 64bit support in assembler. If not supported, remove sparc/t-sol2-64 from target-dependent Makefile fragments. (AS_SPARC64_FLAG): Define to the assembler flag for 64bit. (HAVE_AS_OFFSETABLE_LO10): Rework test to use these flags. (HAVE_AS_REGISTER_PSEUDO_OP): Use config.cache. * acconfig.h (AS_SPARC64_FLAG): Added. * configure, config.in: Rebuilt. * config/sparc/sol2-sld-64.h: Same as sol2.h, if without 64bit support. Use AS_SPARC64_FLAG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30827 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/acconfig.h3
-rw-r--r--gcc/config.in3
-rw-r--r--gcc/config/sparc/sol2-sld-64.h17
-rwxr-xr-xgcc/configure138
-rw-r--r--gcc/configure.in108
6 files changed, 203 insertions, 79 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2639d725495..25ee68e4bd4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+1999-12-08 Alexandre Oliva <oliva@lsd.ic.unicamp.br>, Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in: When target is sparc* and tm_file contains 64,
+ test for 64bit support in assembler. If not supported, remove
+ sparc/t-sol2-64 from target-dependent Makefile fragments.
+ (AS_SPARC64_FLAG): Define to the assembler flag for 64bit.
+ (HAVE_AS_OFFSETABLE_LO10): Rework test to use these flags.
+ (HAVE_AS_REGISTER_PSEUDO_OP): Use config.cache.
+ * acconfig.h (AS_SPARC64_FLAG): Added.
+ * configure, config.in: Rebuilt.
+ * config/sparc/sol2-sld-64.h: Same as sol2.h, if without 64bit
+ support. Use AS_SPARC64_FLAG.
+
1999-12-07 Jakub Jelinek <jakub@redhat.com>
* config/sparc/sparc.c (hard_32bit_mode_classes): Mark registers
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index 07210fc16bc..341d2557d34 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -33,6 +33,9 @@
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
+/* Define if the assembler supports 64bit sparc. */
+#undef AS_SPARC64_FLAG
+
/* Define if your assembler supports offsetable %lo(). */
#undef HAVE_AS_OFFSETABLE_LO10
diff --git a/gcc/config.in b/gcc/config.in
index aec704a5c5c..3278c3c6208 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -34,6 +34,9 @@
/* Define if your assembler supports .balign and .p2align. */
#undef HAVE_GAS_BALIGN_AND_P2ALIGN
+/* Define if the assembler supports 64bit sparc. */
+#undef AS_SPARC64_FLAG
+
/* Define if your assembler supports offsetable %lo(). */
#undef HAVE_AS_OFFSETABLE_LO10
diff --git a/gcc/config/sparc/sol2-sld-64.h b/gcc/config/sparc/sol2-sld-64.h
index ac4f53b247b..28a0a5e6818 100644
--- a/gcc/config/sparc/sol2-sld-64.h
+++ b/gcc/config/sparc/sol2-sld-64.h
@@ -1,10 +1,16 @@
/* Definitions of target machine for GNU compiler, for 64-bit SPARC
running Solaris 2 using the system linker. */
+#ifdef AS_SPARC64_FLAG
+
#define SPARC_BI_ARCH
+#endif
+
#include "sparc/sol2.h"
+#ifdef AS_SPARC64_FLAG
+
/* At least up through Solaris 2.6,
the system linker does not work with DWARF or DWARF2,
since it does not have working support for relocations
@@ -31,7 +37,7 @@
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC ""
#undef ASM_CPU64_DEFAULT_SPEC
-#define ASM_CPU64_DEFAULT_SPEC "-xarch=v9"
+#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
#undef CPP_CPU64_DEFAULT_SPEC
@@ -45,7 +51,7 @@
#undef ASM_CPU32_DEFAULT_SPEC
#define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusa"
#undef ASM_CPU64_DEFAULT_SPEC
-#define ASM_CPU64_DEFAULT_SPEC "-xarch=v9a"
+#define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a"
#endif
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
@@ -84,9 +90,9 @@
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC "\
-%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-xarch=v8plusa") DEF_ARCH64_SPEC("-xarch=v9a") "} \
-%{mcpu=v9:" DEF_ARCH32_SPEC("-xarch=v8plus") DEF_ARCH64_SPEC("-xarch=v9") "} \
-%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC("-xarch=v9") "}}} \
+%{mcpu=ultrasparc:" DEF_ARCH32_SPEC("-xarch=v8plusa") DEF_ARCH64_SPEC(AS_SPARC64_FLAG "a") "} \
+%{mcpu=v9:" DEF_ARCH32_SPEC("-xarch=v8plus") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "} \
+%{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:" DEF_ARCH32_SPEC("-xarch=v8") DEF_ARCH64_SPEC(AS_SPARC64_FLAG) "}}} \
%{!mcpu*:%(asm_cpu_default)} \
"
@@ -364,3 +370,4 @@ __enable_execute_stack (addr) \
fprintf (FILE, "\n"); \
} while (0)
+#endif
diff --git a/gcc/configure b/gcc/configure
index f38e554169b..4f4753c79fc 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1337,7 +1337,7 @@ else
fi
# Find some useful tools
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -5990,7 +5990,7 @@ for machine in $build $host $target; do
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
case $machine in
- *-*-solaris2.[0-6]*) ;;
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
*-*-solaris2*)
tm_file=sparc/sol2-sld-64.h
tmake_file="$tmake_file sparc/t-sol2-64"
@@ -8602,60 +8602,120 @@ case "$target" in
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:8605: checking assembler .register pseudo-op support" >&5
- gcc_cv_as_register_pseudo_op=
- 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
+if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ 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
- cat >> confdefs.h <<\EOF
+ else
+ gcc_cv_as_register_pseudo_op=no
+ fi
+ rm -f conftest.s conftest.o
+ fi
+
+fi
+
+echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
+ if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
+ cat >> confdefs.h <<\EOF
#define HAVE_AS_REGISTER_PSEUDO_OP 1
EOF
- fi
- rm -f conftest.s conftest.o
fi
- echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6
- echo $ac_n "checking assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:8622: checking assembler offsetable %lo() support" >&5
- gcc_cv_as_offsetable_lo10=
- 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
- gcc_cv_as_flags64="-xarch=v9"
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_flags64="-64"
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_flags64=""
+ case "$tm_file" in
+ *64*)
+ echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
+echo "configure:8635: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
+if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ if test -n "$gcc_cv_as"; then
+ echo ".xword foo" > conftest.s
+ gcc_cv_as_flags64=no
+ for flag in "-xarch=v9" "64 -Av9"; do
+ if $gcc_cv_as $flag -o conftest.o conftest.s \
+ > /dev/null 2>&1; then
+ gcc_cv_as_flags64=$flag
+ break
+ fi
+ done
+ rm -f conftest.s conftest.o
+ else
+ if test "$gas" = yes; then
+ gcc_cv_as_flags64="-64 -Av9"
+ else
+ gcc_cv_as_flags64="-xarch=v9"
+ fi
fi
+
+fi
+
+echo "$ac_t""$gcc_cv_as_flags64" 1>&6
+ if test "x$gcc_cv_as_flags64" = xno; then
+
+ tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+ dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+
+ else
+ cat >> confdefs.h <<EOF
+#define AS_SPARC64_FLAG "$gcc_cv_as_flags64"
+EOF
+
fi
- if test -n "$gcc_cv_as_flags64" ; then
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s > /dev/null 2>&1; then
- if cmp conftest.o conftest1.o > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_offsetable_lo10=yes
- cat >> confdefs.h <<\EOF
+ ;;
+ *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
+ ;;
+ esac
+
+ if test "x$gcc_cv_as_flags64" != xno; then
+ echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
+echo "configure:8680: checking for assembler offsetable %lo() support" >&5
+if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ 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 $gcc_cv_as_flags64 -o conftest.o conftest.s \
+ > /dev/null 2>&1 &&
+ $gcc_cv_as $gcc_cv_as_flags64 -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
+ gcc_cv_as_offsetable_lo10=no
+ fi
+ rm -f conftest.s conftest.o conftest1.s conftest1.o
+ fi
+
+fi
+
+echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
+ if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
+ cat >> confdefs.h <<\EOF
#define HAVE_AS_OFFSETABLE_LO10 1
EOF
- fi
- fi
fi
- rm -f conftest.s conftest.o conftest1.s conftest1.o
fi
- echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6
;;
i[34567]86-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8659: checking assembler instructions" >&5
+echo "configure:8719: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_as != x; then
set "filds fists" "filds mem; fists mem"
diff --git a/gcc/configure.in b/gcc/configure.in
index 8979d35fdd6..26a0a2bedc5 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -3309,7 +3309,7 @@ changequote([,])dnl
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
case $machine in
changequote(,)dnl
- *-*-solaris2.[0-6]*) ;;
+ *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
changequote([,])dnl
*-*-solaris2*)
tm_file=sparc/sol2-sld-64.h
@@ -4324,49 +4324,87 @@ AC_MSG_RESULT($gcc_cv_as_subsections)
case "$target" in
sparc*-*-*)
- AC_MSG_CHECKING(assembler .register pseudo-op support)
- gcc_cv_as_register_pseudo_op=
- 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
+ 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
- AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
+ else
+ gcc_cv_as_register_pseudo_op=no
+ fi
+ rm -f conftest.s conftest.o
fi
- rm -f conftest.s conftest.o
+ ])
+ if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
+ AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
fi
- AC_MSG_RESULT($gcc_cv_as_register_pseudo_op)
- AC_MSG_CHECKING([assembler offsetable %lo() support])
- gcc_cv_as_offsetable_lo10=
- 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
- gcc_cv_as_flags64="-xarch=v9"
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_flags64="-64"
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_flags64=""
+ case "$tm_file" in
+ *64*)
+ AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
+ gcc_cv_as_flags64, [
+ if test -n "$gcc_cv_as"; then
+ echo ".xword foo" > conftest.s
+ gcc_cv_as_flags64=no
+ for flag in "-xarch=v9" "64 -Av9"; do
+ if $gcc_cv_as $flag -o conftest.o conftest.s \
+ > /dev/null 2>&1; then
+ gcc_cv_as_flags64=$flag
+ break
+ fi
+ done
+ rm -f conftest.s conftest.o
+ else
+ if test "$gas" = yes; then
+ gcc_cv_as_flags64="-64 -Av9"
+ else
+ gcc_cv_as_flags64="-xarch=v9"
+ fi
fi
+ ])
+ if test "x$gcc_cv_as_flags64" = xno; then
+changequote(, )
+ tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+ dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
+changequote([, ])
+ else
+ AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64")
fi
- if test -n "$gcc_cv_as_flags64" ; then
- if $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s > /dev/null 2>&1; then
- if cmp conftest.o conftest1.o > /dev/null 2>&1; then
- :
- else
- gcc_cv_as_offsetable_lo10=yes
- AC_DEFINE(HAVE_AS_OFFSETABLE_LO10)
- fi
+ ;;
+ *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
+ ;;
+ esac
+
+ if test "x$gcc_cv_as_flags64" != xno; then
+ 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 $gcc_cv_as_flags64 -o conftest.o conftest.s \
+ > /dev/null 2>&1 &&
+ $gcc_cv_as $gcc_cv_as_flags64 -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
+ gcc_cv_as_offsetable_lo10=no
fi
+ rm -f conftest.s conftest.o conftest1.s conftest1.o
+ fi
+ ])
+ if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
+ AC_DEFINE(HAVE_AS_OFFSETABLE_LO10)
fi
- rm -f conftest.s conftest.o conftest1.s conftest1.o
fi
- AC_MSG_RESULT($gcc_cv_as_offsetable_lo10)
;;
changequote(,)dnl
OpenPOWER on IntegriCloud