From patchwork Tue Mar 28 14:28:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 11767 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 855FD17119; Tue, 28 Mar 2023 15:31:31 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 C2D1017011 for ; Tue, 28 Mar 2023 15:31:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phAKu-0004eh-1c; Tue, 28 Mar 2023 10:30:08 -0400 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 1phAKq-0004d0-Un for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phAKq-0006pV-8G for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phAKp-0002aJ-TR for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Mar 2023 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.16800137629639 (code B ref 62307); Tue, 28 Mar 2023 14:30:03 +0000 Received: (at 62307) by debbugs.gnu.org; 28 Mar 2023 14:29:22 +0000 Received: from localhost ([127.0.0.1]:50376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phAK9-0002VD-Ts for submit@debbugs.gnu.org; Tue, 28 Mar 2023 10:29:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phAK6-0002UL-Ps for 62307@debbugs.gnu.org; Tue, 28 Mar 2023 10:29:19 -0400 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 1phAK1-0006ND-28; Tue, 28 Mar 2023 10:29:13 -0400 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=mBlehwAXl7XcZJ5cG63Fq0Fn0DEK8x3GesycWZlBhcU=; b=NQWhqBd+SdrOMZq8CyKz Wf5fDNwLAxDfegn0oSlpFdoWnIbCmtF9hmPXL6Mtjz+/JmLij/blcrX/0FqqH8T8s9sy30ON7cOqs 2ifyLsjaasCu90K0EOhPxEq8mQu74Yl/G4NFSMgfL9nJV2EHDMznY+EcElSooc1+NKr16mvAcbql6 ifsNMtxTzH6+sqxuKZCkWTNkqj5vs6fZNtfDszUS2mTkxApkDlc69YHWgjyY9TW4AtsZcjJFFC5gf NuEeoJH8pjiBuaonpfwa4/xEwpOYWd9vTU6Gc7t88j/QgGsNBnjpAFA2ApBqFjgMKKd0wlv21Uajd hk/lyutLngXruA==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phAK0-00026Y-Kj; Tue, 28 Mar 2023 10:29:12 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 28 Mar 2023 16:28:33 +0200 Message-Id: <20230328142852.26635-2-ludo@gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230328142852.26635-1-ludo@gnu.org> References: <87pm90bzva.fsf_-_@gnu.org> <20230328142852.26635-1-ludo@gnu.org> 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/base.scm (%glibc/hurd-configure-flags): New variable. (glibc)[arguments]: Use it. (glibc/hurd-headers)[arguments]: likewise. * gnu/packages/cross-base.scm (cross-libc*): Likewise. Co-authored-by: Josselin Poiret --- gnu/packages/base.scm | 19 ++++++++++++++++--- gnu/packages/cross-base.scm | 4 +++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 041f16b4fc..520c2093f3 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -755,6 +755,17 @@ (define* (make-ld-wrapper name #:key (home-page "https://www.gnu.org/software/guix//") (license gpl3+))) +(define-public %glibc/hurd-configure-flags + ;; 'configure' in glibc 2.35 omits to pass '-ffreestanding' when detecting + ;; Mach headers. This is fixed in glibc commits + ;; 8b8c768e3c701ed1993789bb46acb8a12c7a93df and + ;; 7685630b98ca2a3f5de86eadf130993e6cf998a0; as a workaround, bypass those + ;; tests. + '("ac_cv_header_mach_mach_types_defs=yes" + "ac_cv_header_mach_mach_types_h=yes" + "ac_cv_header_mach_machine_ndr_def_h=no" + "libc_cv_mach_task_creation_time=yes")) + (define-public glibc ;; This is the GNU C Library, used on GNU/Linux and GNU/Hurd. Prior to ;; version 2.28, GNU/Hurd used a different glibc branch. @@ -854,7 +865,8 @@ (define-public glibc ;; On GNU/Hurd we get discarded-qualifiers warnings for ;; 'device_write_inband' among other things. Ignore them. ,@(if (hurd-target?) - '("--disable-werror") + `("--disable-werror" + ,@%glibc/hurd-configure-flags) '())) #:tests? #f ; XXX @@ -1392,9 +1404,10 @@ (define-public glibc/hurd-headers (arguments (substitute-keyword-arguments (package-arguments glibc) ;; We just pass the flags really needed to build the headers. - ((#:configure-flags _) + ((#:configure-flags flags) `(list "--enable-add-ons" - "--host=i586-pc-gnu")) + "--host=i586-pc-gnu" + ,@%glibc/hurd-configure-flags)) ((#:phases _) '(modify-phases %standard-phases (replace 'install diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 2959616af6..f86e8005c4 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -577,7 +577,9 @@ (define* (cross-libc* target ((#:configure-flags flags) `(cons ,(string-append "--host=" target) ,(if (target-hurd? target) - `(cons "--disable-werror" ,flags) + `(append (list "--disable-werror" + ,@%glibc/hurd-configure-flags) + ,flags) flags))) ((#:phases phases) `(modify-phases ,phases