[aarch64-port-dev ] [PATCH] [jdk8u] Remove unused template which breaks builds with GCC 6
Andrew Hughes
gnu.andrew at redhat.com
Thu Feb 25 00:41:12 UTC 2016
Webrev: http://cr.openjdk.java.net/~andrew/aarch64-8/gcc6/webrev.01/
The min template:
template <class T> static const T& min (const T& a, const T& b)
causes the build to fail with GCC 6 [0], where the default C++ standard
(-std=gnu++98) has to be explicitly specified, as the default has changed.
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.72-5.b15.fc24.aarch64/openjdk/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1113:18: warning: variable templates only available with -std=c++14 or -std=gnu++14
#define min(a,b) Do_not_use_min_use_MIN2_instead
^
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.72-5.b15.fc24.aarch64/openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp:197:36: note: in expansion of macro 'min'
template <class T> static const T& min (const T& a, const T& b) {
^~~
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.72-5.b15.fc24.aarch64/openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp:198:3: error: expected ';' before 'return'
return (a > b) ? b : a;
^~~~~~
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.72-5.b15.fc24.aarch64/openjdk/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp:199:1: error: expected declaration before '}' token
}
^
The template appears to be unused and removing it allows the build
to succeed with GCC 6.
Ok to push?
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1307224#c1
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the aarch64-port-dev
mailing list