[前][次][番号順一覧][スレッド一覧]

ruby-changes:62683

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Sat, 22 Aug 2020 09:49:22 +0900 (JST)
Subject: [ruby-changes:62683] d916a4c897 (master): configure.ac: more checks on STRIP

https://git.ruby-lang.org/ruby.git/commit/?id=d916a4c897

From d916a4c89741dc6a5266291275be4b497f6a9929 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Sat, 22 Aug 2020 08:50:44 +0900
Subject: configure.ac: more checks on STRIP

STRIP now depends on compilers, not on OS.  Previous check against
$target_os does no longer work.

diff --git a/configure.ac b/configure.ac
index ee4b214..5f16c12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3087,14 +3087,21 @@ AC_SUBST(DLEXT) https://github.com/ruby/ruby/blob/trunk/configure.ac#L3087
 AS_IF([test "$with_dln_a_out" = yes], [
   STRIP=true
 ], [
-  AC_CHECK_TOOL(STRIP, strip, :)dnl
+    AC_MSG_CHECKING([for $STRIP flags])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM], [AS_IF(
+        ["${STRIP}" -A -n conftest$ac_exeext 2>/dev/null], [
+            AC_MSG_RESULT([-A -n])
+            STRIP="${STRIP} -A -n"
+        ],
+        ["${STRIP}" -S -x conftest$ac_exeext 2>/dev/null], [
+            AC_MSG_RESULT([-S -x])
+            STRIP="${STRIP} -S -x"
+        ], [
+            AC_MSG_RESULT([none needed])
+        ])
+    ])
 ])
 
-AS_CASE(["$target_os"],
-  [linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu], [
-	STRIP="$STRIP -S -x"],
-  [darwin*], [
-	STRIP="$STRIP -A -n"])
 
 AC_ARG_WITH(ext,
             AC_HELP_STRING([--with-ext=EXTS],
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]