RFR: 8087156: SetupNativeCompilation ignores CFLAGS_release for cpp files
Erik Joelsson
erik.joelsson at oracle.com
Thu Jun 11 06:51:00 UTC 2015
Hello Omair,
This looks good to me, thanks for catching it!
/Erik
On 2015-06-11 00:36, Omair Majid wrote:
> Hi,
>
> I discovered a bug in SetupNativeCompilation that results in some C++
> code being built with wrong CXXFLAGS.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8087156
> Webrev: http://cr.openjdk.java.net/~omajid/webrevs/8087156-setupnativecompilation/00/
>
> It turns out that debugging flags are automatically added to the
> CXXFLAGS which makes the code that copies over CFLAGS to CXXFLAGS if
> CXXFLAGS is empty fail. This causes the desired CXXFLAGS to not be set
> at all.
>
> Depending on the code, these CXXFLAGS can include -DPRODUCT. In other
> words, some JDK code is currently being built as if in non-product mode.
> An example of this is libunpack:
>
> jdk/make/lib/Lib-jdk.pack200.gmk:
>
> $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
> ... snip ...
> CFLAGS_release := -DPRODUCT, \
> ... snip ...
>
> The same issue exists in OpenJDK 8.
>
> Thanks,
> Omair
>
More information about the build-dev
mailing list