From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532565861513691.5942007240578; Wed, 25 Jul 2018 17:44:21 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2387E210C2798; Wed, 25 Jul 2018 17:44:21 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6E38B210C278C for ; Wed, 25 Jul 2018 17:44:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C3C4DC41; Thu, 26 Jul 2018 00:44:19 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDAC551E4; Thu, 26 Jul 2018 00:44:18 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:10 +0200 Message-Id: <20180726004415.13381-2-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 26 Jul 2018 00:44:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 26 Jul 2018 00:44:19 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 1/6] BaseTools/footer.makefile: expand BUILD_CFLAGS last for C files too X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" BUILD_CPPFLAGS should be expanded before BUILD_CFLAGS. (The rule for C++ source files already does this, with BUILD_CPPFLAGS and BUILD_CXXFLAGS.) This patch doesn't change behavior. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/Makefiles/footer.makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Makefiles/footer.makefile b/BaseTools/Sourc= e/C/Makefiles/footer.makefile index 0926aa964547..5bda9e4e36d5 100644 --- a/BaseTools/Source/C/Makefiles/footer.makefile +++ b/BaseTools/Source/C/Makefiles/footer.makefile @@ -24,7 +24,7 @@ $(LIBRARY): $(OBJECTS) $(BUILD_AR) crs $@ $^ =20 %.o : %.c=20 - $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) $< -o $@ =20 %.o : %.cpp $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $(BUILD_CXXFLAGS) $< -o $@ --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532565865310906.7953465558843; Wed, 25 Jul 2018 17:44:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 78FB1210C27A2; Wed, 25 Jul 2018 17:44:23 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 45662210C279A for ; Wed, 25 Jul 2018 17:44:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88C23DC43; Thu, 26 Jul 2018 00:44:20 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7B2B1C59C; Thu, 26 Jul 2018 00:44:19 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:11 +0200 Message-Id: <20180726004415.13381-3-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 26 Jul 2018 00:44:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 26 Jul 2018 00:44:20 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 2/6] BaseTools/header.makefile: remove "-c" from BUILD_CFLAGS X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Option "-c" is a mode selection flag (choosing between compiling and linking); it should not be in BUILD_CFLAGS, which applies only to compiling anyway. The compilation rule for C source files, in "footer.makefile", already includes "-c" -- currently we have double "-c" options. This patch doesn't change behavior. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/Makefiles/header.makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index db436773cf40..08421ba24cd9 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -71,9 +71,9 @@ INCLUDE =3D $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)= /Include/Common -I $(MAKE BUILD_CPPFLAGS =3D $(INCLUDE) -O2 ifeq ($(DARWIN),Darwin) # assume clang or clang compatible flags on OS X -BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g +BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g else -BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused= -result -nostdlib -c -g +BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-stringop-truncation -Wno-restrict -Wno-unused= -result -nostdlib -g endif BUILD_LFLAGS =3D BUILD_CXXFLAGS =3D -Wno-unused-result --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 153256586822177.86872222229977; Wed, 25 Jul 2018 17:44:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A84F3210C27A5; Wed, 25 Jul 2018 17:44:23 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C7A4210C279C for ; Wed, 25 Jul 2018 17:44:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70D068182D0C; Thu, 26 Jul 2018 00:44:21 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id C307751E4; Thu, 26 Jul 2018 00:44:20 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:12 +0200 Message-Id: <20180726004415.13381-4-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 26 Jul 2018 00:44:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 26 Jul 2018 00:44:21 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 3/6] BaseTools/Source/C: split "-O2" to BUILD_OPTFLAGS X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The option "-O2" is not a preprocessor flag, but a code generation (compilation) flag. Move it from BUILD_CPPFLAGS to BUILD_CFLAGS and BUILD_CXXFLAGS. Because "VfrCompile/GNUmakefile" uses "-O2" through BUILD_CPPFLAGS, and because it doesn't use BUILD_CXXFLAGS, we have to introduce BUILD_OPTFLAGS separately, so that "VfrCompile/GNUmakefile" can continue using just this flag. This patch doesn't change behavior. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/Makefiles/header.makefile | 6 +++++- BaseTools/Source/C/VfrCompile/GNUmakefile | 11 +++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index 08421ba24cd9..498c6cf48b4a 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -68,7 +68,8 @@ $(error Bad HOST_ARCH) endif =20 INCLUDE =3D $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -= I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROO= T)/Common/ -I .. -I . $(ARCH_INCLUDE)=20 -BUILD_CPPFLAGS =3D $(INCLUDE) -O2 +BUILD_CPPFLAGS =3D $(INCLUDE) +BUILD_OPTFLAGS =3D -O2 ifeq ($(DARWIN),Darwin) # assume clang or clang compatible flags on OS X BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g @@ -91,6 +92,9 @@ ifeq ($(DARWIN),Darwin) endif endif =20 +# keep BUILD_OPTFLAGS last +BUILD_CFLAGS +=3D $(BUILD_OPTFLAGS) +BUILD_CXXFLAGS +=3D $(BUILD_OPTFLAGS) =20 .PHONY: all .PHONY: install diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C= /VfrCompile/GNUmakefile index c4ec61aa6c86..bbe562cbc54f 100644 --- a/BaseTools/Source/C/VfrCompile/GNUmakefile +++ b/BaseTools/Source/C/VfrCompile/GNUmakefile @@ -25,6 +25,9 @@ OBJECTS =3D AParser.o DLexerBase.o ATokenBuffer.o EfiVfrP= arser.o VfrLexer.o VfrSyn =20 VFR_CPPFLAGS =3D -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS) =20 +# keep BUILD_OPTFLAGS last +VFR_CXXFLAGS =3D $(BUILD_OPTFLAGS) + LINKER =3D $(BUILD_CXX) =20 EXTRA_CLEAN_OBJECTS =3D EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrT= okens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h @@ -58,16 +61,16 @@ Pccts/dlg/dlg: BIN_DIR=3D'.' $(MAKE) -C Pccts/dlg =20 ATokenBuffer.o: Pccts/h/ATokenBuffer.cpp - $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@ + $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $(VFR_CXXFLAGS) $? -o $@ =20 DLexerBase.o: Pccts/h/DLexerBase.cpp - $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@ + $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $(VFR_CXXFLAGS) $? -o $@ =20 AParser.o: Pccts/h/AParser.cpp - $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@ + $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $(VFR_CXXFLAGS) $? -o $@ =20 VfrSyntax.o: VfrSyntax.cpp - $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $? -o $@ + $(BUILD_CXX) -c $(VFR_CPPFLAGS) $(INC) $(VFR_CXXFLAGS) $? -o $@ =09 clean: localClean =20 --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532565871262198.70231978715015; Wed, 25 Jul 2018 17:44:31 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D1D9821CAD9B2; Wed, 25 Jul 2018 17:44:23 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1AF0B210C279C for ; Wed, 25 Jul 2018 17:44:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A72D40216E3; Thu, 26 Jul 2018 00:44:22 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC50751E4; Thu, 26 Jul 2018 00:44:21 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:13 +0200 Message-Id: <20180726004415.13381-5-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 00:44:22 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 00:44:22 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 4/6] BaseTools/Pccts: clean up antlr and dlg makefiles X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" (1) "-I" and "-D" options are for the preprocessor; move them to BUILD_CPPFLAGS. (This unifies BUILD_CPPFLAGS between both makefiles.) (2) COTHER is never set, drop it from "antlr". (This unifies BUILD_CFLAGS between both makefiles, as COPT.) (3) For linking "antlr" and "dlg", both BUILD_CFLAGS and BUILD_CPPFLAGS are useless, so drop BUILD_CFLAGS, and don't add BUILD_CPPFLAGS. (4) For compiling C source files: (4a) Move the "-c" mode selector to the front. (4b) Expand both BUILD_CPPFLAGS and BUILD_CFLAGS, in this order. (This results in COPT being expanded last.) (4c) Turn the source file operand into the last argument on the command line. The only change in behavior from this patch is that the following options disappear from the link-editing steps (due to (3)): -O -I. -I../support/set -I../h -DUSER_ZZSYN -DZZLEXBUFSIZE=3D65536 However these options made no difference for linking in the first place. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 13 ++++++++----- BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile | 19 +++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile b/BaseTools= /Source/C/VfrCompile/Pccts/antlr/makefile index 8f2cc78c5947..94e6e7292309 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile @@ -170,8 +170,11 @@ ANTLR=3D${BIN_DIR}/antlr DLG=3D${BIN_DIR}/dlg OBJ_EXT=3Do OUT_OBJ =3D -o -BUILD_CFLAGS=3D $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) -= DZZLEXBUFSIZE=3D65536 -BUILD_CPPFLAGS=3D + +# keep COPT last +BUILD_CFLAGS=3D$(COPT) + +BUILD_CPPFLAGS=3D-I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=3D6= 5536 # # SGI Users, use this CFLAGS # @@ -180,7 +183,7 @@ OBJ=3Dantlr.o scan.o err.o bits.o build.o fset2.o fset.= o gen.o \ globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.= o fcache.o =20 $(BIN_DIR)/antlr : $(OBJ) $(SRC) - $(BUILD_CC) $(BUILD_CFLAGS) -o $(BIN_DIR)/antlr $(OBJ) + $(BUILD_CC) -o $(BIN_DIR)/antlr $(OBJ) =20 # what files does PCCTS generate (both ANTLR and DLG) PCCTS_GEN=3Dantlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h rem= ap.h @@ -203,10 +206,10 @@ scan.o : scan.c mode.h tokens.h # $(DLG) -C2 parser.dlg scan.c =20 set.o : $(SET)/set.c - $(BUILD_CC) $(BUILD_CFLAGS) -c -o set.o $(SET)/set.c + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -o set.o $(SET)/set.c =20 %.o : %.c=20 - $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -o $@ $< =20 # # ****** These next targets are common to UNIX and PC world ******** diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile b/BaseTools/S= ource/C/VfrCompile/Pccts/dlg/makefile index b3a34d3b4613..f4babb4b0790 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile @@ -118,15 +118,18 @@ BUILD_CC?=3Dcc COPT=3D-O ANTLR=3D${BIN_DIR}/antlr DLG=3D${BIN_DIR}/dlg -BUILD_CFLAGS=3D $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFS= IZE=3D65536 -BUILD_CPPFLAGS=3D + +# keep COPT last +BUILD_CFLAGS=3D$(COPT) + +BUILD_CPPFLAGS=3D-I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=3D6= 5536 OBJ_EXT=3Do OUT_OBJ =3D -o OBJ =3D dlg_p.o dlg_a.o main.o err.o set.o support.o output.o \ relabel.o automata.o =20 $(BIN_DIR)/dlg : $(OBJ) $(SRC) - $(BUILD_CC) $(BUILD_CFLAGS) -o $(BIN_DIR)/dlg $(OBJ) + $(BUILD_CC) -o $(BIN_DIR)/dlg $(OBJ) =20 SRC =3D dlg_p.c dlg_a.c main.c err.c $(SET)/set.c support.c output.c \ relabel.c automata.c @@ -138,19 +141,19 @@ SRC =3D dlg_p.c dlg_a.c main.c err.c $(SET)/set.c sup= port.c output.c \ # $(DLG) -C2 parser.dlg dlg_a.c =20 dlg_p.$(OBJ_EXT) : dlg_p.c dlg.h tokens.h mode.h - $(BUILD_CC) $(BUILD_CFLAGS) -c dlg_p.c + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) dlg_p.c =20 dlg_a.$(OBJ_EXT) : dlg_a.c dlg.h tokens.h mode.h - $(BUILD_CC) $(BUILD_CFLAGS) -c dlg_a.c + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) dlg_a.c =20 main.$(OBJ_EXT) : main.c dlg.h - $(BUILD_CC) $(BUILD_CFLAGS) -c main.c + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) main.c =20 set.$(OBJ_EXT) : $(SET)/set.c - $(BUILD_CC) -c $(BUILD_CFLAGS) $(SET)/set.c + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) $(SET)/set.c =20 %.o : %.c=20 - $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ + $(BUILD_CC) -c $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -o $@ $< =20 lint: lint *.c --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532565874946781.0094756242718; Wed, 25 Jul 2018 17:44:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0BBB6210C27A8; Wed, 25 Jul 2018 17:44:26 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EB49621CB74A4 for ; Wed, 25 Jul 2018 17:44:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 429FE40216E4; Thu, 26 Jul 2018 00:44:23 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9542751E4; Thu, 26 Jul 2018 00:44:22 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:14 +0200 Message-Id: <20180726004415.13381-6-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 00:44:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 26 Jul 2018 00:44:23 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 5/6] BaseTools/Source/C: take EXTRA_OPTFLAGS from the caller X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow the caller of the top-level makefile either to set EXTRA_OPTFLAGS in the environment or to pass EXTRA_OPTFLAGS as a macro definition on the command line. EXTRA_OPTFLAGS extends (and potentially overrides) default C compilation flags set in the makefiles. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/Makefiles/header.makefile | 5 ++++- BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 5 ++++- BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index 498c6cf48b4a..1b4cad5497ec 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -69,7 +69,10 @@ endif =20 INCLUDE =3D $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -= I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROO= T)/Common/ -I .. -I . $(ARCH_INCLUDE)=20 BUILD_CPPFLAGS =3D $(INCLUDE) -BUILD_OPTFLAGS =3D -O2 + +# keep EXTRA_OPTFLAGS last +BUILD_OPTFLAGS =3D -O2 $(EXTRA_OPTFLAGS) + ifeq ($(DARWIN),Darwin) # assume clang or clang compatible flags on OS X BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno= -deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile b/BaseTools= /Source/C/VfrCompile/Pccts/antlr/makefile index 94e6e7292309..cefe6a078b39 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile @@ -165,7 +165,10 @@ PCCTS_H=3D../h # UNIX (default) # BUILD_CC?=3Dgcc -COPT=3D-O + +# keep EXTRA_OPTFLAGS last +COPT=3D-O $(EXTRA_OPTFLAGS) + ANTLR=3D${BIN_DIR}/antlr DLG=3D${BIN_DIR}/dlg OBJ_EXT=3Do diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile b/BaseTools/S= ource/C/VfrCompile/Pccts/dlg/makefile index f4babb4b0790..a9d1771d4c5b 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile @@ -115,7 +115,10 @@ PCCTS_H=3D../h # UNIX # BUILD_CC?=3Dcc -COPT=3D-O + +# keep EXTRA_OPTFLAGS last +COPT=3D-O $(EXTRA_OPTFLAGS) + ANTLR=3D${BIN_DIR}/antlr DLG=3D${BIN_DIR}/dlg =20 --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Mon Apr 29 12:40:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532565878864300.73650201311966; Wed, 25 Jul 2018 17:44:38 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 39514210C27AB; Wed, 25 Jul 2018 17:44:26 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D6970210C27A0 for ; Wed, 25 Jul 2018 17:44:24 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C9DF401DEA9; Thu, 26 Jul 2018 00:44:24 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-122-38.rdu2.redhat.com [10.10.122.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E25D1C59C; Thu, 26 Jul 2018 00:44:23 +0000 (UTC) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 26 Jul 2018 02:44:15 +0200 Message-Id: <20180726004415.13381-7-lersek@redhat.com> In-Reply-To: <20180726004415.13381-1-lersek@redhat.com> References: <20180726004415.13381-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 26 Jul 2018 00:44:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 26 Jul 2018 00:44:24 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: [edk2] [PATCH 6/6] BaseTools/Source/C: take EXTRA_LDFLAGS from the caller X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow the caller of the top-level makefile either to set EXTRA_LDFLAGS in the environment or to pass EXTRA_LDFLAGS as a macro definition on the command line. EXTRA_LDFLAGS extends (and potentially overrides) default link-editing flags set in the makefiles. Cc: Liming Gao Cc: Yonghong Zhu Ref: https://bugzilla.redhat.com/show_bug.cgi?id=3D1540244 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- BaseTools/Source/C/Makefiles/header.makefile | 3 +++ BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 6 +++++- BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index 1b4cad5497ec..7f283d6464a8 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -99,6 +99,9 @@ endif BUILD_CFLAGS +=3D $(BUILD_OPTFLAGS) BUILD_CXXFLAGS +=3D $(BUILD_OPTFLAGS) =20 +# keep EXTRA_LDFLAGS last +BUILD_LFLAGS +=3D $(EXTRA_LDFLAGS) + .PHONY: all .PHONY: install .PHONY: clean diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile b/BaseTools= /Source/C/VfrCompile/Pccts/antlr/makefile index cefe6a078b39..68897cb81e20 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile @@ -178,6 +178,10 @@ OUT_OBJ =3D -o BUILD_CFLAGS=3D$(COPT) =20 BUILD_CPPFLAGS=3D-I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=3D6= 5536 + +# keep EXTRA_LDFLAGS last +BUILD_LFLAGS =3D $(EXTRA_LDFLAGS) + # # SGI Users, use this CFLAGS # @@ -186,7 +190,7 @@ OBJ=3Dantlr.o scan.o err.o bits.o build.o fset2.o fset.= o gen.o \ globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.= o fcache.o =20 $(BIN_DIR)/antlr : $(OBJ) $(SRC) - $(BUILD_CC) -o $(BIN_DIR)/antlr $(OBJ) + $(BUILD_CC) -o $(BIN_DIR)/antlr $(BUILD_LFLAGS) $(OBJ) =20 # what files does PCCTS generate (both ANTLR and DLG) PCCTS_GEN=3Dantlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h rem= ap.h diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile b/BaseTools/S= ource/C/VfrCompile/Pccts/dlg/makefile index a9d1771d4c5b..9a185b4b9c7a 100644 --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile @@ -126,13 +126,17 @@ DLG=3D${BIN_DIR}/dlg BUILD_CFLAGS=3D$(COPT) =20 BUILD_CPPFLAGS=3D-I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -DZZLEXBUFSIZE=3D6= 5536 + +# keep EXTRA_LDFLAGS last +BUILD_LFLAGS =3D $(EXTRA_LDFLAGS) + OBJ_EXT=3Do OUT_OBJ =3D -o OBJ =3D dlg_p.o dlg_a.o main.o err.o set.o support.o output.o \ relabel.o automata.o =20 $(BIN_DIR)/dlg : $(OBJ) $(SRC) - $(BUILD_CC) -o $(BIN_DIR)/dlg $(OBJ) + $(BUILD_CC) -o $(BIN_DIR)/dlg $(BUILD_LFLAGS) $(OBJ) =20 SRC =3D dlg_p.c dlg_a.c main.c err.c $(SET)/set.c support.c output.c \ relabel.c automata.c --=20 2.14.1.3.gb7cf6e02401b _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel