summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-22 11:58:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-23 19:02:36 +0900
commit1e2523fad7c03dc4f3b298d224548abd07374761 (patch)
tree931ba37a66200e0d053e5b524cf1b92f98fb0bcf
parenta22ed3e99dbb74003f20e175cd1956062e97f230 (diff)
downloadruby-1e2523fad7c03dc4f3b298d224548abd07374761.tar.gz
Silence dozens of useless warnings from `ranlib` on macOS [ci skip]
-rw-r--r--configure.ac6
-rw-r--r--template/Makefile.in2
-rwxr-xr-xtool/darwin-ar5
3 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a2a0c1e387..56c335a37a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -433,6 +433,12 @@ 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 72aba2d3e9..c4d05ef243 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -230,7 +230,7 @@ RMALL = @RMALL@
LN_S = @LN_S@
TOUCH = touch
NM = @NM@
-AR = @AR@
+AR = @X_WRAPPER_AR@
ARFLAGS = @ARFLAGS@$(empty)
RANLIB = @RANLIB@
AS = @AS@
diff --git a/tool/darwin-ar b/tool/darwin-ar
new file mode 100755
index 0000000000..08e4aadb96
--- /dev/null
+++ b/tool/darwin-ar
@@ -0,0 +1,5 @@
+#!/bin/bash
+exec 2> >(exec grep -v \
+ -e 'has no symbols$' \
+ >&2)
+exec "$@"