File build-id.diff of Package gcc43
Index: gcc/config/linux.h
===================================================================
--- gcc/config/linux.h (revision 140203)
+++ gcc/config/linux.h (working copy)
@@ -130,3 +130,5 @@ along with GCC; see the file COPYING3.
#define TARGET_HAS_SINCOS (OPTION_GLIBC)
#define TARGET_POSIX_IO
+
+#define USE_BUILD_ID
Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c (revision 140203)
+++ gcc/gcc.c (working copy)
@@ -1826,6 +1826,15 @@ init_spec (void)
obstack_grow0 (&obstack, link_spec, strlen (link_spec));
link_spec = XOBFINISH (&obstack, const char *);
#endif
+#ifdef USE_BUILD_ID
+ /* Prepend "--build-id" to whatever link_spec we had before. */
+ {
+ static const char tf[] = "%{!r:--build-id} ";
+ obstack_grow (&obstack, tf, sizeof(tf) - 1);
+ obstack_grow0 (&obstack, link_spec, strlen (link_spec));
+ link_spec = XOBFINISH (&obstack, const char *);
+ }
+#endif
specs = sl;
}