RFR: 8352284: EXTRA_CFLAGS incorrectly applied to BUILD_LIBJVM src/hotspot C++ source files [v2]
Patrick Zhang
qpzhang at openjdk.org
Tue Mar 25 01:57:13 UTC 2025
On Mon, 24 Mar 2025 17:06:11 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
>> Patrick Zhang has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Fixed a typo
>>
>> Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
>> - Added comments to describe why EXTRA_CFLAGS is excluded from JVM_CFLAGS
>>
>> Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
>> - Revert the changes of adding new params to SetupNativeCompilation
>>
>> Signed-off-by: Patrick Zhang <patrick at os.amperecomputing.com>
>
> make/common/native/Flags.gmk line 125:
>
>> 123: endif
>> 124: ifeq ($(STATIC_LIBS), true)
>> 125: $1_EXTRA_CXXFLAGS += -DSTATIC_BUILD=1
>
> This seems unrelated to the fix?
> 3. Fixed `STATIC_LIB_CFLAGS` in `Flags.gmk` to `-DSTATIC_BUILD=1`, which was missed by [cbab40bc](https://github.com/openjdk/jdk/commit/cbab40bce45a2f58906be49c841178fa1dfd457e#diff-ab3ce05e795360030f19402fd0c2fad1dc1f7c5e7acc993cc4a2096cf31ccf40R114-R121) for the refactor of building static libs.
As described in the No.3 bullet of this PR. It showed up when I tested the EXTRA_CXXFLAGS passed from outside of `SetupNativeCompilation`. It is a simple and tiny fix which may not require a separate PR I think.
FYI, the failures on linux-x64-static and linux-x64-static-libs tests, captured by OpenJDK GHA Sanity Checks: https://github.com/cnqpzhang/jdk/actions/runs/13943096440.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24115#discussion_r2011164138
More information about the build-dev
mailing list