From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 34E363858D1E for ; Sun, 12 Feb 2023 15:07:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 34E363858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org 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 1pRDwe-0005aZ-LR; Sun, 12 Feb 2023 10:07:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=jGuUsZ9XFVwysGanaEpMDabiN6452d813mlO8FgH/9k=; b=kNIU56XNgEDC+jI5w0+4 wYv51IMPIQk6dpp+ShTPpCwFqkLpgDfLYnLCYRlfiBKZ0XPJ2htPEcXPW6zlkpVPB/vaKFDOZQ9zA C2fbeZKjlKLP8r3tAktKyqPGPR1xbwFvlBwrTb5XCyRf968qpYa4ekvZMfNX6baLGhZv9l3yDSR5K zbfNr8Y8x1f26NASRY5/FBDtmHVybo13BbPN4onvu3NXvl8kl7EP6ZSC8xS59gec24imR1r2+gyTc pNRTGF/Bl08rOtrBlKoGrPP5YUi0tVm7jAXQ0Ruy9rHaMHCiwzGuiSYEAczIO5jH7zcQUf+28W8oy 5dABbUw6bzsmqA==; Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRDwe-0006bS-Bp; Sun, 12 Feb 2023 10:07:12 -0500 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pRDwc-004oQf-2u; Sun, 12 Feb 2023 16:07:10 +0100 Date: Sun, 12 Feb 2023 16:07:10 +0100 From: Samuel Thibault To: Sergey Bugaev Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz Subject: Re: [RFC PATCH glibc 9/12] mach: Look for mach_i386.defs on x86_64 too Message-ID: <20230212150710.zuzw5nqdtwvflkrj@begin> Mail-Followup-To: Sergey Bugaev , bug-hurd@gnu.org, libc-alpha@sourceware.org, =?utf-8?Q?Fl=C3=A1vio?= Cruz References: <20230212111044.610942-1-bugaevc@gmail.com> <20230212111044.610942-10-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230212111044.610942-10-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Sergey Bugaev, le dim. 12 févr. 2023 14:10:40 +0300, a ecrit: > Signed-off-by: Sergey Bugaev > --- > mach/Makefile | 3 ++- > sysdeps/mach/configure | 6 +++--- > sysdeps/mach/configure.ac | 6 +++--- > 3 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/mach/Makefile b/mach/Makefile > index 39358fdb..f2fdd7da 100644 > --- a/mach/Makefile > +++ b/mach/Makefile > @@ -64,7 +64,8 @@ CFLAGS-RPC_i386_set_ldt.o = $(no-stack-protector) > CFLAGS-RPC_task_get_special_port.o = $(no-stack-protector) > > # Translate GNU names for CPUs into the names used in Mach header files. > -mach-machine = $(patsubst powerpc,ppc,$(base-machine)) > +mach-machine := $(patsubst powerpc,ppc,$(base-machine)) > +mach-machine := $(patsubst x86_64,i386,$(mach-machine)) Mmm, no, it's not actually a translation. What exactly does this fix? To build a 64bit glibc, we'll use headers installed by a 64bit gnumach, i.e. into /usr/include/x86_64-gnu/ I have applied the rest, thanks! Samuel > diff --git a/sysdeps/mach/con b/sysdeps/mach/configure > index 3f0a9029..8c341d59 100644 > --- a/sysdeps/mach/configure > +++ b/sysdeps/mach/configure > @@ -249,7 +249,7 @@ for ifc in mach mach4 gnumach \ > clock clock_priv host_priv host_security ledger lock_set \ > processor processor_set task task_notify thread_act vm_map \ > memory_object memory_object_default default_pager \ > - i386/mach_i386 \ > + machine/mach_i386 \ > ; do > as_ac_Header=`$as_echo "ac_cv_header_mach/${ifc}.defs" | $as_tr_sh` > ac_fn_c_check_header_preproc "$LINENO" "mach/${ifc}.defs" "$as_ac_Header" > @@ -440,7 +440,7 @@ if ${libc_cv_mach_i386_ioports+:} false; then : > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > > _ACEOF > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | > @@ -466,7 +466,7 @@ if ${libc_cv_mach_i386_gdt+:} false; then : > else > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > -#include > +#include > > _ACEOF > if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | > diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac > index a57cb259..579c0021 100644 > --- a/sysdeps/mach/configure.ac > +++ b/sysdeps/mach/configure.ac > @@ -64,7 +64,7 @@ for ifc in mach mach4 gnumach \ > clock clock_priv host_priv host_security ledger lock_set \ > processor processor_set task task_notify thread_act vm_map \ > memory_object memory_object_default default_pager \ > - i386/mach_i386 \ > + machine/mach_i386 \ > ; do > AC_CHECK_HEADER(mach/${ifc}.defs, [dnl > mach_interface_list="$mach_interface_list $ifc"],, -) > @@ -89,7 +89,7 @@ AC_CHECK_HEADER(machine/ndr_def.h, [dnl > > AC_CACHE_CHECK(for i386_io_perm_modify in mach_i386.defs, > libc_cv_mach_i386_ioports, [dnl > -AC_EGREP_HEADER(i386_io_perm_modify, mach/i386/mach_i386.defs, > +AC_EGREP_HEADER(i386_io_perm_modify, mach/machine/mach_i386.defs, > libc_cv_mach_i386_ioports=yes, > libc_cv_mach_i386_ioports=no)]) > if test $libc_cv_mach_i386_ioports = yes; then > @@ -98,7 +98,7 @@ fi > > AC_CACHE_CHECK(for i386_set_gdt in mach_i386.defs, > libc_cv_mach_i386_gdt, [dnl > -AC_EGREP_HEADER(i386_set_gdt, mach/i386/mach_i386.defs, > +AC_EGREP_HEADER(i386_set_gdt, mach/machine/mach_i386.defs, > libc_cv_mach_i386_gdt=yes, > libc_cv_mach_i386_gdt=no)]) > if test $libc_cv_mach_i386_gdt = yes; then > -- > 2.39.1 > > -- Samuel --- Pour une évaluation indépendante, transparente et rigoureuse ! Je soutiens la Commission d'Évaluation de l'Inria.