From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kLfYNOmR517cSQAA0tVLHw (envelope-from ) for ; Mon, 15 Jun 2020 15:21:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kO+9MOmR515MCwAA1q6Kng (envelope-from ) for ; Mon, 15 Jun 2020 15:21:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7770B940602 for ; Mon, 15 Jun 2020 15:21:13 +0000 (UTC) Received: from localhost ([::1]:55816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkqvA-0004Eq-D6 for larch@yhetil.org; Mon, 15 Jun 2020 11:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkqv0-0004DV-UF for guix-patches@gnu.org; Mon, 15 Jun 2020 11:21:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkqv0-0001Gh-KZ for guix-patches@gnu.org; Mon, 15 Jun 2020 11:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jkqv0-0007bK-Gd for guix-patches@gnu.org; Mon, 15 Jun 2020 11:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41871] [PATCH 0/7] IcedTea: Build (efficiently) on aarch64-linux Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Jun 2020 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41871 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41871@debbugs.gnu.org Cc: Simon South X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159223446129203 (code B ref -1); Mon, 15 Jun 2020 15:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jun 2020 15:21:01 +0000 Received: from localhost ([127.0.0.1]:47186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkquv-0007ad-PJ for submit@debbugs.gnu.org; Mon, 15 Jun 2020 11:21:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:57864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkqur-0007aT-Ch for submit@debbugs.gnu.org; Mon, 15 Jun 2020 11:20:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkqur-00046y-77 for guix-patches@gnu.org; Mon, 15 Jun 2020 11:20:53 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:41800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkqul-00018r-FK for guix-patches@gnu.org; Mon, 15 Jun 2020 11:20:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 7DDF6A0F62; Mon, 15 Jun 2020 15:20:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hoMgkcgW6Bfn; Mon, 15 Jun 2020 15:20:44 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 43FF5A0582; Mon, 15 Jun 2020 15:20:42 +0000 (UTC) From: Simon South Date: Mon, 15 Jun 2020 11:18:56 -0400 Message-Id: <20200615151856.12283-1-simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/15 11:20:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: xJZKTMOOq9rY This patch series applies a number of changes to the icedtea-6, -7 and -8 packages that allow them to build (efficiently) on aarch64-linux systems. It assumes the patches in issues 41748 and 41648 have already been applied, in that order. With these three sets of patches I've been able to complete the entire Java bootstrap process on both AArch64 and x86_64 and have successfully compiled and run a Java application on AArch64 using OpenJDK 14. The changes in this series - Ensure the correct number of parallel build jobs is used. The "--with-parallel-jobs" option to IcedTea's configure script enables a parallel build but by default, the script uses its own heuristic to decide how many jobs to run simultaneously. This can produce a poor result: On my dual-core, hyperthreaded x86_64 machine, IcedTea 6 picks five jobs (anything above two is inefficient); on my six-core AArch64 machine, IcedTea 7 picks only two (on a machine where engaging every core is important!). In any case, there is no guarantee the figure the script chooses will match the number of jobs requested by the user. These patches address this by ensuring the "--with-parallel-jobs" parameter is passed to configure along with a parameter explicitly specifying the correct number of jobs to use. - Remove an obsolete and architecture-dependent patch. The "gcc-segfault" patches yield a broken JIT on AArch64 because they embed a constant value, 11, that is architecture-dependent and apparently valid only for x86_64. This number represents the length of an array whose size is determined by the HotSpot build process and output in code it generates (at src/share/vm/adlc/output_h.cpp:893). Presumably the patches could be fixed, but I've been unable to reproduce the problem they're meant to solve and I suspect it was only ever an issue with gcc 5, meaning the patches are now obsolete. (The move to gcc 7 occurred about three months after they were added.) My changes remove these patches, including (for completeness and consistency) the patch to IcedTea 6 which doesn't actually interfere with the AArch64 build as it doesn't produce a JIT for that platform. - Allow all three IcedTea packages to build on aarch64-linux. For IcedTea 6, this means applying a backport of a patch to JDK 9 (see http://openjdk.java.net/jeps/237) that extends the support for AArch64 in HotSpot's shared code and allows the portable Zero VM to be built. For IcedTea 7, it means removing an unneeded C++ template that causes the build to fail when using gcc 7 and its default support for only the C++98 standard. IcedTea 8 (and subsequent versions of OpenJDK) support AArch64 and gcc 7 out-of-the-box and require no specific changes. -- Simon South simon@simonsouth.net Simon South (7): gnu: icedtea-6: Build in parallel using correct number of jobs. gnu: icedtea-6: Remove obsolete, architecture-dependent patch. gnu: icedtea-6: Fix build on aarch64-linux. gnu: icedtea-7: Build in parallel using correct number of jobs. gnu: icedtea-7: Fix build on aarch64-linux. gnu: icedtea-8: Build in parallel using correct number of jobs. gnu: icedtea-8: Fix build on aarch64-linux. gnu/local.mk | 4 +- gnu/packages/java.scm | 32 +- ...tea-6-extend-hotspot-aarch64-support.patch | 1831 +++++++++++++++++ ...ea-6-hotspot-gcc-segfault-workaround.patch | 42 - .../icedtea-7-hotspot-aarch64-use-c++98.patch | 33 + ...ea-7-hotspot-gcc-segfault-workaround.patch | 45 - 6 files changed, 1879 insertions(+), 108 deletions(-) create mode 100644 gnu/packages/patches/icedtea-6-extend-hotspot-aarch64-support.patch delete mode 100644 gnu/packages/patches/icedtea-6-hotspot-gcc-segfault-workaround.patch create mode 100644 gnu/packages/patches/icedtea-7-hotspot-aarch64-use-c++98.patch delete mode 100644 gnu/packages/patches/icedtea-7-hotspot-gcc-segfault-workaround.patch -- 2.26.2