>So autoconf forcibly selects a -std= option, possibly overriding either an >explicit option or the compiler's default. Who thought that was a good idea? >There are even comments from the time that question that "feature". > >It looks like there is code to attempt to deal with that sort of thing in our >build system. See TOOLCHAIN_POST_DETECTION in make/autoconf/toolchain.m4. That >dates back to JDK 9. However, that only deals with CFLAGS and CXXFLAGS. The >AC_PROG_CC/CXX feature affects the CC/CXX variables. Bleh!
Hi Kim, it is not a nice thing; probably the CXX could be overwritten when settings the CXX env variable before running configure ? >But I wonder why our explicit -std=gnu++98 (or whatever we were using) doesn't >override that. In the command lines are you seeing > > "g++ ... -std=gnu++11 ... -std=c++14" It is Openjdk11 ; I only see the -std=gnu++11 in the Hotspot compilation units. Only the harfbuzz files have the -std=gnu++11 ... -std=c++11 so there it is overwritten , but looks like it compiles without issues with those settings in Hotspot (as long as PCH is disabled) . >I have no idea why disabling PCH might change things in this area. Good question, seems there is something 'special' with PCH . Best regards, Matthias