Ada, Darwin : Use DSYMUTIL_FOR_TARGET in libgnat/gnarl builds.

Message ID 20211113144412.37252-1-iain@sandoe.co.uk
State New
Headers
Series Ada, Darwin : Use DSYMUTIL_FOR_TARGET in libgnat/gnarl builds. |

Commit Message

Iain Sandoe Nov. 13, 2021, 2:44 p.m. UTC
  Most of the time we get away with using the dsymutil that is
installed with the latest Xcode, however for some cross-compilation
cases that does not work.

We now have the ability to specify the correct dsymutil to use for
the toolchain (--with-dsymutil=) and we should use that specified
tool for debug link.  Fixes cross-compilers from x86-64 to powerpc.

Tested on x86_64, i686 and with a cross from x86_64 -> powerpc, and
with a bootstrap on x86_64-linux.

OK for master?
thanks
Iain

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ada/ChangeLog:

	* gcc-interface/Makefile.in: Use DSYMUTIL_FOR_TARGET in
	libgnat/libgnarl recipies.
---
 gcc/ada/gcc-interface/Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Arnaud Charlet Nov. 14, 2021, 10:43 a.m. UTC | #1
> Most of the time we get away with using the dsymutil that is
> installed with the latest Xcode, however for some cross-compilation
> cases that does not work.
> 
> We now have the ability to specify the correct dsymutil to use for
> the toolchain (--with-dsymutil=) and we should use that specified
> tool for debug link.  Fixes cross-compilers from x86-64 to powerpc.
> 
> Tested on x86_64, i686 and with a cross from x86_64 -> powerpc, and
> with a bootstrap on x86_64-linux.
> 
> OK for master?

OK, thanks!
  

Patch

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 9df88097226..53d0739470a 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -800,8 +800,8 @@  gnatlib-shared-darwin:
 		libgnat$(soext)
 	cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
 		libgnarl$(soext)
-	cd $(RTSDIR); dsymutil libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
-	cd $(RTSDIR); dsymutil libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
+	cd $(RTSDIR); $(DSYMUTIL_FOR_TARGET) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
+	cd $(RTSDIR); $(DSYMUTIL_FOR_TARGET) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext)
 
 gnatlib-shared:
 	$(MAKE) $(FLAGS_TO_PASS) \