RFR: 8321688: Build on linux with GCC 7.5.0 fails after 8319577 [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Tue Dec 19 00:11:40 UTC 2023
On Sun, 17 Dec 2023 13:25:00 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Hi all,
>>
>> This patch fixes the building failure introduced by [JDK-8319577](https://bugs.openjdk.org/browse/JDK-8319577) in old GCC version (linux & GCC 7.5.0 locally).
>>
>> Thanks for the review.
>>
>> Best Regards,
>> -- Guoxiong
>
> Guoxiong Li has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Bump the needed version of GCC.
> - Revert previous change.
> - Merge branch 'master' into JDK-8321688
> - JDK-8321688
Let us restrict the libsimdsort.so build to GCC 8.4.0 with the following change:
`diff --git a/src/java.base/linux/native/libsimdsort/simdsort-support.hpp b/src/java.base/linux/native/libsimdsort/simdsort-support.hpp
index c73fd7920d8..2a2946cff82 100644
--- a/src/java.base/linux/native/libsimdsort/simdsort-support.hpp
+++ b/src/java.base/linux/native/libsimdsort/simdsort-support.hpp
@@ -31,9 +31,9 @@
#define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }}
-// GCC >= 7.5 is needed to build AVX2 portions of libsimdsort using C++17 features
-#if defined(_LP64) && (defined(__GNUC__) && ((__GNUC__ > 7) || ((__GNUC__ == 7) && (__GNUC_MINOR__ >= 5))))
+// GCC >= 8.4 is needed to build AVX2 portions of libsimdsort using C++17 features
+#if defined(_LP64) && (defined(__GNUC__) && ((__GNUC__ > 8) || ((__GNUC__ == 8) && (__GNUC_MINOR__ >= 4))))
#define __SIMDSORT_SUPPORTED_LINUX
#endif
-#endif //SIMDSORT_SUPPORT_HPP
\ No newline at end of file
+#endif //SIMDSORT_SUPPORT_HPP`
I have verified that with the above change the builds (release, fastdebug, slowdebug) all succeed with GCC 8.4.0 as well as prior GCC like GCC7.5.0 and the test/jdk/java/util/Arrays/Sorting.java passes successfully with these builds.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17047#issuecomment-1861889879
More information about the core-libs-dev
mailing list