jdk8 extra c/cxx - flags settings

Baesken, Matthias matthias.baesken at sap.com
Fri Nov 22 12:55:15 UTC 2013


I had the need for setting additional C/C++ compilation flags in my OpenJDK8 build.
It seems they are used for most jdk C/C++ compilation, but at least the generators from 

jdk/makefiles/gensrc/GensrcMisc.gmk

seem to be an exception.

Example :

configure --with-extra-cflags=-DTESTMYEXTRAFLAGC --with-extra-cxxflags=-DTESTMYEXTRAFLAGCXX

does not lead to the expected flags in the build for  genSocketOptionRegistry.c  :

...
/usr/local/bin/gcc  -DTHIS_FILE='"genSocketOptionRegistry.c"' -c -MMD -MF /mydir/open_jdk/jdk8/linuxx86_64_opt/jdk/gensrc/genSocketOptionRegistry/genSocketOptionRegistry.d 
-o /mydir/open_jdk/jdk8/linuxx86_64_opt/jdk/gensrc/genSocketOptionRegistry/genSocketOptionRegistry.o /mydir/open_jdk/jdk8/openjdk8/jdk/src/share/native/sun/nio/ch/genSocketOptionRegistry.c
...

(while the flags show up for "normal" C/C++ files .)

Is there another option (available  /   planned?) to configure the extra C/C++ compile flags for this special case ?


Thanks, 
       Matthias



More information about the build-dev mailing list