From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 011321A1E10 for ; Mon, 22 Aug 2016 17:12:17 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 22 Aug 2016 17:12:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,562,1464678000"; d="scan'208";a="713859" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 22 Aug 2016 17:12:16 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 17:12:17 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 17:12:16 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Tue, 23 Aug 2016 08:12:14 +0800 From: "Zhu, Yonghong" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix Thread-Index: AQHR/D7/59cWsn/5tEyrUqnjv0TXW6BVrXBA Date: Tue, 23 Aug 2016 00:12:14 +0000 Message-ID: References: <1471847543-24676-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1471847543-24676-1-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 00:12:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Gao, Liming=20 Sent: Monday, August 22, 2016 2:32 PM To: edk2-devel@lists.01.org Cc: Mudusuru, Giri P ; Zhu, Yonghong Subject: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific on= e with BUILD_ prefix To avoid the conflict with the default GCC flag name, BUILD_ prefix is adde= d. Cc: Giri P Mudusuru Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- BaseTools/Source/C/Makefiles/footer.makefile | 8 ++++---- BaseTools/Sour= ce/C/Makefiles/header.makefile | 28 ++++++++++++++-------------- BaseTools/Source/C/VfrCompile/GNUmakefile | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/footer.makefile b/BaseTools/Sourc= e/C/Makefiles/footer.makefile index c3d8020..216ae41 100644 --- a/BaseTools/Source/C/Makefiles/footer.makefile +++ b/BaseTools/Source/C/Makefiles/footer.makefile @@ -21,16 +21,16 @@ install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY) cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH) =20 $(LIBRARY): $(OBJECTS)=20 - $(AR) crs $@ $^ + $(BUILD_AR) crs $@ $^ =20 %.o : %.c=20 - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ + $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ =20 %.o : %.S - $(AS) -c $(ASFLAGS) $< -o $@ + $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@ =20 %.o : %.cpp - $(CXX) -c $(CPPFLAGS) $< -o $@ + $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@ =20 .PHONY: clean clean: diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Sourc= e/C/Makefiles/header.makefile index 09d2bff..5e79f31 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -6,7 +6,7 @@ # ARCH =3D ia64 or IA64 for IA64 build # ARCH =3D Arm or ARM for ARM build # -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may= be found at @@ -21,12 +21,12 @@ CYGWIN:=3D$(findstring CYGWIN, $(shell uname -s)) LINU= X:=3D$(findstring Linux, $(shell uname -s)) DARWIN:=3D$(findstring Darwin,= $(shell uname -s)) =20 -CC ?=3D gcc -CXX ?=3D g++ -AS ?=3D gcc -AR ?=3D ar -LD ?=3D ld -LINKER ?=3D $(CC) +BUILD_CC ?=3D gcc +BUILD_CXX ?=3D g++ +BUILD_AS ?=3D gcc +BUILD_AR ?=3D ar +BUILD_LD ?=3D ld +LINKER ?=3D $(BUILD_CC) ifeq ($(ARCH), IA32) ARCH_INCLUDE =3D -I $(MAKEROOT)/Include/Ia32/ endif @@ -44,14 +44,14 @@ A= RCH_INCLUDE =3D -I $(MAKEROOT)/Include/AArch64/ 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) -CPPFLAGS =3D $(INCLUDE) +BUILD_CPPFLAGS =3D $(INCLUDE) ifeq ($(DARWIN),Darwin) # assume clang or clang compatible flags on OS X -CFLAGS =3D -MD -fshort-w= char -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-s= elf-assign -nostdlib -c -g +BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror=20 +-Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g else -CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-depre= cated-declarations -nostdlib -c -g +BUILD_CFLAGS =3D -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror=20 +-Wno-deprecated-declarations -nostdlib -c -g endif -LFLAGS =3D +BUILD_LFLAGS =3D =20 ifeq ($(ARCH), IA32) # @@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32) # so only do this is uname -m returns i386. # ifeq ($(DARWIN),Darwin) - CFLAGS +=3D -arch i386 - CPPFLAGS +=3D -arch i386 - LFLAGS +=3D -arch i386 + BUILD_CFLAGS +=3D -arch i386 + BUILD_CPPFLAGS +=3D -arch i386 + BUILD_LFLAGS +=3D -arch i386 endif endif =20 diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C= /VfrCompile/GNUmakefile index e446d14..e2d4321 100644 --- a/BaseTools/Source/C/VfrCompile/GNUmakefile +++ b/BaseTools/Source/C/VfrCompile/GNUmakefile @@ -1,7 +1,7 @@ ## @file # GNU/Linux makefile for 'VfrCompile' module build. # -# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompani= es this distribution. The full text of the license may be found at @@ -24,= 7 +24,7 @@ TOOL_INCLUDE =3D -I Pccts/h OBJECTS =3D AParser.o DLexerBase.o = ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \ VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o =20 -VFR_CPPFLAGS =3D -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) +VFR_CPPFLAGS =3D -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS) =20 LINKER =3D $(CXX) =20 -- 2.8.0.windows.1