2008-04-17 Lubomir Kundrak <lkundrak@redhat.com>

* 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
This commit is contained in:
robertmh 2008-04-17 14:14:10 +00:00
parent bfb1f1a2bc
commit 1977517daf
6 changed files with 20 additions and 74 deletions

56
configure vendored
View file

@ -6686,60 +6686,6 @@ if test "x$target_m32" = x1; then
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
fi
{ echo "$as_me:$LINENO: checking whether the linker accepts \`--build-id=none'" >&5
echo $ECHO_N "checking whether the linker accepts \`--build-id=none'... $ECHO_C" >&6; }
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--build-id=none"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
build_id_flag=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
build_id_flag=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $build_id_flag" >&5
echo "${ECHO_T}$build_id_flag" >&6; }
LDFLAGS="$save_LDFLAGS"
if test "x$build_id_flag" = xyes; then
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
fi
#
# Compiler features.
#
@ -6820,7 +6766,7 @@ for link_addr in 2000 8000 7C00; do
echo "$as_me: error: ${CC-cc} cannot link at address $link_addr" >&2;}
{ (exit 1); exit 1; }; }
fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'
if { ac_try='${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?