diff options
-rwxr-xr-x | gcc/configure | 6 | ||||
-rw-r--r-- | gcc/configure.ac | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/configure b/gcc/configure index 41641c6..9bb436c 100755 --- a/gcc/configure +++ b/gcc/configure @@ -29075,7 +29075,11 @@ fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then - gcc_cv_as_gdwarf_5_flag=yes + if test x$gcc_cv_readelf != x \ + && $gcc_cv_readelf -wi conftest.o 2>&1 \ + | grep DW_TAG_compile_unit > /dev/null 2>&1; then + gcc_cv_as_gdwarf_5_flag=yes; + fi else echo "configure: failed program was" >&5 cat conftest.s >&5 diff --git a/gcc/configure.ac b/gcc/configure.ac index ff4d3dc..caa6119 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5416,8 +5416,12 @@ if test x"$insn" != x; then 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, + [elf,2,36,0], [--gdwarf-5], [$insn], + [if test x$gcc_cv_readelf != x \ + && $gcc_cv_readelf -wi conftest.o 2>&1 \ + | grep DW_TAG_compile_unit > /dev/null 2>&1; then + gcc_cv_as_gdwarf_5_flag=yes; + fi],[AC_DEFINE(HAVE_AS_GDWARF_5_DEBUG_FLAG, 1, [Define if your assembler supports the --gdwarf-5 option.])]) dwarf4_debug_info_size=0x46 |