RFR: 8329086: Clean up java.desktop native compilation
Magnus Ihse Bursie
ihse at openjdk.org
Tue Mar 26 23:36:23 UTC 2024
On Tue, 26 Mar 2024 22:01:33 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> This is a follow-up on [JDK-8328680](https://bugs.openjdk.org/browse/JDK-8328680), making the same kind of cleanup to java.desktop. Some code needed more special treatment here, so there is some additional effects outside of the modules/java.desktop directory. The code was also in worse shape than other modules, so some additional changes to the build logic where needed.
>
> make/autoconf/lib-bundled.m4 line 107:
>
>> 105:
>> 106: USE_EXTERNAL_LIBGIF=true
>> 107: GIFLIB_LIBS=-lgif
>
> GIFLIB vs LIBGIF? Just above we have LIBJPEG. Should we stick to one naming convention, or did you want to avoid changing any variable names?
I don't want to change any names right now, but even if I wanted to, I think the name is correct. We have used the traditional name of the project. In this case it's definitely "The GIFLIB project" (see https://giflib.sourceforge.net/). This is also the name that pkg-config uses.
Many libraries use the "lib + name" convention on unix, but not all. FreeType is just called "freetype", not "libfreetype", while FFI is "libffi". It's not really consistent, but I think we do best in aligning with the traditional name used by the project (which also is what pkg-config uses).
> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 127:
>
>> 125: CFLAGS := $(X_CFLAGS) $(LIBAWT_CFLAGS), \
>> 126: CFLAGS_gcc := -fgcse-after-reload, \
>> 127: CXXFLAGS := $(LIBAWT_CFLAGS) $(X_CFLAGS), \
>
> Is the reverse ordering of flags for CXXFLAGS an accident?
Yep, will fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18486#discussion_r1540234519
PR Review Comment: https://git.openjdk.org/jdk/pull/18486#discussion_r1540234719
More information about the build-dev
mailing list