[RFR]: 8186578: Zero fails to build on linux-sparc due to sparc-specific code

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Wed Sep 27 16:40:38 UTC 2017


Zero currently fails to build on linux-sparc since there are two instances where
SPARC-specific defines conflict with the Zero code.

One instance is src/hotspot/share/compiler/oopMap.cpp where a header is uncondtionally
included for SPARC which is not available for Zero. It turns out that this header,
vmreg_sparc.inline.hpp, does actually not need to be included here. So, easiest
part is just to remove the inclusion of this header:

@@ -38,13 +38,10 @@
  #include "c1/c1_Defs.hpp"
  #ifdef COMPILER2
  #include "opto/optoreg.hpp"
-#ifdef SPARC
-#include "vmreg_sparc.inline.hpp"

The second instance is src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
which is not included in the build for Zero. However, we always need to include it
because of the particular implementation of memset() on SPARC which does not work
well with concurrent readers which is why memset_with_concurrent_readers.hpp looks
like this:

#ifdef SPARC

// SPARC requires special handling.  See SPARC-specific definition.

// All others just use memset.

inline void memset_with_concurrent_readers(void* to, int value, size_t size) {
   ::memset(to, value, size);

#endif // End of target dispatch.

The webrev to fix the Zero build on SPARC includes both changes and can be found
in [1].


> [1] http://cr.openjdk.java.net/~glaubitz/8186578/webrev.02/

  .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

More information about the build-dev mailing list