On Mon, 23 Nov 2020 11:28:05 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> If you try to build `linux-mipsel-zero-fastdebug`, this happens: >> >> >> >> >> >> >> >> I think it relates to >> [JDK-8253970](https://bugs.openjdk.java.net/browse/JDK-8253970) that >> introduced `atomic_compare_exchange` on those paths, but maybe the issue >> exists for longer. >> >> Various other reports for build failures like this suggest the binary should >> link with `libatomic`. GCC's `libatomic` is the library that provides >> runtime support for atomics not supported in hardware, which seems to >> include 8-byte CAS for MIPS, but not any other OpenJDK platform. >> >> The alternative would be to massage the otherwise generic Zero code to >> unimplement the 8-byte CAS. >> >> Attention @DamonFool, who must be running into this problem for their MIPS >> builds? >> >> Testing: >> - [x] Linux mipsel Zero fastdebug build (together with JDK-8256829 fix) > > This is incorrect. The `-l` prefix indicates a library to link with. As such, > it belongs to LIBS, not LDFLAGS. > > I'm not sure if we still have a global LIBS variable that is added to all > compile lines. We used to have since Solaris Studio required `-lc` for every > non-trivial file, but it might have been purged with the Solaris platform. > > Otherwise this looks like something that belong in LIBJVM LIBS. In fact, if > it is *only* needed for the hotspot build, it is really where it belong. And > even if it's needed in an additional library or two, it should be added on > those places. Only if like more or less all libraries require this should it > be added as a global flag. > Otherwise this looks like something that belong in LIBJVM LIBS. In fact, if > it is _only_ needed for the hotspot build, it is really where it belong. And > even if it's needed in an additional library or two, it should be added on > those places. Only if like more or less all libraries require this should it > be added as a global flag. So, would adding to `BASIC_JVM_LIBS` at `LIB_SETUP_LIBRARIES` step in `make/autoconf/libraries.m4` be a good place then? ------------- PR: https://git.openjdk.java.net/jdk/pull/1375