Hello! [Sorry for not replying earlier. All messages from my gnu.org account were getting lost. Anyway, I'll need to retire that address due to massive spam.]
Here's an alternate patch for the issue that appeared on Fedora 8. The linker adds a "build ID" (.not.gnu.build-id) by default. That section makes objcopy create output files about 128M long when asked to use binary format. Needless to say, they are not suitable as grub images. Also, the build ID section breaks the test for objcopy in the configure script. This patch is less intrusive than the one I posted earlier, so I hope it will be accepted. 2007-10-29 Pavel Roskin <[EMAIL PROTECTED]> * configure.ac: Test if '--build-id=none' is supported by the linker. Add it to TARGET_LDFLAGS if possible. Build ID interferes with objcopy. * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when linking, so that build ID doesn't break the test. --- aclocal.m4 +++ aclocal.m4 @@ -57,7 +57,7 @@ fi grub_cv_prog_objcopy_absolute=yes for link_addr in 2000 8000 7C00; do - if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then : + if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} ${LDFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then : else AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr]) fi --- configure.ac +++ configure.ac @@ -229,6 +229,16 @@ TARGET_LDFLAGS="$TARGET_LDFLAGS -m32" fi +AC_MSG_CHECKING([whether 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. # -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel