From patchwork Sun Feb 12 11:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 1741014 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=cf96o+kV; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PF4YY43dxz23hX for ; Sun, 12 Feb 2023 22:12:01 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77CAF3847C68 for ; Sun, 12 Feb 2023 11:11:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77CAF3847C68 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676200319; bh=dSSYXh14yYiTbCQ8RbdmYyIT1VRWj4s8kvUy0Oe1lyo=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cf96o+kV4vw0pAn7TE4KPEPrw8KhW9Hqt3SvgoALcQhh19Gu3Q6dvcCOhLnyr/vrN 0K3n8zICAMlejVYV9dHgkoNtIMnnyVpkH2XvGrQfTXYYp3eVlvL8WJS7X8xWpO1FRr Fcdi/zlt6T65i9XRRnfgGLfZjqJu3v+EN6EEC65E= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 Received: by mail-ed1-x52f.google.com with SMTP id cq19so6683127edb.5 for ; Sun, 12 Feb 2023 03:11:20 -0800 (PST) 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) To: bug-hurd@gnu.org, libc-alpha@sourceware.org Cc: =?utf-8?q?Fl=C3=A1vio_Cruz?= , 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 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" 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=