* configure.ac: Test if '--build-id=none' is supported by the

linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
objcopy to generate incorrect binary files (binutils
2.17.50.0.18-1 as shipped by Fedora 8).
* aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
linking, so that build ID doesn't break the test.
This commit is contained in:
proski 2007-11-25 02:01:30 +00:00
parent f7f9d35210
commit 6af9db01bc
4 changed files with 75 additions and 2 deletions

View file

@ -229,6 +229,16 @@ 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.
#