]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix
authorLiming Gao <liming.gao@intel.com>
Mon, 22 Aug 2016 06:32:23 +0000 (14:32 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 23 Aug 2016 02:25:04 +0000 (10:25 +0800)
To avoid the conflict with the default GCC flag name, BUILD_ prefix is added.

Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
BaseTools/Source/C/Makefiles/footer.makefile
BaseTools/Source/C/Makefiles/header.makefile
BaseTools/Source/C/VfrCompile/GNUmakefile

index c3d80204af2616674d7b0d1fd8e5eb625c027d3b..216ae418f8d926ec10bda1c69091bfba42761040 100644 (file)
@@ -21,16 +21,16 @@ install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY)
        cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)\r
 \r
 $(LIBRARY): $(OBJECTS) \r
        cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)\r
 \r
 $(LIBRARY): $(OBJECTS) \r
-       $(AR) crs $@ $^\r
+       $(BUILD_AR) crs $@ $^\r
 \r
 %.o : %.c \r
 \r
 %.o : %.c \r
-       $(CC)  -c $(CFLAGS) $(CPPFLAGS) $< -o $@\r
+       $(BUILD_CC)  -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@\r
 \r
 %.o : %.S\r
 \r
 %.o : %.S\r
-       $(AS) -c $(ASFLAGS) $< -o $@\r
+       $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@\r
 \r
 %.o : %.cpp\r
 \r
 %.o : %.cpp\r
-       $(CXX)  -c $(CPPFLAGS) $< -o $@\r
+       $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@\r
 \r
 .PHONY: clean\r
 clean:\r
 \r
 .PHONY: clean\r
 clean:\r
index 09d2bff0e03584279f917e61c6ea10831bff0add..5e79f31299cfd3ff9cd560d9580d16b37b39bbb5 100644 (file)
@@ -6,7 +6,7 @@
 # ARCH = ia64 or IA64 for IA64 build\r
 # ARCH = Arm or ARM for ARM build\r
 #\r
 # ARCH = ia64 or IA64 for IA64 build\r
 # ARCH = Arm or ARM for ARM build\r
 #\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.    The full text of the license may be found at\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.    The full text of the license may be found at\r
@@ -21,12 +21,12 @@ CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
 LINUX:=$(findstring Linux, $(shell uname -s))\r
 DARWIN:=$(findstring Darwin, $(shell uname -s))\r
 \r
 LINUX:=$(findstring Linux, $(shell uname -s))\r
 DARWIN:=$(findstring Darwin, $(shell uname -s))\r
 \r
-CC ?= gcc\r
-CXX ?= g++\r
-AS ?= gcc\r
-AR ?= ar\r
-LD ?= ld\r
-LINKER ?= $(CC)\r
+BUILD_CC ?= gcc\r
+BUILD_CXX ?= g++\r
+BUILD_AS ?= gcc\r
+BUILD_AR ?= ar\r
+BUILD_LD ?= ld\r
+LINKER ?= $(BUILD_CC)\r
 ifeq ($(ARCH), IA32)\r
 ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/\r
 endif\r
 ifeq ($(ARCH), IA32)\r
 ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/\r
 endif\r
@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
 endif\r
 \r
 INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) \r
 endif\r
 \r
 INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) \r
-CPPFLAGS = $(INCLUDE)\r
+BUILD_CPPFLAGS = $(INCLUDE)\r
 ifeq ($(DARWIN),Darwin)\r
 # assume clang or clang compatible flags on OS X\r
 ifeq ($(DARWIN),Darwin)\r
 # assume clang or clang compatible flags on OS X\r
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g\r
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g\r
 else\r
 else\r
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g\r
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g\r
 endif\r
 endif\r
-LFLAGS =\r
+BUILD_LFLAGS =\r
 \r
 ifeq ($(ARCH), IA32)\r
 #\r
 \r
 ifeq ($(ARCH), IA32)\r
 #\r
@@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32)
 #  so only do this is uname -m returns i386.\r
 #\r
 ifeq ($(DARWIN),Darwin)\r
 #  so only do this is uname -m returns i386.\r
 #\r
 ifeq ($(DARWIN),Darwin)\r
-  CFLAGS   += -arch i386\r
-  CPPFLAGS += -arch i386\r
-  LFLAGS   += -arch i386\r
+  BUILD_CFLAGS   += -arch i386\r
+  BUILD_CPPFLAGS += -arch i386\r
+  BUILD_LFLAGS   += -arch i386\r
 endif\r
 endif\r
 \r
 endif\r
 endif\r
 \r
index e446d1462a9fa9e1782be46f93f95d4d1542732e..e2d432114dbc5d852abf95b8d53b22bb9eaa925a 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # GNU/Linux makefile for 'VfrCompile' module build.\r
 #\r
 ## @file\r
 # GNU/Linux makefile for 'VfrCompile' module build.\r
 #\r
-# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -24,7 +24,7 @@ TOOL_INCLUDE = -I Pccts/h
 OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \\r
           VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o\r
 \r
 OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \\r
           VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o\r
 \r
-VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)\r
+VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)\r
 \r
 LINKER = $(CXX)\r
 \r
 \r
 LINKER = $(CXX)\r
 \r