systemd: Do not use xlocale.h
PATCH 1/3 systemd: Do not use xlocale.h
glibc specific header which has been removed from glibc 2.26+
--- ...se-util-Do-not-include-unneeded-xlocale.h.patch | 27 ++++++++++++++++++++++ meta/recipes-core/systemd/systemd_232.bb | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/systemd/systemd/0022-parse-util-Do-not-include-unneeded-xlocale.h.patch
meta/recipes-core/systemd/systemd/0022-parse-util-Do-not-include-unneeded-xlocale.h.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 0c50b8332092178378257c2de800fb6b6b4a8706 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 3 Jul 2017 08:45:04 -0700 +Subject: [PATCH] parse-util: Do not include unneeded xlocale.h + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Backport [ partial https://github.com/systemd/systemd/commit/284d1cd0a12cad96a5ea61d1afb0dd677dbd147e] + + src/basic/parse-util.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c +index c98815b9b..a0eb45805 100644 +--- a/src/basic/parse-util.c ++++ b/src/basic/parse-util.c +@@ -23,7 +23,6 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <xlocale.h> + + #include "alloc-util.h" + #include "extract-word.h" +-- +2.13.2 +
meta/recipes-core/systemd/systemd_232.bb +2 -1
@@ -31,7 +31,8 @@ SRC_URI += " \ file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \ file://0020-back-port-233-don-t-use-the-unified-hierarchy-for-the-systemd.patch \ file://0021-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch \ -" + file://0022-parse-util-Do-not-include-unneeded-xlocale.h.patch \ + " SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch" PACKAGECONFIG ??= "xz \
Signature · 1 line
2.13.2
PATCH 2/3 security_flags.inc: Do not build gcc for powerpc with PIE defaults
Since we have disabled FPIE from SECURITY_CFLAGS already, we have to ensure the same with gcc, otherwise gcc (on-device) will be built defaulting to PIE, and such binaries will fail to execute
--- meta/conf/distro/include/security_flags.inc | 1 + 1 file changed, 1 insertion(+)
meta/conf/distro/include/security_flags.inc +1 -0
@@ -29,6 +29,7 @@ SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro" # powerpc does not get on with pie for reasons not looked into as yet SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}" SECURITY_CFLAGS_pn-libgcc_powerpc = "" +GCCPIE_powerpc = "" # arm specific security flag issues SECURITY_CFLAGS_pn-glibc = ""
Signature · 1 line
2.13.2
PATCH 3/3 ovmf: Fix build with toolchain defaulting to PIE
In reply to Khem RajGCC44_IA32_X64_DLINK_COMMON and GCC49_IA32_X64_DLINK_COMMON variables add to final linker flags that ovmf build forms on its own, so trying to inject it from environment will not work.
Here we add option to disable pie during linking, which should have been accompanied with correcponding gcc/cflags.
Fixes
| /mnt/a/oe/build/tmp/work/i586-bec-linux/ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Facs.dll: Bad definition for symbol '<unknown>'@0 or unsupported symbol type. For example, absolute and undefined symbols are not supported.
--- .../ovmf/ovmf/0001-ia32-Dont-use-pie.patch | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-)
meta/recipes-core/ovmf/ovmf/0001-ia32-Dont-use-pie.patch +18 -9
@@ -10,10 +10,10 @@ Signed-off-by: Khem Raj <[email protected]> BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template -index 04a1bcb210..84c5f84f93 100755 ---- a/BaseTools/Conf/tools_def.template -+++ b/BaseTools/Conf/tools_def.template +Index: git/BaseTools/Conf/tools_def.template +=================================================================== +--- git.orig/BaseTools/Conf/tools_def.template ++++ git/BaseTools/Conf/tools_def.template @@ -4336,7 +4336,7 @@ RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG = NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
@@ -23,15 +23,24 @@ index 04a1bcb210..84c5f84f93 100755 DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie -@@ -4369,7 +4369,7 @@ DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm +@@ -4369,9 +4369,9 @@ DEFINE GCC_ARM_RC_FLAGS = -I DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables +DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -fno-PIE -no-pie DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables - DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 +-DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 ++DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 -no-pie DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable --- -2.13.1 - + DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map + DEFINE GCC44_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON) +@@ -4451,7 +4451,7 @@ DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = D + + DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) + DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) +-DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 ++DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40 -no-pie + DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable + DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map + DEFINE GCC49_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
Signature · 1 line
2.13.2
✗ patchtest: failure for "systemd: Do not use xlocale.h..." and 2 more
In reply to Khem Raj== Series Details ==
Series: "systemd: Do not use xlocale.h..." and 2 more
Revision: 1
URL : https://patchwork.openembedded.org/series/7576/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at de79149545)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe