Backports for pyro
cover Backports for pyro
All 3 are backports from master.
qemu and nspr change needed small tweak to apply for older version.
qemu change is already backported to morty, which seems wrong that it's missing in pyro. (the morty patch also looks a bit differently than the version from master, see:
"qemu: Backport a patch for recent glibc versions" commit in morty)
The build with pyro still doesn't work on hosts with glibc-2.26.
cross-localedef-native/2.25-r0 on host system with glibc-2.26 is choking on it's own locale_t https://pastebin.com/udCzFA9L
but more difficult to resolve here when it mixes host's headers from glibc-2.26 with glibc-2.25 code.
I'll probably use LOCALE_GENERATION_WITH_CROSS-LOCALEDEF to bypass this, but it there is a plan to support Pyro on more recent hosts than this should be resolved as well
The following changes since commit 1009498f23ad319825c00ba60a4693d15aada553:
package.bbclass: Restore functionality to detect RPM dependencies (2017-08-30 23:59:53 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib jansa/pyro-backports
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=jansa/pyro-backports
Khem Raj (3):
icu: Fix build with glibc 2.26
qemu: Replace use of struct ucontext with ucontext_t
nspr: Fix build error due to missing stdint.h> include
...lace-struct-ucontext-with-ucontext_t-type.patch | 265 +++++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.8.0.bb | 1 + .../icu/icu/0001-i18n-Drop-include-xlocale.h.patch | 31 +++ meta/recipes-support/icu/icu_58.2.bb | 3 +- ...int.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch | 30 +++ meta/recipes-support/nspr/nspr_4.13.1.bb | 1 + 6 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch create mode 100644 meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch create mode 100644 meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
Signature · 1 line
2.14.1
PATCH 1/3 icu: Fix build with glibc 2.26
From: Khem Raj <[email protected]>
--- .../icu/icu/0001-i18n-Drop-include-xlocale.h.patch | 31 ++++++++++++++++++++++ meta/recipes-support/icu/icu_58.2.bb | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch new file +31 -0
@@ -0,0 +1,31 @@ +From c4254fd8ff1888ca285e3242b812010357ce2b3e Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 24 Jun 2017 22:52:40 -0700 +Subject: [PATCH] i18n: Drop include <xlocale.h> + +glibc 2.26 drops this header + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + i18n/digitlst.cpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +Index: source/i18n/digitlst.cpp +=================================================================== +--- source.orig/i18n/digitlst.cpp ++++ source/i18n/digitlst.cpp +@@ -61,11 +61,7 @@ + #endif + + #if U_USE_STRTOD_L +-# if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN +-# include <locale.h> +-# else +-# include <xlocale.h> +-# endif ++# include <locale.h> + #endif + + // ***************************************************************************
meta/recipes-support/icu/icu_58.2.bb +2 -1
@@ -16,7 +16,8 @@ BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV SRC_URI = "${BASE_SRC_URI} \ file://icu-pkgdata-large-cmd.patch \ file://fix-install-manx.patch \ - " + file://0001-i18n-Drop-include-xlocale.h.patch \ + " SRC_URI_append_class-target = "\ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
Signature · 1 line
2.14.1
PATCH 2/3 qemu: Replace use of struct ucontext with ucontext_t
In reply to Martin JansaFrom: Khem Raj <[email protected]>
--- ...lace-struct-ucontext-with-ucontext_t-type.patch | 265 +++++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.8.0.bb | 1 + 2 files changed, 266 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch
meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patch new file +265 -0
@@ -0,0 +1,265 @@ +From 80954c03163fdbf8b905595a69008093096ee2f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 28 Jun 2017 13:28:37 -0700 +Subject: [PATCH] replace struct ucontext with ucontext_t type + +The ucontext_t type had a tag struct ucontext until now +but newer glibc will drop it so we need to adjust and use +the exposed type instead + +Signed-off-by: Khem Raj <[email protected]> +Cc: Kamil Rytarowski <[email protected]> +Cc: Riku Voipio <[email protected]> +Cc: Laurent Vivier <[email protected]> +Cc: Paolo Bonzini <[email protected]> + +Upstream-Status: Submitted +--- + linux-user/host/aarch64/hostdep.h | 2 +- + linux-user/host/arm/hostdep.h | 2 +- + linux-user/host/i386/hostdep.h | 2 +- + linux-user/host/ppc64/hostdep.h | 2 +- + linux-user/host/s390x/hostdep.h | 2 +- + linux-user/host/x86_64/hostdep.h | 2 +- + linux-user/signal.c | 10 +++++----- + tests/tcg/test-i386.c | 4 ++-- + user-exec.c | 18 +++++++++--------- + 9 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/linux-user/host/aarch64/hostdep.h b/linux-user/host/aarch64/hostdep.h +index 64f75cef49..a8d41a21ad 100644 +--- a/linux-user/host/aarch64/hostdep.h ++++ b/linux-user/host/aarch64/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + __u64 *pcreg = &uc->uc_mcontext.pc; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/host/arm/hostdep.h b/linux-user/host/arm/hostdep.h +index 5c1ae60120..9276fe6ceb 100644 +--- a/linux-user/host/arm/hostdep.h ++++ b/linux-user/host/arm/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + unsigned long *pcreg = &uc->uc_mcontext.arm_pc; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/host/i386/hostdep.h b/linux-user/host/i386/hostdep.h +index d834bd80ea..073be74d87 100644 +--- a/linux-user/host/i386/hostdep.h ++++ b/linux-user/host/i386/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + greg_t *pcreg = &uc->uc_mcontext.gregs[REG_EIP]; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/host/ppc64/hostdep.h b/linux-user/host/ppc64/hostdep.h +index 0b0f5f7821..98979ad917 100644 +--- a/linux-user/host/ppc64/hostdep.h ++++ b/linux-user/host/ppc64/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + unsigned long *pcreg = &uc->uc_mcontext.gp_regs[PT_NIP]; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/host/s390x/hostdep.h b/linux-user/host/s390x/hostdep.h +index 6f9da9c608..4f0171f36f 100644 +--- a/linux-user/host/s390x/hostdep.h ++++ b/linux-user/host/s390x/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + unsigned long *pcreg = &uc->uc_mcontext.psw.addr; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/host/x86_64/hostdep.h b/linux-user/host/x86_64/hostdep.h +index 3b4259633e..a4fefb5114 100644 +--- a/linux-user/host/x86_64/hostdep.h ++++ b/linux-user/host/x86_64/hostdep.h +@@ -24,7 +24,7 @@ extern char safe_syscall_end[]; + /* Adjust the signal context to rewind out of safe-syscall if we're in it */ + static inline void rewind_if_in_safe_syscall(void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP]; + + if (*pcreg > (uintptr_t)safe_syscall_start +diff --git a/linux-user/signal.c b/linux-user/signal.c +index c750053edd..4638123dd8 100644 +--- a/linux-user/signal.c ++++ b/linux-user/signal.c +@@ -3170,7 +3170,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, + * + * a0 = signal number + * a1 = pointer to siginfo_t +- * a2 = pointer to struct ucontext ++ * a2 = pointer to ucontext_t + * + * $25 and PC point to the signal handler, $29 points to the + * struct sigframe. +@@ -3557,7 +3557,7 @@ struct target_signal_frame { + + struct rt_signal_frame { + siginfo_t info; +- struct ucontext uc; ++ ucontext_t uc; + uint32_t tramp[2]; + }; + +@@ -3773,7 +3773,7 @@ struct rt_signal_frame { + siginfo_t *pinfo; + void *puc; + siginfo_t info; +- struct ucontext uc; ++ ucontext_t uc; + uint16_t retcode[4]; /* Trampoline code. */ + }; + +@@ -4074,7 +4074,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, + tswap_siginfo(&frame->info, info); + } + +- /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/ ++ /*err |= __clear_user(&frame->uc, offsetof(ucontext_t, uc_mcontext));*/ + __put_user(0, &frame->uc.tuc_flags); + __put_user(0, &frame->uc.tuc_link); + __put_user(target_sigaltstack_used.ss_sp, +@@ -4565,7 +4565,7 @@ enum { + + struct target_ucontext { + target_ulong tuc_flags; +- target_ulong tuc_link; /* struct ucontext __user * */ ++ target_ulong tuc_link; /* ucontext_t __user * */ + struct target_sigaltstack tuc_stack; + #if !defined(TARGET_PPC64) + int32_t tuc_pad[7]; +diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c +index 0f7b943b0c..9599204895 100644 +--- a/tests/tcg/test-i386.c ++++ b/tests/tcg/test-i386.c +@@ -1720,7 +1720,7 @@ int tab[2]; + + void sig_handler(int sig, siginfo_t *info, void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + + printf("si_signo=%d si_errno=%d si_code=%d", + info->si_signo, info->si_errno, info->si_code); +@@ -1912,7 +1912,7 @@ void test_exceptions(void) + /* specific precise single step test */ + void sig_trap_handler(int sig, siginfo_t *info, void *puc) + { +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + printf("EIP=" FMTLX "\n", (long)uc->uc_mcontext.gregs[REG_EIP]); + } + +diff --git a/user-exec.c b/user-exec.c +index 6db075884d..3f1b899e3d 100644 +--- a/user-exec.c ++++ b/user-exec.c +@@ -155,7 +155,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + #elif defined(__OpenBSD__) + struct sigcontext *uc = puc; + #else +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + #endif + unsigned long pc; + int trapno; +@@ -210,7 +210,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + #elif defined(__OpenBSD__) + struct sigcontext *uc = puc; + #else +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + #endif + + pc = PC_sig(uc); +@@ -277,7 +277,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + ucontext_t *uc = puc; + #else +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + #endif + unsigned long pc; + int is_write; +@@ -304,7 +304,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + void *puc) + { + siginfo_t *info = pinfo; +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + uint32_t *pc = uc->uc_mcontext.sc_pc; + uint32_t insn = *pc; + int is_write = 0; +@@ -402,7 +402,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + #if defined(__NetBSD__) + ucontext_t *uc = puc; + #else +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + #endif + unsigned long pc; + int is_write; +@@ -429,7 +429,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + int cpu_signal_handler(int host_signum, void *pinfo, void *puc) + { + siginfo_t *info = pinfo; +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + uintptr_t pc = uc->uc_mcontext.pc; + uint32_t insn = *(uint32_t *)pc; + bool is_write; +@@ -462,7 +462,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, void *puc) + int cpu_signal_handler(int host_signum, void *pinfo, void *puc) + { + siginfo_t *info = pinfo; +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + unsigned long ip; + int is_write = 0; + +@@ -493,7 +493,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + void *puc) + { + siginfo_t *info = pinfo; +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + unsigned long pc; + uint16_t *pinsn; + int is_write = 0; +@@ -546,7 +546,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, + void *puc) + { + siginfo_t *info = pinfo; +- struct ucontext *uc = puc; ++ ucontext_t *uc = puc; + greg_t pc = uc->uc_mcontext.pc; + int is_write; + +-- +2.13.2 +
meta/recipes-devtools/qemu/qemu_2.8.0.bb +1 -0
@@ -21,6 +21,7 @@ SRC_URI += " \ file://qemu-2.5.0-cflags.patch \ file://target-ppc-fix-user-mode.patch \ file://glibc-2.25.patch \ + file://0001-replace-struct-ucontext-with-ucontext_t-type.patch \ " SRC_URI += " \
Signature · 1 line
2.14.1
PATCH 3/3 nspr: Fix build error due to missing stdint.h> include
In reply to Martin JansaFrom: Khem Raj <[email protected]>
--- ...int.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch | 30 ++++++++++++++++++++++ meta/recipes-support/nspr/nspr_4.13.1.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch
meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch new file +30 -0
@@ -0,0 +1,30 @@ +From f7551ec58e2f0a892295e0c2a650083101e12c54 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 20 May 2017 13:24:26 -0700 +Subject: [PATCH] include stdint.h for SSIZE_MAX and SIZE_MAX definitions + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + pr/tests/prfz.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/pr/tests/prfz.c b/pr/tests/prfz.c +index 0c5a432..9c17590 100644 +--- a/pr/tests/prfz.c ++++ b/pr/tests/prfz.c +@@ -10,7 +10,9 @@ + #include <sys/types.h> + #include <limits.h> + #include <string.h> +- ++#ifdef XP_UNIX ++#include <stdint.h> ++#endif + int + main(int argc, char **argv) + { +-- +2.13.0 +
meta/recipes-support/nspr/nspr_4.13.1.bb +1 -0
@@ -10,6 +10,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz file://fix-build-on-x86_64.patch \ file://remove-srcdir-from-configure-in.patch \ file://0002-Add-nios2-support.patch \ + file://0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch \ file://nspr.pc.in \ "
Signature · 1 line
2.14.1
Quoted 1 line · Martin Jansa
All 3 are backports from master.
thanks,
all in pyro
- armin
Quoted 44 lines
qemu and nspr change needed small tweak to apply for older version.
qemu change is already backported to morty, which seems wrong that it's missing in pyro. (the morty patch also looks a bit differently than the version from master, see:
"qemu: Backport a patch for recent glibc versions" commit in morty)The build with pyro still doesn't work on hosts with glibc-2.26.
cross-localedef-native/2.25-r0 on host system with glibc-2.26 is choking on it's own
locale_thttps://pastebin.com/udCzFA9L
but more difficult to resolve here when it mixes host's headers from glibc-2.26 with glibc-2.25 code.I'll probably use LOCALE_GENERATION_WITH_CROSS-LOCALEDEF to bypass this, but it there is a plan to support Pyro on more recent hosts than this should be resolved as well
The following changes since commit
1009498f23ad319825c00ba60a4693d15aada553:package.bbclass: Restore functionality to detect RPM dependencies (2017-08-30 23:59:53 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contribjansa/pyro-backports
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=jansa/pyro-backportsKhem Raj (3):
icu: Fix build with glibc 2.26
qemu: Replace use of struct ucontext withucontext_t
nspr: Fix build error due to missingstdint.h> include...lace-struct-ucontext-with-ucontext_t-type.patch | 265 +++++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.8.0.bb | 1 + .../icu/icu/0001-i18n-Drop-include-xlocale.h.patch | 31 +++ meta/recipes-support/icu/icu_58.2.bb | 3 +- ...int.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch | 30 +++ meta/recipes-support/nspr/nspr_4.13.1.bb | 1 + 6 files changed, 330 insertions(+), 1 deletion(-)create mode 100644
meta/recipes-devtools/qemu/qemu/0001-replace-struct-ucontext-with-ucontext_t-type.patchcreate mode 100644meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
create mode 100644meta/recipes-support/nspr/nspr/0001-include-stdint.h-for-SSIZE_MAX-and-SIZE_MAX-definiti.patch