diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-07-01 23:00:19 +0200 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2022-10-28 17:19:02 -0400 |
commit | 361d6454c034a920f2c96517c277990d390b9652 (patch) | |
tree | fdf2c6f6d595e23f9cfe9355c4afc08d134508bc /configure.ac | |
parent | 8c77e26ba8b360c851b2b9485bb4431aacc51ad1 (diff) | |
download | glibc-361d6454c034a920f2c96517c277990d390b9652.tar glibc-361d6454c034a920f2c96517c277990d390b9652.tar.gz glibc-361d6454c034a920f2c96517c277990d390b9652.tar.bz2 glibc-361d6454c034a920f2c96517c277990d390b9652.zip |
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 <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index eb5bc6a131..973fe59e81 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,7 @@ fi AC_SUBST(cross_compiling) AC_PROG_CPP AC_CHECK_TOOL(READELF, readelf, false) +AC_CHECK_TOOL(OBJDUMP, objdump, false) # We need the C++ compiler only for testing. AC_PROG_CXX |