Looks good to me.
/Erik
On 2015-10-28 22:03, Magnus Ihse Bursie wrote:
The build system has not been good at separating LIBS from LDFLAGS. In
fact, when we started doing this, the name "LDFLAGS_SUFFIX" was used
for what is traditionally called LIBS. This unwieldy name has
unfortunately been kept, and possibly as a cause of this, we have not
been good at differing between flags to the linker and libraries
needed to link with.
We should rename LDFLAGS_SUFFIX (and all of it's variants) to LIBS,
and make sure we use LDFLAGS for flags and LIBS for libs.
I made this patch using sed to automatically replace LDFLAGS_SUFFIX
with LIBS. I then manually checked all renamed instances, and verified
that new names didn't clash with old names. I also used sed to rename
LDFLAGS_JDKLIB_SUFFIX to JDKLIB_LIBS (and correspondingly for JDKEXE).
When I had verified that all replacements were sound, I also did some
manual cleanup. It turned out that
a) we had not unified common libraries across platforms, e.g.
repeating them for multiple individual platforms instead of using
LIBS_unix. This was originally an explicit design goal to minimize
spurious changes compared to the old build system, but that is not
relevant any longer and needed to be fixed.
b) we had not properly separated LDFLAGS and LIBS, so in some cases we
sent linker flags in LIBS (formerly LDFLAGS_SUFFIX, so it might be
understandable) and library dependencies in LDFLAGS. (This is
acceptable for some linkers, however, for good style, we should use
LIBS for libraries consistently across platforms.)
I have fixed those issues, were I could find them.
Bug: https://bugs.openjdk.java.net/browse/JDK-8140661
WebRev:
http://cr.openjdk.java.net/~ihse/JDK-8140661-rename-LDFLAGS_SUFFIX-to-LIBS/webrev.01
/Magnus