-
Bug
-
Resolution: Unresolved
-
P4
-
25
This is a bit of a mess. First, in JDK-8345683, STATIC_LIBS_CFLAGS was removed. In Flags.gmk we instead did:
$1_EXTRA_CFLAGS += -DSTATIC_BUILD=1
This worked just fine. Then came alongJDK-8353272, which claimed we missed making the corresponding change for $1_EXTRA_CXXFLAGS, so we did, and assigned -DSTATIC_BUILD=1 to $1_EXTRA_CXXFLAGS as well.
The problem was that the old code did not in fact assign STATIC_LIBS_CFLAGS, but STATIC_LIB_CFLAGS. (Note the missing plural S), which was empty, so $1_EXTRA_CXXFLAGS never got any value beforeJDK-8353272, but after that "fix" it did.
This in turned caused problems further down the line.JDK-8353449 backed out JDK-8353272. This bug has a clear discussion about the problem, but in short two native libraries failed to build. Here are some excerpts from that bug:
"It looks like for libjpackageapplauncher, this change caused CXXFLAGS to get a value, so CFLAGS are no longer copied to CXXFLAGS. This in combination of warning flags not being set correctly as they are set as CFLAGS argument as -W-no-format-nonliteral instead of set as DISABLED_WARNINGS"
"The windows failure seems to be similar in nature. We only specify `-EHsc` for CFLAGS_windows, so it seems to be getting lost. However, I'm reluctant to make this kind of fix quickly. It's highly likely that we are losing more CFLAGS this way that aren't breaking the build directly, but will result in a different build. This will need careful analysis."
The purpose of this bug is to try to get to the bottom of this mess. This means:
1) Sort out how we do the CFLAGS/CXXFLAGS "copying/aliasing". This has bitten us before, so we should really find a more robust solution.
2) Actually, finally, get rid of the incorrect STATIC_LIB_CFLAGS.
$1_EXTRA_CFLAGS += -DSTATIC_BUILD=1
This worked just fine. Then came along
The problem was that the old code did not in fact assign STATIC_LIBS_CFLAGS, but STATIC_LIB_CFLAGS. (Note the missing plural S), which was empty, so $1_EXTRA_CXXFLAGS never got any value before
This in turned caused problems further down the line.
"It looks like for libjpackageapplauncher, this change caused CXXFLAGS to get a value, so CFLAGS are no longer copied to CXXFLAGS. This in combination of warning flags not being set correctly as they are set as CFLAGS argument as -W-no-format-nonliteral instead of set as DISABLED_WARNINGS"
"The windows failure seems to be similar in nature. We only specify `-EHsc` for CFLAGS_windows, so it seems to be getting lost. However, I'm reluctant to make this kind of fix quickly. It's highly likely that we are losing more CFLAGS this way that aren't breaking the build directly, but will result in a different build. This will need careful analysis."
The purpose of this bug is to try to get to the bottom of this mess. This means:
1) Sort out how we do the CFLAGS/CXXFLAGS "copying/aliasing". This has bitten us before, so we should really find a more robust solution.
2) Actually, finally, get rid of the incorrect STATIC_LIB_CFLAGS.
- relates to
-
JDK-8353449 [BACKOUT] One instance of STATIC_LIB_CFLAGS was missed in JDK-8345683
-
- Resolved
-
-
JDK-8353458 Don't pass -Wno-format-nonliteral to CFLAGS
-
- Resolved
-
-
JDK-8345683 Remove special flags for files compiled for static libraries
-
- Resolved
-
-
JDK-8353272 One instance of STATIC_LIB_CFLAGS was missed in JDK-8345683
-
- Closed
-
-
JDK-8333089 Use CFAMILYFLAGS instead of duplicating CFLAGS and CXXFLAGS
-
- Open
-
-
JDK-8001877 build-infra: Our handling of CFLAGS in configure is broken
-
- Open
-
(1 relates to)