[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-updates-frozen updated: gnu: icedtea-6: Fix build.
From: |
guix-commits |
Subject: |
branch core-updates-frozen updated: gnu: icedtea-6: Fix build. |
Date: |
Tue, 14 Sep 2021 12:25:10 -0400 |
This is an automated email from the git hooks/post-receive script.
glv pushed a commit to branch core-updates-frozen
in repository guix.
The following commit(s) were added to refs/heads/core-updates-frozen by this
push:
new f8cff36 gnu: icedtea-6: Fix build.
f8cff36 is described below
commit f8cff361245cc0c546211ff51100cbaf869d15eb
Author: Guillaume Le Vaillant <glv@posteo.net>
AuthorDate: Mon Sep 13 14:37:40 2021 +0200
gnu: icedtea-6: Fix build.
* gnu/packages/java.scm (icedtea-6)[arguments]: Add 'fix-openjdk' phase.
---
gnu/packages/java.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 51fc5c6..c803a17 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -907,6 +908,33 @@ machine.")))
"patches/hotspot/hs23/drop_unlicensed_test.patch")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
#t))
+ (add-after 'unpack 'fix-openjdk
+ (lambda _
+ (substitute* "openjdk/jdk/make/common/Defs-linux.gmk"
+ (("CFLAGS_COMMON = -fno-strict-aliasing" all)
+ (string-append all " -fcommon")))
+ (substitute* "openjdk/hotspot/src/share/vm/code/relocInfo.hpp"
+ (("inline friend relocInfo prefix_relocInfo\\(int datalen =
0\\);")
+ "inline friend relocInfo prefix_relocInfo(int datalen);"))
+ (substitute*
+ '("openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+
"openjdk/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/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;"))
+ ;; Our gcc version is higher than 4.3; replace the failing
+ ;; expression to test this by its result.
+ (substitute* "openjdk/jdk/make/sun/font/Makefile"
+ (("\"\\$\\(shell expr.*0\"")
+ "\"1\" \"0\""))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
;; buildtree.make generates shell scripts, so we need to replace
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-updates-frozen updated: gnu: icedtea-6: Fix build.,
guix-commits <=