Patchwork [committed/vms] : do not use vms-dwarf2.o for gnu-ld

login
register
mail settings
Submitter Tristan Gingold
Date April 20, 2011, 2:32 p.m.
Message ID <FCD5B1A3-1114-427D-A839-8B3719AF7A3F@adacore.com>
Download mbox | patch
Permalink /patch/92216/
State New
Headers show

Comments

Tristan Gingold - April 20, 2011, 2:32 p.m.
Hi,

when gnu-ld is used, we do not need the extra vms-dwarf2.o file - which is needed only for the native vms linker.

Committed on trunk.

Tristan.

2011-04-20  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/vms.h (LINK_SPEC): Do not use vms-dwarf2.o for gnu-ld.

Patch

===================================================================
--- config/alpha/vms.h	(revision 172769)
+++ config/alpha/vms.h	(working copy)
@@ -329,11 +329,16 @@ 
     }                                               \
 } while (0)
 
+#undef LINK_SPEC
+#if HAVE_GNU_LD
+/* GNU-ld built-in linker script already handles the dwarf2 debug sections.  */
+#define LINK_SPEC "%{shared} %{v}"
+#else
 /* Link with vms-dwarf2.o if -g (except -g0). This causes the
    VMS link to pull all the dwarf2 debug sections together.  */
-#undef LINK_SPEC
 #define LINK_SPEC "%{g:-g vms-dwarf2.o%s} %{g0} %{g1:-g1 vms-dwarf2.o%s} \
 %{g2:-g2 vms-dwarf2.o%s} %{g3:-g3 vms-dwarf2.o%s} %{shared} %{v} %{map}"
+#endif
 
 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC \