alpha.h (TARGET_SWITCHES): Turn on MASK_EXPLICIT_RELOCS if the assembler supports it.

* config/alpha/alpha.h (TARGET_SWITCHES): Turn on
        MASK_EXPLICIT_RELOCS if the assembler supports it.
        * configure.in (HAVE_AS_EXPLICIT_RELOCS): New.
        * configure, config.in: Rebuild.

From-SVN: r48054
This commit is contained in:
Richard Henderson 2001-12-15 17:05:01 -08:00 committed by Richard Henderson
parent bd1f473825
commit 3a37b08e62
5 changed files with 136 additions and 24 deletions

View File

@ -1,3 +1,10 @@
2001-12-15 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.h (TARGET_SWITCHES): Turn on
MASK_EXPLICIT_RELOCS if the assembler supports it.
* configure.in (HAVE_AS_EXPLICIT_RELOCS): New.
* configure, config.in: Rebuild.
Sat Dec 15 17:53:03 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted

View File

@ -526,6 +526,9 @@
/* Define if your assembler supports marking sections with SHF_MERGE flag. */
#undef HAVE_GAS_SHF_MERGE
/* Define if your assembler supports explicit relocations. */
#undef HAVE_AS_EXPLICIT_RELOCS
/* Define if your assembler supports .register. */
#undef HAVE_AS_REGISTER_PSEUDO_OP

View File

@ -251,7 +251,8 @@ extern enum alpha_fp_trap_mode alpha_fptm;
N_("Emit 16-bit relocations to the small data areas")}, \
{"large-data", -MASK_SMALL_DATA, \
N_("Emit 32-bit relocations to the small data areas")}, \
{"", TARGET_DEFAULT | TARGET_CPU_DEFAULT, ""} }
{"", TARGET_DEFAULT | TARGET_CPU_DEFAULT \
| TARGET_DEFAULT_EXPLICIT_RELOCS, ""} }
#define TARGET_DEFAULT MASK_FP|MASK_FPREGS
@ -259,6 +260,14 @@ extern enum alpha_fp_trap_mode alpha_fptm;
#define TARGET_CPU_DEFAULT 0
#endif
#ifndef TARGET_DEFAULT_EXPLICIT_RELOCS
#ifdef HAVE_AS_EXPLICIT_RELOCS
#define TARGET_DEFAULT_EXPLICIT_RELOCS MASK_EXPLICIT_RELOCS
#else
#define TARGET_DEFAULT_EXPLICIT_RELOCS 0
#endif
#endif
/* This macro is similar to `TARGET_SWITCHES' but defines names of
command options that have values. Its definition is an initializer
with a subgrouping for each command option.

97
gcc/configure vendored
View File

@ -2078,7 +2078,7 @@ EOF
fi
# Find some useful tools
for ac_prog in mawk gawk nawk awk
for ac_prog in gawk mawk 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
@ -6906,7 +6906,7 @@ fi
# Figure out what linker we will be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
echo "configure:6904: checking what linker to use" >&5
echo "configure:6910: checking what linker to use" >&5
gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
@ -6992,7 +6992,7 @@ fi
# Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
echo "configure:6910: checking what nm to use" >&5
echo "configure:6996: checking what nm to use" >&5
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test x$host = x$target; then
@ -7003,7 +7003,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
echo "configure:6921: checking what objdump to use" >&5
echo "configure:7007: checking what objdump to use" >&5
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test x$host = x$target; then
@ -7014,7 +7014,7 @@ echo "$ac_t""$gcc_cv_objdump" 1>&6
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
echo "configure:6932: checking assembler alignment features" >&5
echo "configure:7018: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
@ -7062,7 +7062,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
echo "configure:6980: checking assembler subsection support" >&5
echo "configure:7066: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7102,7 +7102,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
echo "configure:7020: checking assembler weak support" >&5
echo "configure:7106: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7125,7 +7125,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
echo "configure:7043: checking assembler hidden support" >&5
echo "configure:7129: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 10 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7149,7 +7149,7 @@ fi
echo "$ac_t""$gcc_cv_as_hidden" 1>&6
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
echo "configure:7067: checking assembler leb128 support" >&5
echo "configure:7153: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7194,7 +7194,7 @@ fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
echo "configure:7112: checking assembler eh_frame optimization" >&5
echo "configure:7198: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7275,7 +7275,7 @@ fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
echo "configure:7193: checking assembler section merging support" >&5
echo "configure:7279: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@ -7297,10 +7297,61 @@ EOF
fi
echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6
case "$target" in
case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
echo "configure:7305: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gcc_cv_as_explicit_relocs=unknown
if test x$gcc_cv_gas_major_version != x \
-a x$gcc_cv_gas_minor_version != x
then
if test "$gcc_cv_gas_major_version" -eq 2 \
-a "$gcc_cv_gas_minor_version" -ge 12 \
-o "$gcc_cv_gas_major_version" -gt 2; then
gcc_cv_as_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.set nomacro
.text
extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1
ldq $4, b($29) !literal!2
ldq_u $3, 0($2) !lituse_base!1
ldq $27, f($29) !literal!5
jsr $26, ($27), f !lituse_jsr!5
ldah $29, 0($26) !gpdisp!3
lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
gcc_cv_as_explicit_relocs=yes
else
gcc_cv_as_explicit_relocs=no
fi
rm -f conftest.s conftest.o
fi
fi
echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6
if test "x$gcc_cv_as_explicit_relocs" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_AS_EXPLICIT_RELOCS 1
EOF
fi
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
echo "configure:7218: checking assembler .register pseudo-op support" >&5
echo "configure:7355: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7328,7 +7379,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
echo "configure:7246: checking assembler supports -relax" >&5
echo "configure:7383: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -7358,7 +7409,7 @@ EOF
case "$tm_file" in
*64*)
echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
echo "configure:7276: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
echo "configure:7413: 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
@ -7403,7 +7454,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
echo "configure:7321: checking for assembler offsetable %lo() support" >&5
echo "configure:7458: 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
@ -7443,7 +7494,7 @@ EOF
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
echo "configure:7361: checking assembler instructions" >&5
echo "configure:7498: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
@ -7470,7 +7521,7 @@ EOF
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
echo "configure:7388: checking assembler GOTOFF in data directives" >&5
echo "configure:7525: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
then
@ -7500,7 +7551,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
echo "configure:7418: checking assembler dwarf2 debug_line support" >&5
echo "configure:7555: 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
# of gas. Moreover, we need to emit a valid instruction to trigger any
@ -7556,7 +7607,7 @@ 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:7474: checking assembler --gdwarf2 support" >&5
echo "configure:7611: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7585,7 +7636,7 @@ fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
echo "configure:7503: checking assembler --gstabs support" >&5
echo "configure:7640: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@ -7613,7 +7664,7 @@ fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
echo "configure:7611: checking linker PT_GNU_EH_FRAME support" >&5
echo "configure:7668: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no
if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; 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 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
@ -7776,7 +7827,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:7673: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:7831: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"

View File

@ -1623,6 +1623,48 @@ fi
AC_MSG_RESULT($gcc_cv_as_shf_merge)
case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
AC_CACHE_CHECK([assembler supports explicit relocations],
gcc_cv_as_explicit_relocs, [
gcc_cv_as_explicit_relocs=unknown
if test x$gcc_cv_gas_major_version != x \
-a x$gcc_cv_gas_minor_version != x
then
if test "$gcc_cv_gas_major_version" -eq 2 \
-a "$gcc_cv_gas_minor_version" -ge 12 \
-o "$gcc_cv_gas_major_version" -gt 2; then
gcc_cv_as_explicit_relocs=yes
fi
elif test x$gcc_cv_as != x; then
cat > conftest.s << 'EOF'
.set nomacro
.text
extbl $3, $2, $3 !lituse_bytoff!1
ldq $2, a($29) !literal!1
ldq $4, b($29) !literal!2
ldq_u $3, 0($2) !lituse_base!1
ldq $27, f($29) !literal!5
jsr $26, ($27), f !lituse_jsr!5
ldah $29, 0($26) !gpdisp!3
lda $0, c($29) !gprel
ldah $1, d($29) !gprelhigh
lda $1, d($1) !gprellow
lda $29, 0($29) !gpdisp!3
EOF
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
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, [