darwin, configuration, check properly for dwarf2 debug line support
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 24 Dec 2018 08:43:20 +0000 (08:43 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Mon, 24 Dec 2018 08:43:20 +0000 (08:43 +0000)
This corrects a long-standing misconfiguration for Darwin.
The assembler supports the “.file” and “.loc” directives, but
the GCC configury was not detecting this because it was
using objdump, which does not exist on most Darwin installations.

We added support for “otool” to GCC and now we can use that to
make the check that’s done with objdump on ELF targets.

2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>

* configure.ac (dwarf2_debug_line): Check for the debug_line
section using otool when there’s no objdump available.
* configure: Regenerate.

From-SVN: r267393

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index 479083e64830493330dbe2700300bcf9fa32ced9..310bbec4f5b8ef087aaa73f3e14c402cceecbaac 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * configure.ac (dwarf2_debug_line): Check for the debug_line
+       section using otool when there’s no objdump available.
+       * configure: Regenerate.
+
 2018-12-24  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-utils.c (ipa_merge_profiles): Fix updating of fnsummary;
index efbf621d0123b4adffc8788b71cebdeac5e3c5ca..caebe4c0885277cb158334238f60fddb0bdc3f1e 100755 (executable)
    && $gcc_cv_objdump -h conftest.o 2> /dev/null \
       | grep debug_line > /dev/null 2>&1; then
      gcc_cv_as_dwarf2_debug_line=yes
+   elif test x$gcc_cv_otool != x \
+   && $gcc_cv_otool -l conftest.o 2> /dev/null \
+      | grep debug_line > /dev/null 2>&1; then
+     gcc_cv_as_dwarf2_debug_line=yes
    fi
     else
       echo "configure: failed program was" >&5
index 7fce52a319c71398dd356564b8997d98402e1240..a1012325898211eb30a8b5f0e04c08fabbdbfa1d 100644 (file)
@@ -4926,6 +4926,10 @@ if test x"$insn" != x; then
    && $gcc_cv_objdump -h conftest.o 2> /dev/null \
       | grep debug_line > /dev/null 2>&1; then
      gcc_cv_as_dwarf2_debug_line=yes
+   elif test x$gcc_cv_otool != x \
+   && $gcc_cv_otool -l conftest.o 2> /dev/null \
+      | grep debug_line > /dev/null 2>&1; then
+     gcc_cv_as_dwarf2_debug_line=yes
    fi])
 
 # The .debug_line file table must be in the exact order that