File build-id.diff of Package libffi46
Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c.orig 2010-07-01 16:26:27.000000000 +0200
+++ gcc/gcc.c 2010-07-01 16:26:43.000000000 +0200
@@ -1893,6 +1893,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 2010-07-01 15:54:07.000000000 +0200
+++ gcc/config/elfos.h 2010-07-01 16:26:43.000000000 +0200
@@ -533,3 +533,5 @@ see the files COPYING3 and COPYING.RUNTI
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
default_elf_asm_output_external (FILE, DECL, NAME)
#endif
+
+#define USE_BUILD_ID