From patchwork Tue Nov 12 16:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70299 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9810627BBEA; Tue, 12 Nov 2024 16:31:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D68DA27BBE2 for ; Tue, 12 Nov 2024 16:31:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAtmX-00042C-D7; Tue, 12 Nov 2024 11:30:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAtmT-0003yd-VC for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:18 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAtmT-0005xQ-Lc for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=+z1kGw4qXnurR/Dh5fnR/Tee02LV1742vTHy3OmQhLI=; b=Wg0vblGZGXTbTSXiIZSpkC08rcJBLtkth+hU26T9t62KuaZBUbMwTjqRnYguLpajPE3SXSFXGK/Ldxs+Lg178vNGvgJm0UlVTfz/InRLrlNAaFoI+hut/lD5KIlkhw2q1eaj6GjyzcdxqcXdQh9AbrbmWJhUwAmJcUQtIoeM0a+0c/7VXufrbKDnIxjD1gjY5PEh/nKeHuwps5CT/qMa8i8UsWgoKInImxWRqMsftsxhHm7yRgvhr+D3o9GBeNsS7LRK/PiApgiPBhS921t1DUD7g7u7yau88Imd1S7yPOhJhR9PeqHlaLmGKUmGzLbz7txeca6UwzTzKrksSI5WBQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tAtmT-0000Xq-G6 for guix-patches@gnu.org; Tue, 12 Nov 2024 11:30:17 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH v2 19/40] gnu: openssl-3.0: Support the 64bit Hurd. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Nov 2024 16:30:17 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74290 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74290@debbugs.gnu.org Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.17314289771323 (code B ref 74290); Tue, 12 Nov 2024 16:30:17 +0000 Received: (at 74290) by debbugs.gnu.org; 12 Nov 2024 16:29:37 +0000 Received: from localhost ([127.0.0.1]:39127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtlo-0000Ky-HB for submit@debbugs.gnu.org; Tue, 12 Nov 2024 11:29:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tAtld-0000Hh-Gl for 74290@debbugs.gnu.org; Tue, 12 Nov 2024 11:29:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAtjS-0005N4-T2; Tue, 12 Nov 2024 11:27:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=+z1kGw4qXnurR/Dh5fnR/Tee02LV1742vTHy3OmQhLI=; b=DvTQOjy4yjlA5aq+yoQc ivV4CYFeGg3OTwCQ/6X8aRr+p8NC1QFzaHyPlIPsPsr2yzHooynAtqMzfxNiE0wKKzkoqWoV1dzj3 l60OLJU1E37P6W95k3Jax7iQFgTvYPq64KYP6DksEN1sQJ5W13SVkkBG6xQpm0o2KntbyvuXe0mgW 0j0f/C9y0iYqQ9kzNOuSdSEIyHU49wSMmQC1Hd89N2XB5/Eoyggm28ELgRq747MITCTad+hEgHg6L x3FqGcRm43t7zs3sY3M9exYOt/dypxDaOpIPmgS35Hi4VjFzkhFUeJbDtPGMexk57RNggyLTEuGU/ B2TMf4GcFdZh+A==; From: Janneke Nieuwenhuizen Date: Tue, 12 Nov 2024 17:25:28 +0100 Message-ID: <9f00bfe5365aabf524069f8a5d435fecdf9016b5.1731427612.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/openssl-hurd64.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/tls.scm (openssl-3.0)[arguments]: When building for the 64bit Hurd, use it in new "apply-hurd-patch" phase. Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05 --- gnu/local.mk | 1 + gnu/packages/patches/openssl-hurd64.patch | 99 +++++++++++++++++++++++ gnu/packages/tls.scm | 9 +++ 3 files changed, 109 insertions(+) create mode 100644 gnu/packages/patches/openssl-hurd64.patch diff --git a/gnu/local.mk b/gnu/local.mk index c952e090ec..a7e5e903e3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1893,6 +1893,7 @@ dist_patch_DATA = \ %D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-3.0-c-rehash-in.patch \ + %D%/packages/patches/openssl-hurd64.patch \ %D%/packages/patches/opentaxsolver-file-browser-fix.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ %D%/packages/patches/orangeduck-mpc-fix-pkg-config.patch \ diff --git a/gnu/packages/patches/openssl-hurd64.patch b/gnu/packages/patches/openssl-hurd64.patch new file mode 100644 index 0000000000..372fda834a --- /dev/null +++ b/gnu/packages/patches/openssl-hurd64.patch @@ -0,0 +1,99 @@ +Upstream-status: Taken from upstream: + +. + +From 795699363be8f717e36802c3ac503011b74ad752 Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Thu, 7 Nov 2024 14:08:05 +0100 +Subject: [PATCH] Add support for the 64bit Hurd. +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +Taken from . +--- + Configurations/10-main.conf | 45 ++++++++++++++++++++++++++++++++----- + util/perl/OpenSSL/config.pm | 3 ++- + 2 files changed, 41 insertions(+), 7 deletions(-) + +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index b578a3c2a8..740460ebd3 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -1685,20 +1685,53 @@ my %targets = ( + }, + + ##### GNU Hurd +- "hurd-x86" => { ++ "hurd-generic32" => { + inherit_from => [ "BASE_unix" ], + CC => "gcc", +- CFLAGS => "-O3 -fomit-frame-pointer -Wall", ++ CXX => "g++", ++ CFLAGS => picker(default => "-Wall", ++ debug => "-O0 -g", ++ release => "-O3"), ++ CXXFLAGS => picker(default => "-Wall", ++ debug => "-O0 -g", ++ release => "-O3"), + cflags => threads("-pthread"), +- lib_cppflags => "-DL_ENDIAN", ++ cxxflags => combine("-std=c++11", threads("-pthread")), + ex_libs => add("-ldl", threads("-pthread")), +- bn_ops => "BN_LLONG", +- asm_arch => 'x86', +- perlasm_scheme => 'elf', ++ bn_ops => "BN_LLONG RC4_CHAR", + thread_scheme => "pthreads", + dso_scheme => "dlfcn", + shared_target => "linux-shared", + shared_cflag => "-fPIC", ++ shared_ldflag => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" }, ++ }, ++ ++ "hurd-generic64" => { ++ inherit_from => [ "hurd-generic32" ], ++ bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", ++ }, ++ ++ #### X86 / X86_64 targets ++ "hurd-x86" => { ++ inherit_from => [ "hurd-generic32" ], ++ CFLAGS => add(picker(release => "-fomit-frame-pointer")), ++ cflags => add("-m32"), ++ cxxflags => add("-m32"), ++ lib_cppflags => add("-DL_ENDIAN"), ++ bn_ops => "BN_LLONG", ++ asm_arch => 'x86', ++ perlasm_scheme => 'elf', ++ }, ++ ++ "hurd-x86_64" => { ++ inherit_from => [ "hurd-generic64" ], ++ cflags => add("-m64"), ++ cxxflags => add("-m64"), ++ lib_cppflags => add("-DL_ENDIAN"), ++ bn_ops => "SIXTY_FOUR_BIT_LONG", ++ asm_arch => 'x86_64', ++ perlasm_scheme => 'elf', ++ multilib => "64", + }, + + ##### VxWorks for various targets +diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm +index 2f1edcafb6..707db71537 100755 +--- a/util/perl/OpenSSL/config.pm ++++ b/util/perl/OpenSSL/config.pm +@@ -92,7 +92,8 @@ my $guess_patterns = [ + [ 'IRIX64:.*', 'mips4-sgi-irix64' ], + [ 'Linux:[2-9]\..*', '${MACHINE}-whatever-linux2' ], + [ 'Linux:1\..*', '${MACHINE}-whatever-linux1' ], +- [ 'GNU.*', 'hurd-x86' ], ++ [ 'GNU:.*86-AT386', 'hurd-x86' ], ++ [ 'GNU:.*86_64-AT386', 'hurd-x86_64' ], + [ 'LynxOS:.*', '${MACHINE}-lynx-lynxos' ], + # BSD/OS always says 386 + [ 'BSD\/OS:4\..*', 'i486-whatever-bsdi4' ], +-- +Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org +Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com + diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 43806e24da..fab88518ce 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -589,6 +589,15 @@ (define-public openssl-3.0 "/bin/perl")))) #$@(if (target-hurd?) #~((delete 'patch-configure)) + #~()) + #$@(if (target-hurd64?) + #~((add-after 'unpack 'apply-hurd-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "openssl-hurd64.patch")))) + (invoke "patch" "--force" "-p1" "-i" + patch-file))))) #~()))) ((#:configure-flags flags #~'()) (if (system-hurd?)