From patchwork Fri Jan 14 12:40:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 50026 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7857386EC3C for ; Fri, 14 Jan 2022 12:42:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7857386EC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1642164122; bh=ZCVwKnV0qA8k7S3Gg34oS87MGXvrJ3iequ6YiM9YdMU=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=nNmMBTyiGv6Yf7iqLkQoUfycI5nsDYrKOhRG2russ9DyULVw30xadPSgGVXluLZhh BnzdzZ8IjbjXlHDsXQ//WqxUUfOiLwBT6/iFsGa8t7IDlAhaGKcFIFX3pzk0MOv7Mz 6QcH1dB4voK0So22avQFwszdE3kvz6mZxm6wQ+YI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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) 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 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-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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. Reviewed-by: H.J. Lu --- 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)