From patchwork Sun Nov 10 10:38:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 70186 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 0D8EC27BBEA; Sun, 10 Nov 2024 10:40:46 +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 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 5F81027BBE2 for ; Sun, 10 Nov 2024 10:40:45 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA5MY-00010y-4P; Sun, 10 Nov 2024 05:40:10 -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 1tA5MV-0000xS-8x for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:07 -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 1tA5MT-0008FZ-Pp for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:06 -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=jag5tGRDudH0E+YqI26kJk8f3oBdkf5utn/p9fD/kBc=; b=dSmf4IkToTzKQC1OG1vXb6kn+VqfGBgaveIwvpYM1DQ3hKwTsnPnW4OyZbKxQEHRzHYs8xwb3OwbEpZmBjnxGIse4uF60IIOJD6YcaCa9hpvEKpQYoOXSjz1H4r6cQBpcH80fxX1B2JDg0hSTxcihsUmUnUklu9pzu7d7/XL/lpUmsToKfO5fCE1jEKixTcd2RMmK/NaOhUa2tdUynOmFW3NQdpV90pazWKWchQyGCOYktQqFRZB07pUnsQXaDXnz8hAfGrjpfFhlKlg7xxAemcxxpVR7LVATW3icDIrqaJUH9FSWMXNS+4zSjyoshV59zFnkiGg2iofzKdJdHolcw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tA5MT-0002jJ-LQ for guix-patches@gnu.org; Sun, 10 Nov 2024 05:40:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74290] [PATCH 19/31] gnu: openssl-3.0: Support the 64bit Hurd. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Nov 2024 10:40:05 +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.173123516310214 (code B ref 74290); Sun, 10 Nov 2024 10:40:05 +0000 Received: (at 74290) by debbugs.gnu.org; 10 Nov 2024 10:39:23 +0000 Received: from localhost ([127.0.0.1]:55780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5Lm-0002eT-2O for submit@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tA5LX-0002Zk-TZ for 74290@debbugs.gnu.org; Sun, 10 Nov 2024 05:39:09 -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 1tA5LS-0007rX-FX; Sun, 10 Nov 2024 05:39:02 -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=jag5tGRDudH0E+YqI26kJk8f3oBdkf5utn/p9fD/kBc=; b=qAaNxZIEBlJ0kMWoTmL6 hPr3rBRTjegPXkCielWg8fi0H4a15vpuQzHndgXbGfBnoTClAg7oxq5/FoFtMXAeT1gSnZkWh1Ht/ ydGIudA2IROEY9/oRdDGrX7zd+Vs3isK6gCVqzDSLXdenp1i1ExDY4eXUh7H+wSwjyXMCswBTJrWQ I+v2XFxoChZ8zquDPoqexnqnyiGeK2lqdMiRq8Q/N9hnSjWh1b2ZNVtAUWczYcX6yk87JJXfrrrR6 Zt85UJ8mFRv9CGSMOWvFx55Q7AYcSjwzIU0S7tXwXD/Blcp90rjXl6Befw/z03HAJ83TnDNV9JNFg U16BVuzWInU8zg==; From: Janneke Nieuwenhuizen Date: Sun, 10 Nov 2024 11:38:15 +0100 Message-ID: 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 4b9fa95658..576f60579e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1891,6 +1891,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 1a1ce0d215..261a063090 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?)