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 484A23858D32 for ; Sun, 12 Feb 2023 15:01:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 484A23858D32 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 1pRDra-0004hd-O0; Sun, 12 Feb 2023 10:01:58 -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=Iu1oG688MGH2BuZn7CCv/KptEh6UlLsNUl1/BtsQvmw=; b=qRH0cxCDRSvQ6kqJFuZ0 JoxZWGS3UY7fgTiB0fYhqybzUtS8LLlQgTuP27Uk2uoE58LkuN0ZKbPg+vpj4/uJXcUsGGZodL3YK v2pFIPEHTvBoN9IROuQ+HgsIcC1gx9Ynkd0DAVAahyYyYoZ31YdXGrXCwhYYcubNE5hwOuTDzotM4 7j5EyVmVBp7NJO1rDFASUVZ6R/WxNsOWxovdcUdlFRkUNaq+iheFVI0q7pZy5Dtnw8vewn2LG4mXs CrDWXXdaHgTY3XNyNULMT9HULRsh1vmbeq0m3rN5C/K4IkM5WWfx6JdfSdiS92zTPT+ZUCCB6WKXh CTnKijhSoXjOBg==; 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 1pRDra-0007FY-8P; Sun, 12 Feb 2023 10:01:58 -0500 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pRDrZ-004nz9-0G; Sun, 12 Feb 2023 16:01:57 +0100 Date: Sun, 12 Feb 2023 16:01:57 +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 mig 7/12] Drop -undef -ansi from cpp flags Message-ID: <20230212150157.x34qe5fjubdp5m2e@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-8-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-8-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:38 +0300, a ecrit: > Since GNU Mach commit d30481122a5d24ad6b921062f93b9172ef922fc3, > i386/machine_types.defs defines types based on defined(__x86_64__). > Supressing the built-in macro definitions will now result in the wrong > type being silently selected. > > -undef was initially introduced in commit > 78b6a7665db7b2eae367e17102821cbdca231d19 without much of an explanation. > -ansi was introduced in commit 6940fb91859e46b2e96a331a029f2dc2a0ee51c9 > "to avoid -Di386=1 and the like". > > Since glibc has been using MIG with CPP set to a custom GCC invocation > which did *not* use either flag, it appears that everything works well > enough even without them. On the other hand, not having __x86_64__ > defined most definetely causes issues for anything that does not set a > custom CPP when invoking MIG (i.e., most users). Other built-in > definitions could be used in the future in a similar way (e.g. on other > architectures); it's really more of a coincidence that they have not > been used until now, and things kept working with -undef. That looks alright to me. Flavior, what do you think about it? > --- > mig.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mig.in b/mig.in > index 63e0269..94fd500 100644 > --- a/mig.in > +++ b/mig.in > @@ -38,7 +38,7 @@ migcom=${MIGDIR-$libexecdir}/${MIGCOM-@MIGCOM@} > # The expansion of TARGET_CC might refer to ${CC}, so make sure it is defined. > default_cc="@CC@" > CC="${CC-${default_cc}}" > -default_cpp="@TARGET_CC@ -E -x c -undef -ansi" > +default_cpp="@TARGET_CC@ -E -x c" > cpp="${CPP-${default_cpp}}" > > cppflags= > -- > 2.39.1