RFR(S): 8141290: AIX: fix build after '8140661: Rename LDFLAGS_SUFFIX to LIBS'
Volker Simonis
volker.simonis at gmail.com
Tue Nov 3 16:20:38 UTC 2015
Hi,
unfortunately, change '8140661: Rename LDFLAGS_SUFFIX to LIBS' broke
the AIX build.
Can somebody please review this small change which fixes the build?
http://cr.openjdk.java.net/~simonis/webrevs/2015/8141290/
https://bugs.openjdk.java.net/browse/JDK-8141290
Besides this immediate build fix I have some general questions/remarks
regarding change '8140661: Rename LDFLAGS_SUFFIX to LIBS':
First of all I think it is always good to further cleanup and simplify
the build and the idea to separate linker options from library
dependencies is yet another good step into this direction.
But I have some problems understanding the semantics of the new
JDKLIB_LIBS variable. As far as I understand it, JDKLIB_LIBS holds the
native library dependencies for the native libraries build within the
jdk build (is this true?). As such I'd expect that every call to
SetupNativeCompilation in jdk/make/lib/ should contain a line like
"LIBS := $(JDKLIB_LIBS)". If that would have been true, we wouldn't
have seen any problems on AIX.
Before change 8140661, LDFLAGS_JDKLIB contained the library dependency
"-liconv" and because every call to SetupNativeCompilation in
jdk/make/lib/ contained a line like "LDFLAGS := $(LDFLAGS_JDKLIB)" the
dependency to libiconv.so was always satisfied. Now I admit, that
having "-liconv" in the LDFLAGS is probably not very elegant and it is
probably also not strictly needed, because potentially not every
native jdk library really depends on libiconv.so. So in general the
cleanup done by 8140661 is good (if it is done right :)
But until now, not every call to SetupNativeCompilation contains the
line "LIBS := $(JDKLIB_LIBS)". Instead, a lot of the calls still
contain lines like "LIBS_unix := -ljava" although JDKLIB_LIBS already
contains "-ljava -ljvm" by default on all Unix platforms. Also, there
are a lot of lines like "LIBS_solaris := -lc" although JDKLIB_LIBS
already contains "-lc" by default on Solaris.
So my question: are there plans to further improve the build system by
adding "LIBS := $(JDKLIB_LIBS)" to all the calls to
SetupNativeCompilation in jdk/make/lib/ and remove the then redundant
platform specific settings? I think that would be yet another nice
cleanup and in that case I'd also prefer to remove '-liconv' from
JDKLIB_LIBS on AIX and only add it to the required libraries, in the
same way as this is done for MacOS X.
Thank you and best regards,
Volker
More information about the build-dev
mailing list