From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 96A4E386EC3C for ; Fri, 14 Jan 2022 12:40:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96A4E386EC3C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-GuwnMyaEO46pE1pImQQ_bA-1; Fri, 14 Jan 2022 07:40:24 -0500 X-MC-Unique: GuwnMyaEO46pE1pImQQ_bA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E78C485B663 for ; Fri, 14 Jan 2022 12:40:23 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B2DD7B9ED for ; Fri, 14 Jan 2022 12:40:23 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 2/7] Generate gcc-macros.h In-Reply-To: References: X-From-Line: 589769aee82434f370de47d9746aec521aab1f46 Mon Sep 17 00:00:00 2001 Message-Id: <589769aee82434f370de47d9746aec521aab1f46.1642162312.git.fweimer@redhat.com> Date: Fri, 14 Jan 2022 13:40:21 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Fri, 14 Jan 2022 12:40:29 -0000 The file can be used to check the effect of the default compiler flags on code generation even in areas of the build that uses non-default compiler flags. --- Makeconfig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makeconfig b/Makeconfig index 9b6fc6b08f..2e79077343 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1202,6 +1202,15 @@ $(common-objpfx)dl-tunable-list.stmp: \ touch $@ endif +# Dump the GCC macros used by the default compiler flags to a header +# file, so that they can be inspected when using different compiler +# flags. Add the GCCMACRO prefix to make these macro names unique. +$(common-objpfx)gcc-macros.h.in: $(common-objpfx)config.status + $(CC) $(CFLAGS) $(CPPFLAGS) -E -dM -x c -o $@ /dev/null +$(common-objpfx)gcc-macros.h: $(common-objpfx)gcc-macros.h.in + sed 's/^#define /#define GCCMACRO/' < $< > $@ +before-compile += $(common-objpfx)gcc-macros.h + # Generate version maps, but wait until sysdep-subdirs is known ifeq ($(sysd-sorted-done),t) ifeq ($(build-shared),yes) -- 2.34.1