* [PATCH, Darwin, config] Check for DWARF debug line support with otool.
@ 2018-12-23 12:12 Iain Sandoe
2018-12-23 16:25 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Iain Sandoe @ 2018-12-23 12:12 UTC (permalink / raw)
To: GCC Patches; +Cc: Mike Stump
Hi,
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.
OK for trunk?
Iain
gcc/
* configure.ac (dwarf2_debug_line): Check for the debug_line
section using otool when there’s no objdump available.
* configure: Regenerate.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 7fce52a319..a101232589 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -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
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH, Darwin, config] Check for DWARF debug line support with otool.
2018-12-23 12:12 [PATCH, Darwin, config] Check for DWARF debug line support with otool Iain Sandoe
@ 2018-12-23 16:25 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2018-12-23 16:25 UTC (permalink / raw)
To: Iain Sandoe, GCC Patches; +Cc: Mike Stump
On 12/23/18 4:53 AM, Iain Sandoe wrote:
> Hi,
>
> 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.
>
> OK for trunk?
> Iain
>
> gcc/
>
> * configure.ac (dwarf2_debug_line): Check for the debug_line
> section using otool when thereâs no objdump available.
> * configure: Regenerate.
OK
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-23 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-23 12:12 [PATCH, Darwin, config] Check for DWARF debug line support with otool Iain Sandoe
2018-12-23 16:25 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).