-
Enhancement
-
Resolution: Unresolved
-
P5
-
9
Our current handling of CFLAGS additions in the configure script is not so god. We want to force people to use --with-extra-cflags, so we ignore the value of CFLAGS at a late stage in the script. On the other hand, we want to be able to add some extra flags in the configure script, so we "approve" these by also adding them to ADDED_CFLAGS.
But we don't do that everywhere, and those changes get lost and/or cause warnings. Overall, this is a mess. I believe that several configure options do not really work, but we have not tested it for a long time.
A better solution is needed.
I recommend that we stay clear of touching CFLAGS at all. Instead, let's use a COMMON_CFLAGS, and add stuff to it if we need to set anything special. Let --with-extra-cflags end up there, too. Then, in the end let JDK_FLAGS etc be based on COMMON_CFLAGS.
Note, however, that the "real" CFLAGS must be changed sometimes in some ways for the autoconf build-in test compiler features macros to work properly.
But we don't do that everywhere, and those changes get lost and/or cause warnings. Overall, this is a mess. I believe that several configure options do not really work, but we have not tested it for a long time.
A better solution is needed.
I recommend that we stay clear of touching CFLAGS at all. Instead, let's use a COMMON_CFLAGS, and add stuff to it if we need to set anything special. Let --with-extra-cflags end up there, too. Then, in the end let JDK_FLAGS etc be based on COMMON_CFLAGS.
Note, however, that the "real" CFLAGS must be changed sometimes in some ways for the autoconf build-in test compiler features macros to work properly.
- relates to
-
JDK-8211088 GCC 6.3.0 build fails with --with-extra-cflags=-Wno-int-conversion
-
- Closed
-