From 66bfcba587df3184d3d32495e2ba70984b36e1b2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 16 Apr 2024 00:46:25 +0900 Subject: [PATCH] Not all `nm`s support the `--help` option --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 28d006e436..45d32d8760 100644 --- a/configure.ac +++ b/configure.ac @@ -277,7 +277,7 @@ AC_CHECK_TOOLS([STRIP], [gstrip strip], [:]) # nm errors with Rust's LLVM bitcode when Rust uses a newer LLVM version than nm. # In case we're working with llvm-nm, tell it to not worry about the bitcode. -AS_IF([${NM} --help | grep -q 'llvm-bc'], [NM="$NM --no-llvm-bc"]) +AS_IF([${NM} --help 2>&1 | grep -q 'llvm-bc'], [NM="$NM --no-llvm-bc"]) AS_IF([test ! $rb_test_CFLAGS], [AS_UNSET(CFLAGS)]); AS_UNSET(rb_test_CFLAGS) AS_IF([test ! $rb_test_CXXFLAGS], [AS_UNSET(CXXFLAGS)]); AS_UNSET(rb_save_CXXFLAGS)