From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by sourceware.org (Postfix) with ESMTPS id 9EFCA3858D1E for ; Sun, 12 Feb 2023 18:43:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9EFCA3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb2a.google.com with SMTP id 139so10545064ybe.3 for ; Sun, 12 Feb 2023 10:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1VupwKzQ0FKzoctA0u+jdMvSjECrB5bnEKgrOzVKYcg=; b=TuV2m64LNS1ObdtJJsoN/IQBbWJ5d9YE322X8+tZ+JvtqJ8BmHsunlJ8DHtP/1tn4A inQ+Y9eI3qN8o5Livpt4mnQbZ8qVwxof3LhASb8ktm8JVfeZ6TnlAintCj8yQZ7jKws2 t5geUHqUqc7ZcwaURIfNp+kghQ88xX/hiKrBR2FqBYPAjO8O8vNHdKsB0qXgZ7UINKfk QGWSvHsqYG2VB7w2a4o6ZaB0GfoXLRZaLBZeUVbb4I9X8jDAgNsofO+61U9VEzI9SSr9 HwZM6bGqFklT2OteDXAnIBoy5bNU8WlIid/m+GrPB5pqSCm8tB/CIoGWFcOQEmCoqb3z twRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1VupwKzQ0FKzoctA0u+jdMvSjECrB5bnEKgrOzVKYcg=; b=Pm9vU8De2z8y5ZKfxyZNzvW9ODoiatqEi98ssyKc6PD7ZaNDAyA7ZpPkl9szpvWccJ tprUEPFijvemtso9Bf1Eb7ALERcP/VJtbwa4ifrpXp2y7dJwc3bPIfyw5b7CW78JRtHY v1Fs20oxP1W6iQo4z8qbBoNnl+/mzF6q1P+2+OXQ2t4zpCDi7BeFc6AMRyrd9aRwzfZH UiYnbBbYu/38cjKkcKlKFvNxnEjASq/57j+1vFF7AaTFnITUHjcXtBPGqUxT3+sRPJHj 2hG4x6/SQf/LPJRVtSjayuBa1HpJEQgsumSxhzGC9EZDmdP3dJckeXiyi28E2kbuIjCx o9rA== X-Gm-Message-State: AO0yUKUTRLjdPFCRPmvrMJh6ZqgA44yDk8yeiqgLCob/5bWsOuxpeKbY xVnKPrcE7BN0JFFhwDbX/K2HsF8Brk7rGiphkA== X-Google-Smtp-Source: AK7set9OyDUFd6THZgm8pqly6Ug35lsA+v4vpoFQ2la/ipDn+JcQSffv3OiKLXPZFBIcOCWem+ryaR3CF3/3JJAHmsc= X-Received: by 2002:a5b:5cd:0:b0:8cc:51c3:fe04 with SMTP id w13-20020a5b05cd000000b008cc51c3fe04mr1224166ybp.240.1676227411522; Sun, 12 Feb 2023 10:43:31 -0800 (PST) MIME-Version: 1.0 References: <20230212111044.610942-1-bugaevc@gmail.com> <20230212111044.610942-8-bugaevc@gmail.com> <20230212150157.x34qe5fjubdp5m2e@begin> In-Reply-To: <20230212150157.x34qe5fjubdp5m2e@begin> From: =?UTF-8?B?RmzDoXZpbyBDcnV6?= Date: Sun, 12 Feb 2023 13:43:20 -0500 Message-ID: Subject: Re: [RFC PATCH mig 7/12] Drop -undef -ansi from cpp flags To: Sergey Bugaev , Samuel Thibault Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Content-Type: multipart/alternative; boundary="0000000000006d3ad605f4851bea" X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,KAM_LOTSOFHASH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: --0000000000006d3ad605f4851bea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Feb 12, 2023 at 10:02 AM Samuel Thibault wrote: > Sergey Bugaev, le dim. 12 f=C3=A9vr. 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=3D1 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? > Seems fine to me. > > > --- > > 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=3D${MIGDIR-$libexecdir}/${MIGCOM-@MIGCOM@} > > # The expansion of TARGET_CC might refer to ${CC}, so make sure it is > defined. > > default_cc=3D"@CC@" > > CC=3D"${CC-${default_cc}}" > > -default_cpp=3D"@TARGET_CC@ -E -x c -undef -ansi" > > +default_cpp=3D"@TARGET_CC@ -E -x c" > > cpp=3D"${CPP-${default_cpp}}" > > > > cppflags=3D > > -- > > 2.39.1 > --0000000000006d3ad605f4851bea--