From b88bdf1ebba52a447a39c1fee815dd55bd48ff9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Fri, 25 Aug 2023 12:19:13 +0900 Subject: [PATCH] direct use of CFLAGS Autoconf 2.71's `AC_PROG_CC` nukes `CC` variable, which we don't want. For instance a user could specify `--with-gcc="gcc -std=c99"` to _force_ C99 mode; but `AC_PROG_CC` just nulifies that `-std=c99` part. `AC_PROG_CC` is called everywhere from inside of autoconf itself via `AC_REQUIRE([AC_PROG_CC])`. It is not a wise idea to try avoiding this macro at all. We need to reroute `-std=` flags to somewhere else. --- .github/workflows/compilers.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 5d03526922..ef36462de9 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -124,10 +124,10 @@ jobs: # warning generates a lot of noise from use of ANYARGS in # rb_define_method() and friends. # See: https://github.com/llvm/llvm-project/commit/11da1b53d8cd3507959022cd790d5a7ad4573d94 - - { name: c99, env: { append_cc: '-std=c99 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } -# - { name: c11, env: { append_cc: '-std=c11 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } -# - { name: c17, env: { append_cc: '-std=c17 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } - - { name: c2x, env: { append_cc: '-std=c2x -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } + - { name: c99, env: { CFLAGS: '-std=c99 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } +# - { name: c11, env: { CFLAGS: '-std=c11 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } +# - { name: c17, env: { CFLAGS: '-std=c17 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } + - { name: c2x, env: { CFLAGS: '-std=c2x -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } } - { name: c++98, env: { CXXFLAGS: '-std=c++98 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } } # - { name: c++11, env: { CXXFLAGS: '-std=c++11 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } } # - { name: c++14, env: { CXXFLAGS: '-std=c++14 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }