@@ -28475,6 +28475,7 @@ $as_echo "#define HAVE_AS_GDWARF2_DEBUG_FLAG 1" >>confdefs.h
fi
+ dwarf5_success=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf-5 option" >&5
$as_echo_n "checking assembler for --gdwarf-5 option... " >&6; }
if ${gcc_cv_as_gdwarf_5_flag+:} false; then :
@@ -28506,9 +28507,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_gdwarf_5_flag" >&5
$as_echo "$gcc_cv_as_gdwarf_5_flag" >&6; }
if test $gcc_cv_as_gdwarf_5_flag = yes; then
-
-$as_echo "#define HAVE_AS_GDWARF_5_DEBUG_FLAG 1" >>confdefs.h
-
+ dwarf5_success=yes
fi
@@ -28701,7 +28700,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_debug_line_32_flag" >&5
$as_echo "$gcc_cv_as_debug_line_32_flag" >&6; }
if test $gcc_cv_as_debug_line_32_flag = yes; then
- success=yes
+ dwarf4_success=yes
fi
else
@@ -28741,6 +28740,7 @@ fi
fi
if test $dwarf4_success = yes; then
+ dwarf4_success=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gdwarf-4 not refusing compiler generated .debug_line" >&5
$as_echo_n "checking assembler for --gdwarf-4 not refusing compiler generated .debug_line... " >&6; }
if ${gcc_cv_as_dwarf_4_debug_line_flag+:} false; then :
@@ -28772,9 +28772,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_dwarf_4_debug_line_flag" >&5
$as_echo "$gcc_cv_as_dwarf_4_debug_line_flag" >&6; }
if test $gcc_cv_as_dwarf_4_debug_line_flag = yes; then
-
-$as_echo "#define HAVE_AS_WORKING_DWARF_4_FLAG 1" >>confdefs.h
-
+ dwarf4_success=yes
fi
break
@@ -28785,6 +28783,108 @@ fi
dwarf4_line_sz=5
done
+ conftest_s="\
+ .text
+ .globl foo
+ .type foo, %function
+foo:
+ $insn
+ .size foo, .-foo
+ .file 0 \"foo.c\"
+"
+ if test $dwarf5_success = yes; then
+ dwarf5_success=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working --gdwarf-5 option" >&5
+$as_echo_n "checking assembler for working --gdwarf-5 option... " >&6; }
+if ${gcc_cv_as_working_gdwarf_5_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gcc_cv_as_working_gdwarf_5_flag=no
+ if test x$gcc_cv_as != x; then
+ $as_echo "$conftest_s" > conftest.s
+ if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-5 -o conftest.o conftest.s >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ if test x$gcc_cv_readelf != x \
+ && $gcc_cv_readelf -w conftest.o 2>&1 \
+ | grep conftest.s > /dev/null 2>&1; then
+ dwarf5_success=no
+ else
+ dwarf5_success=yes
+ fi
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_working_gdwarf_5_flag" >&5
+$as_echo "$gcc_cv_as_working_gdwarf_5_flag" >&6; }
+
+
+ if test $dwarf5_success = yes; then
+
+$as_echo "#define HAVE_AS_GDWARF_5_DEBUG_FLAG 1" >>confdefs.h
+
+ fi
+ fi
+
+ conftest_s="\
+ .text
+ .globl foo
+ .type foo, %function
+foo:
+ $insn
+ .size foo, .-foo
+ .file 1 \"foo.c\"
+"
+ if test $dwarf4_success = yes; then
+ dwarf4_success=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for working --gdwarf-4 option" >&5
+$as_echo_n "checking assembler for working --gdwarf-4 option... " >&6; }
+if ${gcc_cv_as_working_gdwarf_4_flag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gcc_cv_as_working_gdwarf_4_flag=no
+ if test x$gcc_cv_as != x; then
+ $as_echo "$conftest_s" > conftest.s
+ if { ac_try='$gcc_cv_as $gcc_cv_as_flags --gdwarf-4 -o conftest.o conftest.s >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ if test x$gcc_cv_readelf != x \
+ && $gcc_cv_readelf -w conftest.o 2>&1 \
+ | grep conftest.s > /dev/null 2>&1; then
+ dwarf4_success=no
+ else
+ dwarf4_success=yes
+ fi
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_working_gdwarf_4_flag" >&5
+$as_echo "$gcc_cv_as_working_gdwarf_4_flag" >&6; }
+
+
+ if test $dwarf4_success = yes; then
+
+$as_echo "#define HAVE_AS_WORKING_DWARF_4_FLAG 1" >>confdefs.h
+
+ fi
+ fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for --gstabs option" >&5
$as_echo_n "checking assembler for --gstabs option... " >&6; }
if ${gcc_cv_as_gstabs_flag+:} false; then :
@@ -5197,11 +5197,11 @@ if test x"$insn" != x; then
[AC_DEFINE(HAVE_AS_GDWARF2_DEBUG_FLAG, 1,
[Define if your assembler supports the --gdwarf2 option.])])
+ dwarf5_success=no
gcc_GAS_CHECK_FEATURE([--gdwarf-5 option],
gcc_cv_as_gdwarf_5_flag,
[elf,2,36,0], [--gdwarf-5], [$insn],,
- [AC_DEFINE(HAVE_AS_GDWARF_5_DEBUG_FLAG, 1,
-[Define if your assembler supports the --gdwarf-5 option.])])
+ [dwarf5_success=yes])
dwarf4_debug_info_size=0x46
dwarf4_high_pc_form=7
@@ -5364,7 +5364,7 @@ foo:
gcc_GAS_CHECK_FEATURE([assembly of compiler generated 32-bit .debug_line],
gcc_cv_as_debug_line_32_flag,
[elf,2,36,0], [], [$conftest_s],,
- [success=yes])
+ [dwarf4_success=yes])
else
gcc_GAS_CHECK_FEATURE([assembly of compiler generated 64-bit .debug_line],
gcc_cv_as_debug_line_64_flag,
@@ -5372,11 +5372,11 @@ foo:
[dwarf4_success=yes])
fi
if test $dwarf4_success = yes; then
+ dwarf4_success=no
gcc_GAS_CHECK_FEATURE([--gdwarf-4 not refusing compiler generated .debug_line],
gcc_cv_as_dwarf_4_debug_line_flag,
[elf,2,36,0], [--gdwarf-4], [$conftest_s],,
- [AC_DEFINE(HAVE_AS_WORKING_DWARF_4_FLAG, 1,
-[Define if your assembler supports --gdwarf-4 even with compiler generated .debug_line])])
+ [dwarf4_success=yes])
break
fi
dwarf4_debug_info_size=0x36
@@ -5385,6 +5385,66 @@ foo:
dwarf4_line_sz=5
done
+ conftest_s="\
+ .text
+ .globl foo
+ .type foo, %function
+foo:
+ $insn
+ .size foo, .-foo
+ .file 0 \"foo.c\"
+"
+ if test $dwarf5_success = yes; then
+ dwarf5_success=no
+ gcc_GAS_CHECK_FEATURE([working --gdwarf-5 option],
+ gcc_cv_as_working_gdwarf_5_flag,,
+ [--gdwarf-5],
+ [$conftest_s],
+ [changequote(,)dnl
+ if test x$gcc_cv_readelf != x \
+ && $gcc_cv_readelf -w conftest.o 2>&1 \
+ | grep conftest.s > /dev/null 2>&1; then
+ dwarf5_success=no
+ else
+ dwarf5_success=yes
+ fi
+ changequote([,])dnl])
+ if test $dwarf5_success = yes; then
+ AC_DEFINE(HAVE_AS_GDWARF_5_DEBUG_FLAG, 1,
+[Define if your assembler supports the --gdwarf-5 option.])
+ fi
+ fi
+
+ conftest_s="\
+ .text
+ .globl foo
+ .type foo, %function
+foo:
+ $insn
+ .size foo, .-foo
+ .file 1 \"foo.c\"
+"
+ if test $dwarf4_success = yes; then
+ dwarf4_success=no
+ gcc_GAS_CHECK_FEATURE([working --gdwarf-4 option],
+ gcc_cv_as_working_gdwarf_4_flag,,
+ [--gdwarf-4],
+ [$conftest_s],
+ [changequote(,)dnl
+ if test x$gcc_cv_readelf != x \
+ && $gcc_cv_readelf -w conftest.o 2>&1 \
+ | grep conftest.s > /dev/null 2>&1; then
+ dwarf4_success=no
+ else
+ dwarf4_success=yes
+ fi
+ changequote([,])dnl])
+ if test $dwarf4_success = yes; then
+ AC_DEFINE(HAVE_AS_WORKING_DWARF_4_FLAG, 1,
+[Define if your assembler supports --gdwarf-4 even with compiler generated .debug_line])
+ fi
+ fi
+
gcc_GAS_CHECK_FEATURE([--gstabs option],
gcc_cv_as_gstabs_flag,
[elf,2,11,0], [--gstabs], [$insn],,