diff options
author | Andrew Fish <afish@apple.com> | 2014-09-16 00:38:12 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-09-16 00:38:12 +0000 |
commit | 438f3ad68f53b372dfbe9ef324d3f51bfd48ca53 (patch) | |
tree | 84fe6801c477779c4ce84e336fa5afac8365f1f7 /BaseTools | |
parent | 04910ceb352b54fe8edac4c20d9a6515cd5fdad5 (diff) | |
download | edk2-438f3ad68f53b372dfbe9ef324d3f51bfd48ca53.tar.gz edk2-438f3ad68f53b372dfbe9ef324d3f51bfd48ca53.tar.bz2 edk2-438f3ad68f53b372dfbe9ef324d3f51bfd48ca53.zip |
BaseTools/Source/C: Only used '-Wno-self-assign' when BaseTools are built on DARWIN
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Tested-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16106 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/C/Makefiles/header.makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index 3049587797..54d3c78f97 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -41,7 +41,12 @@ 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)
+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
+else
+CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g
+endif
LFLAGS =
ifeq ($(ARCH), IA32)
@@ -50,8 +55,7 @@ ifeq ($(ARCH), IA32) # to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard
# so only do this is uname -m returns i386.
#
-uname_s = $(shell uname -s)
-ifeq ($(uname_s),Darwin)
+ifeq ($(DARWIN),Darwin)
CFLAGS += -arch i386
CPPFLAGS += -arch i386
LFLAGS += -arch i386
|