On Mon, 8 Jan 2024 10:16:21 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> It was observed, that autoconf 2.72 added on macOS x86_64 the flag > -std=gnu++11 by default to CXX in the configure process . > This is not really wanted so better remove / filter out any -std* flags added > by autoconf from CC/CXX . > > Seems we have something similar for some time for CFLAGS and CXXFLAGS ( see > TOOLCHAIN_POST_DETECTION in make/autoconf/toolchain.m4) that > dates back to JDK 9. > > See the discussion about this issue : > https://mail.openjdk.org/pipermail/build-dev/2024-January/042551.html make/autoconf/toolchain.m4 line 395: > 393: # filter out some unwanted additions autoconf may add to CXX; we saw > this on macOS with autoconf 2.72 > 394: UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 > -std=gnu++11) > 395: if test "x$cxx_filtered" != x; then Why this test? If CXX is empty, then xcc_filtered will be empty too, right? And if CXX is exactly `-std=c++11`, then this test will render cxx_filter empty too, which will not change CXX -- which I believe is not what you want? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17301#discussion_r1448696597