From 0d7c7f751dc5a8338497bef8b38f78153c4f0464 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sun, 5 Jul 2015 08:21:38 +0300 Subject: [PATCH] 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). --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 609c4f2f6..526f97a3a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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