-
Bug
-
Resolution: Fixed
-
P4
-
10
-
b22
-
sparc
-
linux
On linux-sparc, the build fails with:
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
lib/CompileJvm.gmk:208: recipe for target '/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o' failed
make[3]: *** [/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o] Error 1
make[3]: *** Waiting for unfinished jobs....
lib/CompileJvm.gmk:208: recipe for target '/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractInterpreter.o' failed
make[3]: *** [/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractInterpreter.o] Error 1
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
This happens because in common/autoconf/flags.m4, we're passing "-arch=sparc" to the compiler even though this flag is not understood by gcc on linux-sparc.
This is fixed by the following patch which extends the condition for this flag from "sparcv9" to "solaris-sparcv9":
# HG changeset patch
# User John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
# Date 1503051427 -7200
# Fri Aug 18 12:17:07 2017 +0200
# Node ID 8503f29d88c54198c0909421614b89244b41efff
# Parent 8793cdb0f8e67202cb3e9af89d352a18c72bdee7
common: Pass compiler flag -xarch=sparc on solaris-sparcv9 only
diff -r 8793cdb0f8e6 -r 8503f29d88c5 common/autoconf/flags.m4
--- a/common/autoconf/flags.m4 Wed Aug 16 02:45:39 2017 +0200
+++ b/common/autoconf/flags.m4 Fri Aug 18 12:17:07 2017 +0200
@@ -1046,7 +1046,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 "x$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
Patch attached to this bug report.
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
lib/CompileJvm.gmk:208: recipe for target '/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o' failed
make[3]: *** [/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o] Error 1
make[3]: *** Waiting for unfinished jobs....
lib/CompileJvm.gmk:208: recipe for target '/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractInterpreter.o' failed
make[3]: *** [/home/glaubitz/openjdk/hs/build/linux-sparcv9-normal-server-release/hotspot/variant-server/libjvm/objs/abstractInterpreter.o] Error 1
g++: error: language arch=sparc not recognized
g++: error: language arch=sparc not recognized
This happens because in common/autoconf/flags.m4, we're passing "-arch=sparc" to the compiler even though this flag is not understood by gcc on linux-sparc.
This is fixed by the following patch which extends the condition for this flag from "sparcv9" to "solaris-sparcv9":
# HG changeset patch
# User John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
# Date 1503051427 -7200
# Fri Aug 18 12:17:07 2017 +0200
# Node ID 8503f29d88c54198c0909421614b89244b41efff
# Parent 8793cdb0f8e67202cb3e9af89d352a18c72bdee7
common: Pass compiler flag -xarch=sparc on solaris-sparcv9 only
diff -r 8793cdb0f8e6 -r 8503f29d88c5 common/autoconf/flags.m4
--- a/common/autoconf/flags.m4 Wed Aug 16 02:45:39 2017 +0200
+++ b/common/autoconf/flags.m4 Fri Aug 18 12:17:07 2017 +0200
@@ -1046,7 +1046,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 "x$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
Patch attached to this bug report.