diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2021-09-14 21:18:39 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2021-09-14 21:18:39 +0200 |
commit | 1fec7c43f8d8e00ad729f6666456d44a3e5e1c74 (patch) | |
tree | af99dda8f3806035f77f1b61c13ca1d992f3ae4e /gnu | |
parent | f8cff361245cc0c546211ff51100cbaf869d15eb (diff) | |
download | guix-1fec7c43f8d8e00ad729f6666456d44a3e5e1c74.tar guix-1fec7c43f8d8e00ad729f6666456d44a3e5e1c74.tar.gz |
gnu: icedtea-7: Fix build.
* gnu/packages/java.scm (icedtea-7)[arguments]: Add 'fix-openjdk' phase.
Update 'install-keystore' phase.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/java.scm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c803a17d34..03941ba460 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1286,6 +1286,25 @@ bootstrapping purposes.") "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c") (("attr/xattr.h") "sys/xattr.h")) #t)) + (add-after 'unpack 'fix-openjdk + (lambda _ + (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk" + (("CFLAGS_COMMON = -fno-strict-aliasing" all) + (string-append all " -fcommon"))) + (substitute* + '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c" + "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c") + (("#include <sys/sysctl.h>") + "#include <linux/sysctl.h>")) + ;; It looks like the "h = 31 * h + c" line of the jsum() + ;; function gets miscompiled. After a few iterations of the loop + ;; the result of "31 * h" is always 0x8000000000000000. + ;; Bad optimization maybe... + ;; Transform "31 * h + c" into a convoluted "32 * h + c - h" + ;; as a workaround. + (substitute* "openjdk.src/hotspot/src/share/vm/memory/dump.cpp" + (("h = 31 \\* h \\+ c;") + "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;")))) (add-after 'unpack 'fix-x11-extension-include-path (lambda* (#:key inputs #:allow-other-keys) (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" @@ -1621,7 +1640,7 @@ bootstrapping purposes.") (setlocale LC_ALL "en_US.utf8") (setenv "LC_ALL" "en_US.utf8") - (for-each import-cert (find-files certs-dir "\\.pem$")) + (for-each import-cert (find-files certs-dir "\\.crt$")) (mkdir-p (string-append (assoc-ref outputs "out") "/lib/security")) (mkdir-p (string-append (assoc-ref outputs "jdk") |