diff options
| author | Christopher Clark <christopher.w.clark@gmail.com> | 2020-02-25 16:15:46 -0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-02-27 16:59:22 -0500 |
| commit | 5ce7eb1f13a7ac88bd750ec8f67456704308c708 (patch) | |
| tree | 970807b5aaa67c63b4962b80d87acbcd1cabd8d3 | |
| parent | 643058d5a59631e6644115c8b7355ca732f9c982 (diff) | |
| download | meta-virtualization-5ce7eb1f13a7ac88bd750ec8f67456704308c708.tar.gz | |
ipxe: fix build with uprev to the latest git revision
Newer version allows for a simpler version of the cross-compile patch,
which is updated in this change.
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch | 58 | ||||
| -rw-r--r-- | recipes-extended/ipxe/ipxe_git.bb | 2 |
2 files changed, 7 insertions, 53 deletions
diff --git a/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch b/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch index da154a6f..865e9bbb 100644 --- a/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch +++ b/recipes-extended/ipxe/files/ipxe-fix-hostcc-nopie-cflags.patch | |||
| @@ -1,34 +1,17 @@ | |||
| 1 | Fix detection of host compiler "no-pie"/"nopie" and link flags. | 1 | diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping |
| 2 | 2 | index 1dd1479..13f44dd 100644 | |
| 3 | Detection of the "no-pie" vs "nopie" flag needs to be performed for both | ||
| 4 | the host and target compilers; cannot assume that one works for the other. | ||
| 5 | |||
| 6 | Use EXTRA_HOST_CFLAGS and EXTRA_HOST_LDFLAGS variables for passing | ||
| 7 | host tool parameters if required. Removes previous hardcoded "-O2 -g". | ||
| 8 | |||
| 9 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
| 10 | diff --git a/Makefile.housekeeping b/Makefile.housekeeping | ||
| 11 | index f833492..5451c39 100644 | ||
| 12 | --- a/Makefile.housekeeping | 3 | --- a/Makefile.housekeeping |
| 13 | +++ b/Makefile.housekeeping | 4 | +++ b/Makefile.housekeeping |
| 14 | @@ -133,6 +133,7 @@ eval : | 5 | @@ -454,7 +454,7 @@ endif |
| 15 | WORKAROUND_CFLAGS := | ||
| 16 | WORKAROUND_ASFLAGS := | ||
| 17 | WORKAROUND_LDFLAGS := | ||
| 18 | +WORKAROUND_HOST_CFLAGS := | ||
| 19 | |||
| 20 | # Make syntax does not allow use of comma or space in certain places. | ||
| 21 | # This ugly workaround is suggested in the manual. | ||
| 22 | @@ -445,7 +446,7 @@ endif | ||
| 23 | CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) | 6 | CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS) |
| 24 | ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS) | 7 | ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS) |
| 25 | LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS) | 8 | LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS) |
| 26 | -HOST_CFLAGS += $(WORKAROUND_CFLAGS) -O2 -g | 9 | -HOST_CFLAGS += -O2 -g |
| 27 | +HOST_CFLAGS += $(WORKAROUND_HOST_CFLAGS) $(EXTRA_HOST_CFLAGS) | 10 | +HOST_CFLAGS += -O2 -g $(EXTRA_HOST_CFLAGS) |
| 28 | 11 | ||
| 29 | # Inhibit -Werror if NO_WERROR is specified on make command line | 12 | # Inhibit -Werror if NO_WERROR is specified on make command line |
| 30 | # | 13 | # |
| 31 | @@ -1375,7 +1376,7 @@ endif # defined(BIN) | 14 | @@ -1379,7 +1379,7 @@ endif # defined(BIN) |
| 32 | # The compression utilities | 15 | # The compression utilities |
| 33 | # | 16 | # |
| 34 | 17 | ||
| @@ -37,32 +20,3 @@ index f833492..5451c39 100644 | |||
| 37 | 20 | ||
| 38 | $(ZBIN) : util/zbin.c $(MAKEDEPS) | 21 | $(ZBIN) : util/zbin.c $(MAKEDEPS) |
| 39 | $(QM)$(ECHO) " [HOSTCC] $@" | 22 | $(QM)$(ECHO) " [HOSTCC] $@" |
| 40 | diff --git a/arch/i386/Makefile b/arch/i386/Makefile | ||
| 41 | index b7c2792..4a637ad 100644 | ||
| 42 | --- a/arch/i386/Makefile | ||
| 43 | +++ b/arch/i386/Makefile | ||
| 44 | @@ -78,11 +78,20 @@ CFLAGS += -Ui386 | ||
| 45 | # -nopie. We therefore test for both. | ||
| 46 | # | ||
| 47 | ifeq ($(CCTYPE),gcc) | ||
| 48 | -PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ] | ||
| 49 | -PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -no-pie') | ||
| 50 | -PIE_TEST2 = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ] | ||
| 51 | +PIE_TEST1_FLAGS = "-fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1" | ||
| 52 | +PIE_TEST2_FLAGS = "-fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1" | ||
| 53 | + | ||
| 54 | +PIE_TEST1 = [ -z "`$(CC) "$(PIE_TEST1_FLAGS)"`" ] | ||
| 55 | +PIE_TEST2 = [ -z "`$(CC) "$(PIE_TEST2_FLAGS)"`" ] | ||
| 56 | +PIE_FLAGS1 := $(shell $(PIE_TEST1) && $(ECHO) '-fno-PIE -no-pie') | ||
| 57 | PIE_FLAGS2 := $(shell $(PIE_TEST2) && $(ECHO) '-fno-PIE -nopie') | ||
| 58 | -WORKAROUND_CFLAGS += $(PIE_FLAGS) $(PIE_FLAGS2) | ||
| 59 | +WORKAROUND_CFLAGS += $(PIE_FLAGS1) $(PIE_FLAGS2) | ||
| 60 | + | ||
| 61 | +HOST_PIE_TEST1 = [ -z "`$(HOSTCC) "$(PIE_TEST1_FLAGS)"`" ] | ||
| 62 | +HOST_PIE_TEST2 = [ -z "`$(HOSTCC) "$(PIE_TEST2_FLAGS)"`" ] | ||
| 63 | +HOST_PIE_FLAGS1 := $(shell $(HOST_PIE_TEST1) && $(ECHO) '-fno-PIE -no-pie') | ||
| 64 | +HOST_PIE_FLAGS2 := $(shell $(HOST_PIE_TEST2) && $(ECHO) '-fno-PIE -nopie') | ||
| 65 | +WORKAROUND_HOST_CFLAGS += $(HOST_PIE_FLAGS1) $(HOST_PIE_FLAGS2) | ||
| 66 | endif | ||
| 67 | |||
| 68 | # i386-specific directories containing source files | ||
diff --git a/recipes-extended/ipxe/ipxe_git.bb b/recipes-extended/ipxe/ipxe_git.bb index 1de0f21e..47c5b7ad 100644 --- a/recipes-extended/ipxe/ipxe_git.bb +++ b/recipes-extended/ipxe/ipxe_git.bb | |||
| @@ -4,7 +4,7 @@ LICENSE = "GPLv2" | |||
| 4 | DEPENDS = "binutils-native perl-native syslinux mtools-native cdrtools-native xz" | 4 | DEPENDS = "binutils-native perl-native syslinux mtools-native cdrtools-native xz" |
| 5 | LIC_FILES_CHKSUM = "file://../COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 5 | LIC_FILES_CHKSUM = "file://../COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 6 | 6 | ||
| 7 | SRCREV = "64b4452bca04af433f1c98ab782c0e93cd5c88c0" | 7 | SRCREV = "18dc73d27edb55ebe9cb13c58d59af3da3bd374b" |
| 8 | PV = "gitr${SRCPV}" | 8 | PV = "gitr${SRCPV}" |
| 9 | PR = "r0" | 9 | PR = "r0" |
| 10 | 10 | ||
