From 6611405d0e50724afe4b6ee1d6e80417a31721d6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 20 Feb 2021 12:55:50 -0800 Subject: busybox: Port patch to 1.33 release Signed-off-by: Khem Raj --- ...-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch | 14 +++++++------- recipes-core/busybox/busybox_1.32.%.bbappend | 9 --------- recipes-core/busybox/busybox_1.33%.bbappend | 9 +++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 recipes-core/busybox/busybox_1.32.%.bbappend create mode 100644 recipes-core/busybox/busybox_1.33%.bbappend diff --git a/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch b/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch index 4f4bbbd..468a32d 100644 --- a/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch +++ b/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch @@ -115,7 +115,7 @@ Signed-off-by: Khem Raj --- a/coreutils/test.c +++ b/coreutils/test.c -@@ -401,7 +401,7 @@ struct test_statics { +@@ -435,7 +435,7 @@ struct test_statics { }; /* See test_ptr_hack.c */ @@ -127,15 +127,15 @@ Signed-off-by: Khem Raj --- a/include/libbb.h +++ b/include/libbb.h @@ -342,7 +342,7 @@ struct BUG_off_t_size_is_misdetected { - #if defined(__GLIBC__) - /* glibc uses __errno_location() to get a ptr to errno */ - /* We can just memorize it once - no multithreading in busybox :) */ + #if defined(errno) + /* If errno is a define, assume it's "define errno (*__errno_location())" + * and we will cache it's result in this variable */ -extern int *const bb_errno; +extern int *bb_errno; #undef errno #define errno (*bb_errno) - #endif -@@ -2168,7 +2168,7 @@ struct globals; + #define bb_cached_errno_ptr 1 +@@ -2228,7 +2228,7 @@ struct globals; /* '*const' ptr makes gcc optimize code much better. * Magic prevents ptr_to_globals from going into rodata. * If you want to assign a value, use SET_PTR_TO_GLOBALS(x) */ @@ -146,7 +146,7 @@ Signed-off-by: Khem Raj /* Clang/llvm drops assignment to "constant" storage. Silently. --- a/libbb/lineedit.c +++ b/libbb/lineedit.c -@@ -181,7 +181,7 @@ struct lineedit_statics { +@@ -192,7 +192,7 @@ struct lineedit_statics { }; /* See lineedit_ptr_hack.c */ diff --git a/recipes-core/busybox/busybox_1.32.%.bbappend b/recipes-core/busybox/busybox_1.32.%.bbappend deleted file mode 100644 index f26df7e..0000000 --- a/recipes-core/busybox/busybox_1.32.%.bbappend +++ /dev/null @@ -1,9 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_toolchain-clang = "\ - file://0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch \ -" - -# networking/tls_pstm_sqr_comba.c:514:4: error: inline assembly requires more registers than available -# SQRADD2(*tmpx++, *tmpy--); -# ^ -TOOLCHAIN_x86 = "gcc" diff --git a/recipes-core/busybox/busybox_1.33%.bbappend b/recipes-core/busybox/busybox_1.33%.bbappend new file mode 100644 index 0000000..f26df7e --- /dev/null +++ b/recipes-core/busybox/busybox_1.33%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI_append_toolchain-clang = "\ + file://0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch \ +" + +# networking/tls_pstm_sqr_comba.c:514:4: error: inline assembly requires more registers than available +# SQRADD2(*tmpx++, *tmpy--); +# ^ +TOOLCHAIN_x86 = "gcc" -- cgit v1.2.3-54-g00ecf