Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 1 | From 667c0cf97dadc4f5994d26ec3984f559a05ec406 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 2 | From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> |
| 3 | Date: Fri, 26 Jul 2019 17:34:26 -0400 |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 4 | Subject: [PATCH 2/4] BaseTools: makefile: adjust to build in under bitbake |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
| 6 | Prepend the build flags with those of bitbake. This is to build |
| 7 | using the bitbake native sysroot include and library directories. |
| 8 | |
| 9 | Signed-off-by: Ricardo Neri <ricardo.neri@linux.intel.com> |
| 10 | Upstream-Status: Pending |
| 11 | |
| 12 | --- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 13 | BaseTools/Source/C/Makefiles/header.makefile | 17 +++++++++-------- |
| 14 | 1 file changed, 9 insertions(+), 8 deletions(-) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
| 16 | diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 17 | index 1c105ee7d4..d5eea3864e 100644 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | --- a/BaseTools/Source/C/Makefiles/header.makefile |
| 19 | +++ b/BaseTools/Source/C/Makefiles/header.makefile |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 20 | @@ -69,35 +69,36 @@ $(error Bad HOST_ARCH) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | endif
|
| 22 |
|
| 23 | INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
|
| 24 | -BUILD_CPPFLAGS = $(INCLUDE)
|
| 25 | +BUILD_CPPFLAGS += $(INCLUDE)
|
| 26 |
|
| 27 | # keep EXTRA_OPTFLAGS last
|
| 28 | BUILD_OPTFLAGS = -O2 $(EXTRA_OPTFLAGS)
|
| 29 |
|
| 30 | ifeq ($(DARWIN),Darwin)
|
| 31 | # assume clang or clang compatible flags on OS X
|
| 32 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
|
| 33 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \
|
| 34 | -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g
|
| 35 | else
|
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 36 | ifeq ($(CXX), llvm)
|
| 37 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
| 38 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
| 39 | -fno-delete-null-pointer-checks -Wall -Werror \
|
| 40 | -Wno-deprecated-declarations -Wno-self-assign \
|
| 41 | -Wno-unused-result -nostdlib -g
|
| 42 | else
|
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 43 | -BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
| 44 | +BUILD_CFLAGS += -MD -fshort-wchar -fno-strict-aliasing -fwrapv \
|
| 45 | -fno-delete-null-pointer-checks -Wall -Werror \
|
| 46 | -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict \
|
| 47 | -Wno-unused-result -nostdlib -g
|
| 48 | endif
|
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 49 | endif
|
| 50 | ifeq ($(CXX), llvm)
|
| 51 | -BUILD_LFLAGS =
|
| 52 | -BUILD_CXXFLAGS = -Wno-deprecated-register -Wno-unused-result
|
| 53 | +BUILD_LFLAGS = $(LDFLAGS)
|
| 54 | +BUILD_CXXFLAGS += -Wno-deprecated-register -Wno-unused-result
|
| 55 | else
|
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 56 | -BUILD_LFLAGS =
|
| 57 | -BUILD_CXXFLAGS = -Wno-unused-result
|
| 58 | +BUILD_LFLAGS = $(LDFLAGS)
|
| 59 | +BUILD_CXXFLAGS += -Wno-unused-result
|
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 60 | endif
|
| 61 | +
|
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | ifeq ($(HOST_ARCH), IA32)
|
| 63 | #
|
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 64 | # Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
|
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 65 | -- |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 66 | 2.28.0 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 67 | |