From 6767793eccffea3bfddca5c4a0c0cff21abb965b Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Mon, 13 Sep 2021 14:37:40 +0200 Subject: [PATCH] WIP: gnu: icedtea-6: Fix build. * gnu/packages/java.scm (icedtea-6)[arguments]: Add 'fix-openjdk' phase. --- gnu/packages/java.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 51fc5c60a1..374a9d9cba 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2021 Vincent Legoll ;;; Copyright © 2021 Mike Gerwitz ;;; Copyright © 2021 Pierre Langlois +;;; Copyright © 2021 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; @@ -907,6 +908,19 @@ 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 ") + "#include ")))) (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) ;; buildtree.make generates shell scripts, so we need to replace -- 2.33.0