From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id 86CA03857C45 for ; Sun, 12 Feb 2023 11:11:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86CA03857C45 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-ed1-x52f.google.com with SMTP id cq19so6683127edb.5 for ; Sun, 12 Feb 2023 03:11:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dSSYXh14yYiTbCQ8RbdmYyIT1VRWj4s8kvUy0Oe1lyo=; b=Fx4m/OSsgjVdCWhw578jIqbA7fomvlsEVzB+qfms+YJvZl2LDRsWobgTR9G/6Oh2B1 OPatHdqeUnMofw99nrriiUHEOqvYkdKJOfsOK0MZnYWmEHTsKkvE8vFWBQF18tTQcRvE bHro9jtqy538eOddngnukcIkticJHc19+vPXSFLORE9mqHI2a64ZCbjTQlhV8M+RraY1 7cfRZVid/H0czGhlQ7D8RBAhPcC0IBaliuEoAKB5rpvyBXPrs7bp+tBuUuDjWhaECiBN KH/LtU3eKaX+uLgRR2NWb2KISYB0gSBvB1XMLO1dFrPhSv/SdIfNVNtx+Zjk+cWCdLD9 sW2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dSSYXh14yYiTbCQ8RbdmYyIT1VRWj4s8kvUy0Oe1lyo=; b=dHxV+nTmkBc2matfg2pMfcXkbWWUX26CZEoLzQYhiDXsX/KJOX2MnufmCElEDn8+n4 Tz32kZn11wfjxshzflUlRKmkBLlCKZJnCgaWTsGuGFXLxB+UKt58vYfcOsBLqFSDR0xx qhQnxsfMCve+v9r6QFNGk2o162hfNEKfNOWzbZoybVe4pqgMgn/a/qisW0FYeDa8zpI5 bWGu6PlM5Q7Q0hjPLHPKawWsNYVv1BbBD6PyiNmJysE97U9uk/kHbZMEzduXqnOj4rBO i8VA4vNCOy/G3OxGbuMB+92lNUgyUhjImtsNUj1cU7YadMbBUF9+arQP8ZYwRswPWfvT NalQ== X-Gm-Message-State: AO0yUKXXxOPAtgaslvxlt6r5vOXsoekas0cvBCtqXdaDT1VROw0fmEwC EdjgnQRAygUhqXOU+7fm4QU= X-Google-Smtp-Source: AK7set93AzcQEz2TJZEEiy22xcc1QpYghDSkinrAIbvmxqN635UkHuUTL8pF8OsYCOW+8pdiMF+evg== X-Received: by 2002:a50:950e:0:b0:4a2:3637:5be2 with SMTP id u14-20020a50950e000000b004a236375be2mr22672801eda.39.1676200280139; Sun, 12 Feb 2023 03:11:20 -0800 (PST) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:2186:c463:9ced:e6fe]) by smtp.gmail.com with ESMTPSA id c61-20020a509fc3000000b004acbe0b36d2sm1266910edf.6.2023.02.12.03.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 03:11:19 -0800 (PST) From: Sergey Bugaev To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: =?UTF-8?q?Fl=C3=A1vio=20Cruz?= , Sergey Bugaev Subject: [RFC PATCH mig 7/12] Drop -undef -ansi from cpp flags Date: Sun, 12 Feb 2023 14:10:38 +0300 Message-Id: <20230212111044.610942-8-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230212111044.610942-1-bugaevc@gmail.com> References: <20230212111044.610942-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: 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. --- 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