File build-id.diff of Package gcc43

Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c.orig	2009-11-20 13:50:10.000000000 +0100
+++ gcc/gcc.c	2009-11-20 13:50:34.000000000 +0100
@@ -1828,6 +1828,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;
 }
Index: gcc/config/elfos.h
===================================================================
--- gcc/config/elfos.h.orig	2008-02-19 10:55:58.000000000 +0100
+++ gcc/config/elfos.h	2009-11-20 13:50:34.000000000 +0100
@@ -513,3 +513,5 @@ along with GCC; see the file COPYING3.
 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
   default_elf_asm_output_external (FILE, DECL, NAME)
 #endif
+
+#define USE_BUILD_ID
openSUSE Build Service is sponsored by