12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001
- From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
- Date: Fri, 26 Jul 2019 17:34:26 -0400
- Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake
- Prepend the build flags with those of bitbake. This is to build
- using the bitbake native sysroot include and library directories.
- Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com>
- Upstream-Status: Pending
- ---
- BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
- diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
- index 1c105ee7d4..d5eea3864e 100644
- --- a/BaseTools/Source/C/Makefiles/header.makefile
- +++ b/BaseTools/Source/C/Makefiles/header.makefile
- @@ -69,35 +69,36 @@ $(error Bad HOST_ARCH)
- endif
-
- INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
- -BUILD_CPPFLAGS = $(INCLUDE)
- +BUILD_CPPFLAGS += $(INCLUDE)
-
- # keep EXTRA_OPTFLAGS last
- BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
-
- ifeq ($(DARWIN),Darwin)
- # assume clang or clang compatible flags on OS X
- -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
- +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
- -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
- else
- ifeq ($(CXX), llvm)
- -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
- +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
- -fno-delete-null-pointer-checks -Wall -Werror \
- -Wno-deprecated-declarations -Wno-self-assign \
- -Wno-unused-result -nostdlib -g
- else
- -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
- +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
- -fno-delete-null-pointer-checks -Wall -Werror \
- -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
- -Wno-unused-result -nostdlib -g
- endif
- endif
- ifeq ($(CXX), llvm)
- -BUILD_LFLAGS =
- -BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result
- +BUILD_LFLAGS = $(LDFLAGS)
- +BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result
- else
- -BUILD_LFLAGS =
- -BUILD_CXXFLAGS = -Wno-unused-result
- +BUILD_LFLAGS = $(LDFLAGS)
- +BUILD_CXXFLAGS += -Wno-unused-result
- endif
- +
- ifeq ($(HOST_ARCH), IA32)
- #
- # Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
- --
- 2.28.0
|