use TARGET_LDFLAGS in grub_PROG_OBJCOPY_ABSOLUTE

That's what Makefile will use and it is required if unusual flags
must be passed to linker (e.g. to build ppc32 code on ppc64le with clang).
This commit is contained in:
Andrei Borzenkov 2015-07-05 08:21:38 +03:00
parent 7a210304eb
commit 0d7c7f751d

View file

@ -93,7 +93,7 @@ else
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 0x2000 0x8000 0x7C00; do
if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$link_addr conftest.o -o conftest.exec]); then :
if AC_TRY_COMMAND([${CC-cc} ${TARGET_CFLAGS} ${TARGET_LDFLAGS} -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},$link_addr conftest.o -o conftest.exec]); then :
else
AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
fi