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

ruby-changes:73524

From: Nobuyoshi <ko1@a...>
Date: Mon, 12 Sep 2022 19:53:27 +0900 (JST)
Subject: [ruby-changes:73524] ed029e9bd4 (master): Autoconf 2.70 or AC_PROG_CC_C99 for earlier is checking for C99

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

From ed029e9bd42d7749fe22007e33c0f61d1dd3d792 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 12 Sep 2022 19:53:10 +0900
Subject: Autoconf 2.70 or AC_PROG_CC_C99 for earlier is checking for C99

It is no longer necessary to add it to `CFLAGS`/`CPPFLAGS` later.

Furthermore, as `CPPFLAGS` is used also with C++ compiler, the option
particular to C such as `-std=gnu99` results in an error.
---
 configure.ac | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/configure.ac b/configure.ac
index e5454f117e..0389935389 100644
--- a/configure.ac
+++ b/configure.ac
@@ -849,33 +849,6 @@ AS_IF([test "$GCC" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L849
       # need lgamma_r()
     ])
 
-    # ANSI (no XCFLAGS because this is C only)
-    AS_CASE(["$target_os"],
-    [solaris*], [
-      # Because "-std=gnu99" affects existence of functions on Solaris,
-      # "-std=gnu99" will be appended to CPPFLAGS.
-	for ansi_options in -std=gnu99; do
-	    RUBY_TRY_CFLAGS(${ansi_options}, [
-		RUBY_APPEND_OPTIONS(CPPFLAGS, ${ansi_options})
-	    ], [ansi_options=])
-	    test "x${ansi_options}" = x || break
-	done
-    ],
-    [
-      # ANSI (no XCFLAGS because this is C only)
-      rb_tmp_std_check=`echo $CC $CFLAGS $optflags $warnflags $debugflags | fgrep std= | tr -d  '\015'`
-      AS_IF([test "x$rb_tmp_std_check" = "x"],
-      [
-	for ansi_options in -std=gnu99; do
-	    RUBY_TRY_CFLAGS(${ansi_options}, [
-		RUBY_APPEND_OPTIONS(warnflags, ${ansi_options})
-		RUBY_APPEND_OPTIONS(strict_warnflags, ${ansi_options})
-	    ], [ansi_options=])
-	    test "x${ansi_options}" = x || break
-	done
-      ])
-    ])
-
     # suppress annoying -Wstrict-overflow warnings
     RUBY_TRY_CFLAGS(-fno-strict-overflow, [RUBY_APPEND_OPTION(XCFLAGS, -fno-strict-overflow)])
 
-- 
cgit v1.2.1


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

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