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

Rather than filtering through the added flags like this, is it possible to 
figure out why macOS trips the C++11 heuristic and fix the problem there? 
Failing that, a temporary solution of setting the shell var ac_prog_cc_stdc to 
yes might help as a band aid solution, as autoconf does not perform the check 
if that is set to anything other than no. The reason for this is that the 
current approach will have autoconf printing conflicting information of 
"Checking for <Compiler> option to enable C++11 features... -std=gnu++11" even 
though the flag is not added to the compilation flags, which might be confusing 
to users. I also find that a cleaner solution as well

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17301#issuecomment-1883441395

Reply via email to