This will make Fedora packagers have good sleep. I think we discussed this already on the list. Rationale behind disabling build-ids completely was that it caused images to grow a lot. Correct solution is to disable it from images only and let it exists in elf files for debugging purposes.
2008-04-15 Lubomir Kundrak <[EMAIL PROTECTED]> * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text section into account, newer toolchains generate unique build ids * configure.ac: remove the test for --build-id=none acceptance, we want build ids to bre preserved * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id far from other sections don't cause the raw binary images grow size -- Lubomir Kundrak (Red Hat Security Response Team)
diff -urp grub-1.96.orig/aclocal.m4 grub-1.96/aclocal.m4 --- grub-1.96.orig/aclocal.m4 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/aclocal.m4 2008-04-15 00:15:04.000000000 +0200 @@ -61,7 +61,7 @@ for link_addr in 2000 8000 7C00; do else AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) fi - if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then : + if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then : else AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files]) fi diff -urp grub-1.96.orig/configure.ac grub-1.96/configure.ac --- grub-1.96.orig/configure.ac 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/configure.ac 2008-04-15 00:33:20.000000000 +0200 @@ -237,16 +237,6 @@ if test "x$target_m32" = x1; then TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" fi -AC_MSG_CHECKING([whether the linker accepts `--build-id=none']) -save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS -Wl,--build-id=none" -AC_TRY_LINK(, , build_id_flag=yes, build_id_flag=no) -AC_MSG_RESULT([$build_id_flag]) -LDFLAGS="$save_LDFLAGS" -if test "x$build_id_flag" = xyes; then - TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none" -fi - # # Compiler features. # diff -urp grub-1.96.orig/genmk.rb grub-1.96/genmk.rb --- grub-1.96.orig/genmk.rb 2008-04-15 00:32:05.000000000 +0200 +++ grub-1.96/genmk.rb 2008-04-15 00:15:04.000000000 +0200 @@ -57,7 +57,7 @@ class Image MOSTLYCLEANFILES += #{deps_str} [EMAIL PROTECTED]: #{exe} - $(OBJCOPY) -O binary -R .note -R .comment $< $@ + $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@ #{exe}: #{objs_str} $(TARGET_CC) -o $@ $^ $(TARGET_LDFLAGS) $(#{prefix}_LDFLAGS)
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel