From 3b5e8ee4f1ecc6d407f391695f65960bcbd63cff Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 13 Dec 2020 17:21:16 +0000 Subject: Darwin, configury : Allow for specification and detection of dsymutil. In order to enable DWARF versions > 2 we need a sufficiently modern version of dsymutil (in addition to the assembler / linker). This allows the user to configure a different path from the installed one. In addition, there are several sources of dsymutil so we differentiate these in order to be get accurate version information. Signed-off-by: Iain Sandoe gcc/ChangeLog: * configure.ac: Handle --with-dsymutil in the same way as we do for the assembler and linker. (DEFAULT_DSYMUTIL): New. Extract the type and version for the dsymutil configured or found by the default searches. * config.in: Regenerated. * configure: Regenerated. * collect2.c (do_dsymutil): Handle locating dsymutil in the same way as for the assembler and linker. * config/darwin.h (DSYMUTIL): Delete. * gcc.c: Report a configured dsymutil correctly. * exec-tool.in: Allow for dsymutil. ChangeLog: * Makefile.def: Add dsymutil defs. * Makefile.in: Regenerated. * Makefile.tpl: Add dsymutil to flags. * configure: Regenerated. * configure.ac: Add dsymutil to target and build recipes. --- gcc/gcc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index c8dbff6..36a88fc 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3062,6 +3062,11 @@ find_a_file (const struct path_prefix *pprefix, const char *name, int mode, return xstrdup (DEFAULT_LINKER); #endif +#ifdef DEFAULT_DSYMUTIL + if (! strcmp (name, "dsymutil") && access (DEFAULT_DSYMUTIL, mode) == 0) + return xstrdup (DEFAULT_DSYMUTIL); +#endif + /* Determine the filename to execute (special case for absolute paths). */ if (IS_ABSOLUTE_PATH (name)) -- cgit v1.1