summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-31 19:42:01 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-31 19:42:01 +0900
commitbe81495c16a62979f78a91fe8ed34dbdc82e37db (patch)
tree432892dc1e425149573fb66c220c9dd23289fbc3
parent337189598af28297402b57df5ed1104ed336c15c (diff)
downloadruby-be81495c16a62979f78a91fe8ed34dbdc82e37db.tar.gz
Silence dozens of useless warnings from `nm` on macOS
-rw-r--r--configure.ac6
-rw-r--r--template/Makefile.in2
-rwxr-xr-xtool/darwin-ar2
-rw-r--r--yjit/yjit.mk2
4 files changed, 3 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index ec8a6f4c09..7db2ab5257 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,12 +433,6 @@ AS_CASE(["$build_os"],
])
rm -fr conftest*
])
-AS_CASE(["$build_os"],
- [darwin*], [
- AC_SUBST(X_WRAPPER_AR, "`cd -P "${tooldir}" && pwd`/darwin-ar $AR")
- ], [
- AC_SUBST(X_WRAPPER_AR, "$AR")
- ])
AS_CASE(["$target_os"],
[wasi*], [
# Clang linker automatically uses wasm-opt with -O if it found.
diff --git a/template/Makefile.in b/template/Makefile.in
index bae3980440..94f41181d5 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -231,7 +231,7 @@ RMALL = @RMALL@
LN_S = @LN_S@
TOUCH = touch
NM = @NM@
-AR = @X_WRAPPER_AR@
+AR = @AR@
ARFLAGS = @ARFLAGS@$(empty)
RANLIB = @RANLIB@
AS = @AS@
diff --git a/tool/darwin-ar b/tool/darwin-ar
index 08e4aadb96..6f2a6ca2ad 100755
--- a/tool/darwin-ar
+++ b/tool/darwin-ar
@@ -1,5 +1,5 @@
#!/bin/bash
exec 2> >(exec grep -v \
- -e 'has no symbols$' \
+ -e ' no symbols$' \
>&2)
exec "$@"
diff --git a/yjit/yjit.mk b/yjit/yjit.mk
index 6cd12c4bf3..17e6479195 100644
--- a/yjit/yjit.mk
+++ b/yjit/yjit.mk
@@ -65,7 +65,7 @@ endif
# we rely.
ifneq ($(findstring darwin,$(target_os)),)
$(YJIT_LIB_SYMBOLS): $(YJIT_LIBS)
- $(Q) $(NM) --no-llvm-bc --defined-only --extern-only $(YJIT_LIBS) | \
+ $(Q) $(tooldir)/darwin-ar $(NM) --no-llvm-bc --defined-only --extern-only $(YJIT_LIBS) | \
sed -n -e 's/.* //' -e '/^$(SYMBOL_PREFIX)rb_/p' \
-e '/^$(SYMBOL_PREFIX)rust_eh_personality/p' \
> $@