diff options
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch | 56 | ||||
-rw-r--r-- | recipes-core/busybox/busybox_%.bbappend | 6 |
2 files changed, 55 insertions, 7 deletions
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 481b125..c14950a 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From c7580fdb4be69a872291ccf22334091cace749fc Mon Sep 17 00:00:00 2001 | 1 | From d941b59087d34cb93053b638c066bf080122e7bb Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 16 Jan 2019 22:39:24 -0800 | 3 | Date: Wed, 16 Jan 2019 22:39:24 -0800 |
4 | Subject: [PATCH] Turn ptr_to_globals and bb_errno to be non const | 4 | Subject: [PATCH] Turn ptr_to_globals and bb_errno to be non const |
@@ -107,9 +107,25 @@ r14 is 0x0 and writing to this ofcourse ends up in segfault | |||
107 | 107 | ||
108 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 108 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
109 | --- | 109 | --- |
110 | include/libbb.h | 4 ++-- | 110 | coreutils/test.c | 2 +- |
111 | 1 file changed, 2 insertions(+), 2 deletions(-) | 111 | include/libbb.h | 4 ++-- |
112 | 112 | libbb/lineedit.c | 2 +- | |
113 | shell/ash.c | 5 ++--- | ||
114 | 4 files changed, 6 insertions(+), 7 deletions(-) | ||
115 | |||
116 | diff --git a/coreutils/test.c b/coreutils/test.c | ||
117 | index 868ffbecb..d11fccf5b 100644 | ||
118 | --- a/coreutils/test.c | ||
119 | +++ b/coreutils/test.c | ||
120 | @@ -401,7 +401,7 @@ struct test_statics { | ||
121 | }; | ||
122 | |||
123 | /* See test_ptr_hack.c */ | ||
124 | -extern struct test_statics *const test_ptr_to_statics; | ||
125 | +extern struct test_statics *test_ptr_to_statics; | ||
126 | |||
127 | #define S (*test_ptr_to_statics) | ||
128 | #define args (S.args ) | ||
113 | diff --git a/include/libbb.h b/include/libbb.h | 129 | diff --git a/include/libbb.h b/include/libbb.h |
114 | index 111d1b790..a52265e77 100644 | 130 | index 111d1b790..a52265e77 100644 |
115 | --- a/include/libbb.h | 131 | --- a/include/libbb.h |
@@ -132,6 +148,36 @@ index 111d1b790..a52265e77 100644 | |||
132 | /* At least gcc 3.4.6 on mipsel system needs optimization barrier */ | 148 | /* At least gcc 3.4.6 on mipsel system needs optimization barrier */ |
133 | #define barrier() __asm__ __volatile__("":::"memory") | 149 | #define barrier() __asm__ __volatile__("":::"memory") |
134 | #define SET_PTR_TO_GLOBALS(x) do { \ | 150 | #define SET_PTR_TO_GLOBALS(x) do { \ |
151 | diff --git a/libbb/lineedit.c b/libbb/lineedit.c | ||
152 | index fbabc6c12..026c42c4c 100644 | ||
153 | --- a/libbb/lineedit.c | ||
154 | +++ b/libbb/lineedit.c | ||
155 | @@ -181,7 +181,7 @@ struct lineedit_statics { | ||
156 | }; | ||
157 | |||
158 | /* See lineedit_ptr_hack.c */ | ||
159 | -extern struct lineedit_statics *const lineedit_ptr_to_statics; | ||
160 | +extern struct lineedit_statics * lineedit_ptr_to_statics; | ||
161 | |||
162 | #define S (*lineedit_ptr_to_statics) | ||
163 | #define state (S.state ) | ||
164 | diff --git a/shell/ash.c b/shell/ash.c | ||
165 | index c5588ea66..6f07f7d6d 100644 | ||
166 | --- a/shell/ash.c | ||
167 | +++ b/shell/ash.c | ||
168 | @@ -297,10 +297,9 @@ typedef long arith_t; | ||
169 | * set "-DBB_GLOBAL_CONST=''" in CONFIG_EXTRA_CFLAGS to disable | ||
170 | * this optimization. | ||
171 | */ | ||
172 | -#ifndef BB_GLOBAL_CONST | ||
173 | -# define BB_GLOBAL_CONST const | ||
174 | -#endif | ||
175 | |||
176 | +#undef BB_GLOBAL_CONST | ||
177 | +#define BB_GLOBAL_CONST | ||
178 | |||
179 | /* ============ Hash table sizes. Configurable. */ | ||
180 | |||
135 | -- | 181 | -- |
136 | 2.22.0 | 182 | 2.23.0 |
137 | 183 | ||
diff --git a/recipes-core/busybox/busybox_%.bbappend b/recipes-core/busybox/busybox_%.bbappend index 959466e..f26df7e 100644 --- a/recipes-core/busybox/busybox_%.bbappend +++ b/recipes-core/busybox/busybox_%.bbappend | |||
@@ -1,7 +1,9 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
2 | SRC_URI_append_toolchain-clang = "\ | 2 | SRC_URI_append_toolchain-clang = "\ |
3 | file://0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch \ | 3 | file://0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch \ |
4 | " | 4 | " |
5 | 5 | ||
6 | # networking/tls_pstm_sqr_comba.c:514:4: error: inline assembly requires more registers than available | ||
7 | # SQRADD2(*tmpx++, *tmpy--); | ||
8 | # ^ | ||
6 | TOOLCHAIN_x86 = "gcc" | 9 | TOOLCHAIN_x86 = "gcc" |
7 | TOOLCHAIN_riscv64 = "gcc" | ||