Btw. I found this rather recent discussion about reverting the forcing of setting -std=gnu++11 in autoconf :
https://mail.gnu.org/archive/html/bug-autoconf/2023-12/msg00073.html https://savannah.gnu.org/support/?110879 revert forcing/setting -std=gnu++11 by default (introduced in Autoconf 2.70) but the issue mentions 2.70, we only saw this with 2.72 . Best regards, Matthias -----Original Message----- From: Baesken, Matthias Sent: Wednesday, 3 January 2024 08:48 To: 'Kim Barrett' <kim.barr...@oracle.com> Cc: build-dev@openjdk.org; Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>; Langer, Christoph <christoph.lan...@sap.com>; Erik Joelsson <erik.joels...@oracle.com> Subject: RE: OpenJDK11 build on macOS with autoconf 2.72 / -std=gnu++11 option >Perhaps this is a clang vs gcc thing in the build system? With "-std=gnu++98" >only being applied for gcc, not for clang? Hi Kim, I saw this only with xcode/clang (after the update to autoconf 2.72) . >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. After disabling PCH, the openjdk11 build works (I did not expect it, but build + tests look good). Best regards, Matthias -----Original Message----- From: Kim Barrett <kim.barr...@oracle.com> Sent: Tuesday, 2 January 2024 22:35 To: Baesken, Matthias <matthias.baes...@sap.com> Cc: build-dev@openjdk.org; Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>; Langer, Christoph <christoph.lan...@sap.com>; Erik Joelsson <erik.joels...@oracle.com> Subject: Re: OpenJDK11 build on macOS with autoconf 2.72 / -std=gnu++11 option * PGP Signed by an unknown key > On Jan 2, 2024, at 4:19 AM, Baesken, Matthias <matthias.baes...@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. * Unknown Key * 0x19B3C410