* [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix
@ 2016-08-22 6:32 Liming Gao
2016-08-23 0:12 ` Zhu, Yonghong
2016-08-23 0:32 ` Mudusuru, Giri P
0 siblings, 2 replies; 3+ messages in thread
From: Liming Gao @ 2016-08-22 6:32 UTC (permalink / raw)
To: edk2-devel
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>
---
| 8 ++++----
| 28 ++++++++++++++--------------
BaseTools/Source/C/VfrCompile/GNUmakefile | 4 ++--
3 files changed, 20 insertions(+), 20 deletions(-)
--git a/BaseTools/Source/C/Makefiles/footer.makefile b/BaseTools/Source/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)
$(LIBRARY): $(OBJECTS)
- $(AR) crs $@ $^
+ $(BUILD_AR) crs $@ $^
%.o : %.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+ $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
%.o : %.S
- $(AS) -c $(ASFLAGS) $< -o $@
+ $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@
%.o : %.cpp
- $(CXX) -c $(CPPFLAGS) $< -o $@
+ $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@
.PHONY: clean
clean:
--git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/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 = ia64 or IA64 for IA64 build
# ARCH = Arm or ARM for ARM build
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available 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:=$(findstring CYGWIN, $(shell uname -s))
LINUX:=$(findstring Linux, $(shell uname -s))
DARWIN:=$(findstring Darwin, $(shell uname -s))
-CC ?= gcc
-CXX ?= g++
-AS ?= gcc
-AR ?= ar
-LD ?= ld
-LINKER ?= $(CC)
+BUILD_CC ?= gcc
+BUILD_CXX ?= g++
+BUILD_AS ?= gcc
+BUILD_AR ?= ar
+BUILD_LD ?= ld
+LINKER ?= $(BUILD_CC)
ifeq ($(ARCH), IA32)
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
endif
@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
endif
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
-CPPFLAGS = $(INCLUDE)
+BUILD_CPPFLAGS = $(INCLUDE)
ifeq ($(DARWIN),Darwin)
# assume clang or clang compatible flags on OS X
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g
else
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g
endif
-LFLAGS =
+BUILD_LFLAGS =
ifeq ($(ARCH), IA32)
#
@@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32)
# so only do this is uname -m returns i386.
#
ifeq ($(DARWIN),Darwin)
- CFLAGS += -arch i386
- CPPFLAGS += -arch i386
- LFLAGS += -arch i386
+ BUILD_CFLAGS += -arch i386
+ BUILD_CPPFLAGS += -arch i386
+ BUILD_LFLAGS += -arch i386
endif
endif
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.<BR>
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -24,7 +24,7 @@ TOOL_INCLUDE = -I Pccts/h
OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
-VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
+VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
LINKER = $(CXX)
--
2.8.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix
2016-08-22 6:32 [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix Liming Gao
@ 2016-08-23 0:12 ` Zhu, Yonghong
2016-08-23 0:32 ` Mudusuru, Giri P
1 sibling, 0 replies; 3+ messages in thread
From: Zhu, Yonghong @ 2016-08-23 0:12 UTC (permalink / raw)
To: Gao, Liming, edk2-devel@lists.01.org
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Best Regards,
Zhu Yonghong
-----Original Message-----
From: Gao, Liming
Sent: Monday, August 22, 2016 2:32 PM
To: edk2-devel@lists.01.org
Cc: Mudusuru, Giri P <giri.p.mudusuru@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix
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>
---
| 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/Source/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)
$(LIBRARY): $(OBJECTS)
- $(AR) crs $@ $^
+ $(BUILD_AR) crs $@ $^
%.o : %.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+ $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
%.o : %.S
- $(AS) -c $(ASFLAGS) $< -o $@
+ $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@
%.o : %.cpp
- $(CXX) -c $(CPPFLAGS) $< -o $@
+ $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@
.PHONY: clean
clean:
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/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 = ia64 or IA64 for IA64 build
# ARCH = Arm or ARM for ARM build
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2016, Intel Corporation. All rights
+reserved.<BR>
# This program and the accompanying materials # are licensed and made available 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:=$(findstring CYGWIN, $(shell uname -s)) LINUX:=$(findstring Linux, $(shell uname -s)) DARWIN:=$(findstring Darwin, $(shell uname -s))
-CC ?= gcc
-CXX ?= g++
-AS ?= gcc
-AR ?= ar
-LD ?= ld
-LINKER ?= $(CC)
+BUILD_CC ?= gcc
+BUILD_CXX ?= g++
+BUILD_AS ?= gcc
+BUILD_AR ?= ar
+BUILD_LD ?= ld
+LINKER ?= $(BUILD_CC)
ifeq ($(ARCH), IA32)
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/ endif @@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/ endif
INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) -CPPFLAGS = $(INCLUDE)
+BUILD_CPPFLAGS = $(INCLUDE)
ifeq ($(DARWIN),Darwin)
# assume clang or clang compatible flags on OS X -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
+-Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g
else
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g
+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror
+-Wno-deprecated-declarations -nostdlib -c -g
endif
-LFLAGS =
+BUILD_LFLAGS =
ifeq ($(ARCH), IA32)
#
@@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32)
# so only do this is uname -m returns i386.
#
ifeq ($(DARWIN),Darwin)
- CFLAGS += -arch i386
- CPPFLAGS += -arch i386
- LFLAGS += -arch i386
+ BUILD_CFLAGS += -arch i386
+ BUILD_CPPFLAGS += -arch i386
+ BUILD_LFLAGS += -arch i386
endif
endif
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.<BR>
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights
+reserved.<BR>
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -24,7 +24,7 @@ TOOL_INCLUDE = -I Pccts/h OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyntax.o \
VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
-VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
+VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
LINKER = $(CXX)
--
2.8.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix
2016-08-22 6:32 [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix Liming Gao
2016-08-23 0:12 ` Zhu, Yonghong
@ 2016-08-23 0:32 ` Mudusuru, Giri P
1 sibling, 0 replies; 3+ messages in thread
From: Mudusuru, Giri P @ 2016-08-23 0:32 UTC (permalink / raw)
To: Gao, Liming, edk2-devel@lists.01.org
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
> -----Original Message-----
> From: Gao, Liming
> Sent: Sunday, August 21, 2016 11:32 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudusuru@intel.com>; Zhu, Yonghong
> <yonghong.zhu@intel.com>
> Subject: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one
> with BUILD_ prefix
>
> 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>
> ---
> BaseTools/Source/C/Makefiles/footer.makefile | 8 ++++----
> BaseTools/Source/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/Source/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)
>
> $(LIBRARY): $(OBJECTS)
> - $(AR) crs $@ $^
> + $(BUILD_AR) crs $@ $^
>
> %.o : %.c
> - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
> + $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
>
> %.o : %.S
> - $(AS) -c $(ASFLAGS) $< -o $@
> + $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@
>
> %.o : %.cpp
> - $(CXX) -c $(CPPFLAGS) $< -o $@
> + $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@
>
> .PHONY: clean
> clean:
> diff --git a/BaseTools/Source/C/Makefiles/header.makefile
> b/BaseTools/Source/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 = ia64 or IA64 for IA64 build
> # ARCH = Arm or ARM for ARM build
> #
> -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
> # This program and the accompanying materials
> # are licensed and made available 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:=$(findstring CYGWIN, $(shell uname -s))
> LINUX:=$(findstring Linux, $(shell uname -s))
> DARWIN:=$(findstring Darwin, $(shell uname -s))
>
> -CC ?= gcc
> -CXX ?= g++
> -AS ?= gcc
> -AR ?= ar
> -LD ?= ld
> -LINKER ?= $(CC)
> +BUILD_CC ?= gcc
> +BUILD_CXX ?= g++
> +BUILD_AS ?= gcc
> +BUILD_AR ?= ar
> +BUILD_LD ?= ld
> +LINKER ?= $(BUILD_CC)
> ifeq ($(ARCH), IA32)
> ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
> endif
> @@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
> endif
>
> INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I
> $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I
> $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I .
> $(ARCH_INCLUDE)
> -CPPFLAGS = $(INCLUDE)
> +BUILD_CPPFLAGS = $(INCLUDE)
> ifeq ($(DARWIN),Darwin)
> # assume clang or clang compatible flags on OS X
> -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -Wno-self-assign -nostdlib -c -g
> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -Wno-self-assign -nostdlib -c -g
> else
> -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -nostdlib -c -g
> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -nostdlib -c -g
> endif
> -LFLAGS =
> +BUILD_LFLAGS =
>
> ifeq ($(ARCH), IA32)
> #
> @@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32)
> # so only do this is uname -m returns i386.
> #
> ifeq ($(DARWIN),Darwin)
> - CFLAGS += -arch i386
> - CPPFLAGS += -arch i386
> - LFLAGS += -arch i386
> + BUILD_CFLAGS += -arch i386
> + BUILD_CPPFLAGS += -arch i386
> + BUILD_LFLAGS += -arch i386
> endif
> endif
>
> 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.<BR>
> +# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
> # This program and the accompanying materials
> # are licensed and made available under the terms and conditions of the BSD
> License
> # which accompanies this distribution. The full text of the license may be found
> at
> @@ -24,7 +24,7 @@ TOOL_INCLUDE = -I Pccts/h
> OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o
> VfrSyntax.o \
> VfrFormPkg.o VfrError.o VfrUtilityLib.o VfrCompiler.o
>
> -VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS)
> +VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)
>
> LINKER = $(CXX)
>
> --
> 2.8.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-23 0:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-22 6:32 [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix Liming Gao
2016-08-23 0:12 ` Zhu, Yonghong
2016-08-23 0:32 ` Mudusuru, Giri P
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox