[patch] fix compiler flag for linux sparc targets

Matthias Klose doko at ubuntu.com
Mon Sep 5 11:10:39 UTC 2016


at least in 9b134 the build system currently picks up the wrong compiler flag on
linux sparc targets. The patch below only applies it for solaris builds.

--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -921,7 +921,7 @@
   # Set some additional per-CPU defines.
   if test "x$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xwindows-x86; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -arch:IA32"
-  elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
+  elif test "xx$OPENJDK_$1_OS-$OPENJDK_$1_CPU" = xsolaris-sparcv9; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -xarch=sparc"
   elif test "x$OPENJDK_$1_CPU" = xppc64; then
     if test "x$OPENJDK_$1_OS" = xlinux; then

Is the linux sparc port supposed to work in 9? It apparently does in jdk8, but
the build later fails with

/<<PKGBUILDDIR>>/src/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp: In
function 'bool checkByteBuffer(address, address, u_char**)':
/<<PKGBUILDDIR>>/src/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp:442:49:
error: 'thread' was not declared in this scope
     *stub = SharedRuntime::handle_unsafe_access(thread, npc);
                                                 ^~~~~~
lib/CompileJvm.gmk:201: recipe for target
'/<<PKGBUILDDIR>>/build/hotspot/variant-server/libjvm/objs/os_linux_sparc.o' failed


Matthias



More information about the build-dev mailing list