* configure.ac: Test if '--build-id=none' is supported by the
linker and add it to LDFLAGS if possible. Build ID causes objcopy to generate huge binary files. * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when linking, so that build ID doesn't break the test. * stage1/Makefile.am: Preserve LDFLAGS, use stage1_exec_LDFLAGS.
This commit is contained in:
parent
22cd659922
commit
bce46bf7f1
6 changed files with 83 additions and 4 deletions
11
configure.ac
11
configure.ac
|
@ -150,6 +150,17 @@ if test "x$undef_flag" = xyes; then
|
|||
CPPFLAGS="$CPPFLAGS -Wundef"
|
||||
fi
|
||||
|
||||
# Check if build ID can be disabled in the linker
|
||||
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
|
||||
LDFLAGS="$LDFLAGS -Wl,--build-id=none"
|
||||
fi
|
||||
|
||||
if test "x$with_binutils" != x; then
|
||||
dnl AC_PATH_TOOL(OBJCOPY, objcopy, , "$with_binutils:$PATH")
|
||||
AC_PATH_PROG(OBJCOPY, objcopy, , "$with_binutils:$PATH")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue