OpenJDK11 build on macOS with autoconf 2.72 / -std=gnu++11 option

Kim Barrett kim.barrett at oracle.com
Tue Jan 2 21:34:45 UTC 2024


> On Jan 2, 2024, at 4:19 AM, Baesken, Matthias <matthias.baesken at sap.com> wrote:
> 
> Hi , was anyone seen the following issue ?
>  After an update from  autoconf   2.71 to  2.72   on macOS  (x86_6$9  ,   the C++ flag detection changed in an unexpected way .    It is an OpenJDK11 build .
>  Previously  with  (autoconf 2.71)   we had  :
>  checking for  /jenkins/workspace/devkit-xcode-13.1/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ option to enable C++11 features... none needed
>  now   (2.72)
>  checking for  /jenkins/workspace/devkit-xcode-13.1/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ option to enable C++11 features... -std=gnu++11
>   the new option  -std=gnu++11  leads to  :
>   error: C++11 was disabled in PCH file but is currently enabled
>  Should we simply disable PCH ?
> Or is there a good and reliable way to get rid of the unwanted option ?
>   Thanks, Matthias

JDK-8151841 and JDK-8156980 (both from JDK 9) changed the build system to
explicitly use "-std=gnu++98". It remained that way until JDK 16, when it was
changed to "-std=c++14". So why is "-std=gnu++11" being used at all?

Perhaps this is a clang vs gcc thing in the build system?  With "-std=gnu++98"
only being applied for gcc, not for clang?

BTW, I have no reason to expect "-std=gnu++11" to work with JDK 11. There were
a number of changes needed to go from C++98 to C++14, and I don't know if all
of them were done for JDK 11.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20240102/67e33f0c/signature.asc>


More information about the build-dev mailing list