From 361d6454c034a920f2c96517c277990d390b9652 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 1 Jul 2021 23:00:19 +0200 Subject: Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling. Commit 87d583c6e8cd0e49f64da76636ebeec033298b4d replaces the sed script with an "objdump -f" invocation to determine the 'OUTPUT_FORMAT' bit of the libc.so linker script. However, when cross-compiling, for example from x86_64-linux-gnu to aarch64-linux-gnu, "objdump -f" would report the wrong format ("elf64-little"). Conversely, "aarch64-linux-gnu-objdump -f" reports "elf64-littleaarch64" as expected. This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than '$CC -print-prog-name=objdump' to determine the value of the OBJDUMP variable. That way, OBJDUMP is set to TRIPLET-objdump when cross-compiling for TRIPLET. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- aclocal.m4 | 2 -- 1 file changed, 2 deletions(-) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 3b4df4a371..531b11cb69 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -122,8 +122,6 @@ AS=`$CC -print-prog-name=as` LD=`$CC -print-prog-name=$LDNAME` AR=`$CC -print-prog-name=ar` AC_SUBST(AR) -OBJDUMP=`$CC -print-prog-name=objdump` -AC_SUBST(OBJDUMP) OBJCOPY=`$CC -print-prog-name=objcopy` AC_SUBST(OBJCOPY) GPROF=`$CC -print-prog-name=gprof` -- cgit 1.4.1