mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-24 22:19:59 +08:00
configure.in (gcc_cv_as_eh_frame): New test.
* configure.in (gcc_cv_as_eh_frame): New test. * config.in, configure: Rebuild. * gcc.c (init_spec): Honor USE_AS_TRADITIONAL_FORMAT. From-SVN: r42092
This commit is contained in:
parent
e8b073c1bd
commit
c64688ae79
@ -1,3 +1,9 @@
|
||||
2001-05-14 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* configure.in (gcc_cv_as_eh_frame): New test.
|
||||
* config.in, configure: Rebuild.
|
||||
* gcc.c (init_spec): Honor USE_AS_TRADITIONAL_FORMAT.
|
||||
|
||||
2001-05-14 Andrew MacLeod <amacleod@redhat.com>
|
||||
|
||||
* config/ia64/lib1funcs.asm (__divtf3): Fix incorrect bits in
|
||||
|
@ -469,6 +469,9 @@
|
||||
/* Define if your assembler supports .uleb128. */
|
||||
#undef HAVE_AS_LEB128
|
||||
|
||||
/* Define if your assembler mis-optimizes .eh_frame data. */
|
||||
#undef USE_AS_TRADITIONAL_FORMAT
|
||||
|
||||
/* Define if your assembler supports .register. */
|
||||
#undef HAVE_AS_REGISTER_PSEUDO_OP
|
||||
|
||||
|
90
gcc/configure
vendored
90
gcc/configure
vendored
@ -2018,7 +2018,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
|
||||
@ -6888,10 +6888,84 @@ EOF
|
||||
fi
|
||||
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
|
||||
|
||||
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
|
||||
echo "configure:6893: 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
|
||||
gcc_cv_as_eh_frame="yes"
|
||||
fi
|
||||
elif test x$gcc_cv_as != x; then
|
||||
# Check if this is GAS.
|
||||
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
|
||||
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:
|
||||
.4byte 0
|
||||
.L1:
|
||||
.4byte 0
|
||||
.LFE1:
|
||||
.section .eh_frame,"aw",@progbits
|
||||
__FRAME_BEGIN__:
|
||||
.4byte .LECIE1-.LSCIE1
|
||||
.LSCIE1:
|
||||
.4byte 0x0
|
||||
.byte 0x1
|
||||
.ascii "z\0"
|
||||
.byte 0x1
|
||||
.byte 0x78
|
||||
.byte 0x1a
|
||||
.byte 0x0
|
||||
.byte 0x4
|
||||
.4byte 1
|
||||
.p2align 1
|
||||
.LECIE1:
|
||||
.LSFDE1:
|
||||
.4byte .LEFDE1-.LASFDE1
|
||||
.LASFDE1:
|
||||
.4byte .LASFDE1-__FRAME_BEGIN__
|
||||
.4byte .LFB1
|
||||
.4byte .LFE1-.LFB1
|
||||
.byte 0x4
|
||||
.4byte .LFE1-.LFB1
|
||||
.byte 0x4
|
||||
.4byte .L1-.LFB1
|
||||
.LEFDE1:
|
||||
EOF
|
||||
cat > conftest.exp <<EOF
|
||||
0000 10000000 00000000 017a0001 781a0004 .........z..x...
|
||||
0010 01000000 12000000 18000000 00000000 ................
|
||||
0020 08000000 04080000 0044 .........D
|
||||
EOF
|
||||
# If the assembler didn't choke, and we can objdump,
|
||||
# and we got the correct data, then succeed.
|
||||
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
|
||||
&& objdump -s -j .eh_frame conftest.o 2>/dev/null \
|
||||
| tail -3 > conftest.got \
|
||||
&& cmp conftest.exp conftest.got > /dev/null 2>&1
|
||||
then
|
||||
gcc_cv_as_eh_frame="yes"
|
||||
else
|
||||
gcc_cv_as_eh_frame="bad"
|
||||
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define USE_AS_TRADITIONAL_FORMAT 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.*
|
||||
fi
|
||||
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
|
||||
|
||||
case "$target" in
|
||||
sparc*-*-*)
|
||||
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
|
||||
echo "configure:6895: checking assembler .register pseudo-op support" >&5
|
||||
echo "configure:6969: 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
|
||||
@ -6919,7 +6993,7 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
|
||||
echo "configure:6923: checking assembler supports -relax" >&5
|
||||
echo "configure:6997: 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
|
||||
@ -6949,7 +7023,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:6953: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
|
||||
echo "configure:7027: 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
|
||||
@ -6994,7 +7068,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:6998: checking for assembler offsetable %lo() support" >&5
|
||||
echo "configure:7072: 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
|
||||
@ -7033,7 +7107,7 @@ EOF
|
||||
|
||||
i[34567]86-*-*)
|
||||
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
|
||||
echo "configure:7037: checking assembler instructions" >&5
|
||||
echo "configure:7111: 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
|
||||
@ -7062,7 +7136,7 @@ EOF
|
||||
esac
|
||||
|
||||
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
|
||||
echo "configure:7066: checking assembler dwarf2 debug_line support" >&5
|
||||
echo "configure:7140: 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
|
||||
@ -7247,7 +7321,7 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
||||
echo "configure:7251: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||
echo "configure:7325: 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"
|
||||
|
@ -1410,6 +1410,77 @@ if test x"$gcc_cv_as_leb128" = xyes; then
|
||||
fi
|
||||
AC_MSG_RESULT($gcc_cv_as_leb128)
|
||||
|
||||
AC_MSG_CHECKING(assembler eh_frame optimization)
|
||||
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
|
||||
gcc_cv_as_eh_frame="yes"
|
||||
fi
|
||||
elif test x$gcc_cv_as != x; then
|
||||
# Check if this is GAS.
|
||||
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
|
||||
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:
|
||||
.4byte 0
|
||||
.L1:
|
||||
.4byte 0
|
||||
.LFE1:
|
||||
.section .eh_frame,"aw",@progbits
|
||||
__FRAME_BEGIN__:
|
||||
.4byte .LECIE1-.LSCIE1
|
||||
.LSCIE1:
|
||||
.4byte 0x0
|
||||
.byte 0x1
|
||||
.ascii "z\0"
|
||||
.byte 0x1
|
||||
.byte 0x78
|
||||
.byte 0x1a
|
||||
.byte 0x0
|
||||
.byte 0x4
|
||||
.4byte 1
|
||||
.p2align 1
|
||||
.LECIE1:
|
||||
.LSFDE1:
|
||||
.4byte .LEFDE1-.LASFDE1
|
||||
.LASFDE1:
|
||||
.4byte .LASFDE1-__FRAME_BEGIN__
|
||||
.4byte .LFB1
|
||||
.4byte .LFE1-.LFB1
|
||||
.byte 0x4
|
||||
.4byte .LFE1-.LFB1
|
||||
.byte 0x4
|
||||
.4byte .L1-.LFB1
|
||||
.LEFDE1:
|
||||
EOF
|
||||
cat > conftest.exp <<EOF
|
||||
0000 10000000 00000000 017a0001 781a0004 .........z..x...
|
||||
0010 01000000 12000000 18000000 00000000 ................
|
||||
0020 08000000 04080000 0044 .........D
|
||||
EOF
|
||||
# If the assembler didn't choke, and we can objdump,
|
||||
# and we got the correct data, then succeed.
|
||||
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
|
||||
&& objdump -s -j .eh_frame conftest.o 2>/dev/null \
|
||||
| tail -3 > conftest.got \
|
||||
&& cmp conftest.exp conftest.got > /dev/null 2>&1
|
||||
then
|
||||
gcc_cv_as_eh_frame="yes"
|
||||
else
|
||||
gcc_cv_as_eh_frame="bad"
|
||||
if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
|
||||
AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1,
|
||||
[Define if your assembler mis-optimizes .eh_frame data.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.*
|
||||
fi
|
||||
AC_MSG_RESULT($gcc_cv_as_eh_frame)
|
||||
|
||||
case "$target" in
|
||||
sparc*-*-*)
|
||||
AC_CACHE_CHECK([assembler .register pseudo-op support],
|
||||
|
@ -1454,6 +1454,15 @@ init_spec ()
|
||||
libgcc_spec = obstack_finish (&obstack);
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_AS_TRADITIONAL_FORMAT
|
||||
/* Prepend "--traditional-format" to whatever asm_spec we had before. */
|
||||
{
|
||||
static char tf[] = "--traditional-format ";
|
||||
obstack_grow (&obstack, tf, sizeof(tf) - 1);
|
||||
obstack_grow0 (&obstack, asm_spec, strlen (asm_spec));
|
||||
asm_spec = obstack_finish (&obstack);
|
||||
}
|
||||
#endif
|
||||
|
||||
specs = sl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user