diff options
author | Adam Miartus <adam.miartus@gmail.com> | 2020-05-10 20:22:53 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-05-21 14:02:40 -0700 |
commit | eaf4a812443866951a6f96e15954ba1ca667afa9 (patch) | |
tree | f4117ece4bfd87c3eb8f634f7ecfa055304abd63 | |
parent | b5cb4b94bdd1ef06446f8467763b7bb8f6790593 (diff) | |
download | meta-openembedded-eaf4a812443866951a6f96e15954ba1ca667afa9.tar.gz |
toybox: bump version to 0.8.3
Fix build on glibc/mips
remove OE-path-changes.patch as already applied to upstream
fix CC, CFLAGS and CROSS_COMPILE variables as toybox is strict
on what is expected to be filled in these variables:
CC = should contain compiler name
CROSS_COMPILE = should contain compiler prefix
CFLAGS = should contain only compiler flags
License wording changed due to commits:
8014d31278411e22655aeae47338e95f209e2907
b31192fd73b382358b1deb33dc6c4cf4ce9c613f
in toybox repository, type of license remains the same
Signed-off-by: Adam Miartus <adam.miartus@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox/0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch | 30 | ||||
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox/OE-path-changes.patch | 195 | ||||
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox/mips-no-STKFLT.patch | 25 | ||||
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox_0.8.3.bb (renamed from meta-oe/recipes-core/toybox/toybox_0.7.5.bb) | 24 |
4 files changed, 74 insertions, 200 deletions
diff --git a/meta-oe/recipes-core/toybox/toybox/0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch b/meta-oe/recipes-core/toybox/toybox/0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch new file mode 100644 index 0000000000..faabc597ee --- /dev/null +++ b/meta-oe/recipes-core/toybox/toybox/0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 9e5b1420b89813ee3c58c2b792077fa8bb71f327 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 21 May 2020 13:53:27 -0700 | ||
4 | Subject: [PATCH] Tackle SIGEMT and SIGSTKFLT is not glibc specific | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | lib/portability.c | 5 ++++- | ||
9 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/lib/portability.c b/lib/portability.c | ||
12 | index 294141c6..1c7ebc12 100644 | ||
13 | --- a/lib/portability.c | ||
14 | +++ b/lib/portability.c | ||
15 | @@ -430,8 +430,11 @@ static const struct signame signames[] = { | ||
16 | // Non-POSIX signals that cause termination | ||
17 | SIGNIFY(PROF), SIGNIFY(IO), | ||
18 | #ifdef __linux__ | ||
19 | -# if !defined(__GLIBC__) && !defined(__mips__) | ||
20 | +# ifdef SIGSTKFLT | ||
21 | SIGNIFY(STKFLT), | ||
22 | +# endif | ||
23 | +# ifdef SIGEMT | ||
24 | + SIGNIFY(EMT), | ||
25 | # endif | ||
26 | SIGNIFY(POLL), SIGNIFY(PWR), | ||
27 | #elif defined(__APPLE__) | ||
28 | -- | ||
29 | 2.26.2 | ||
30 | |||
diff --git a/meta-oe/recipes-core/toybox/toybox/OE-path-changes.patch b/meta-oe/recipes-core/toybox/toybox/OE-path-changes.patch deleted file mode 100644 index e42c22ebd4..0000000000 --- a/meta-oe/recipes-core/toybox/toybox/OE-path-changes.patch +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | diff --git a/toys/net/microcom.c b/toys/net/microcom.c | ||
2 | index d34e1fe..a369e6c 100644 | ||
3 | --- a/toys/net/microcom.c | ||
4 | +++ b/toys/net/microcom.c | ||
5 | @@ -2,7 +2,7 @@ | ||
6 | * | ||
7 | * Copyright 2017 The Android Open Source Project. | ||
8 | |||
9 | -USE_MICROCOM(NEWTOY(microcom, "<1>1s:X", TOYFLAG_BIN)) | ||
10 | +USE_MICROCOM(NEWTOY(microcom, "<1>1s:X", TOYFLAG_USR|TOYFLAG_BIN)) | ||
11 | |||
12 | config MICROCOM | ||
13 | bool "microcom" | ||
14 | diff --git a/toys/other/blockdev.c b/toys/other/blockdev.c | ||
15 | index 38e0993..c5d9fcd 100644 | ||
16 | --- a/toys/other/blockdev.c | ||
17 | +++ b/toys/other/blockdev.c | ||
18 | @@ -4,7 +4,7 @@ | ||
19 | * | ||
20 | * No Standard. | ||
21 | |||
22 | -USE_BLOCKDEV(NEWTOY(blockdev, "<1>1(setro)(setrw)(getro)(getss)(getbsz)(setbsz)#<0(getsz)(getsize)(getsize64)(flushbufs)(rereadpt)",TOYFLAG_USR|TOYFLAG_BIN)) | ||
23 | +USE_BLOCKDEV(NEWTOY(blockdev, "<1>1(setro)(setrw)(getro)(getss)(getbsz)(setbsz)#<0(getsz)(getsize)(getsize64)(flushbufs)(rereadpt)",TOYFLAG_SBIN)) | ||
24 | |||
25 | config BLOCKDEV | ||
26 | bool "blockdev" | ||
27 | diff --git a/toys/other/chrt.c b/toys/other/chrt.c | ||
28 | index a1c37a0..d6db3a5 100644 | ||
29 | --- a/toys/other/chrt.c | ||
30 | +++ b/toys/other/chrt.c | ||
31 | @@ -4,7 +4,7 @@ | ||
32 | * | ||
33 | * Note: -ibrfo flags sorted to match SCHED positions for highest_bit() | ||
34 | |||
35 | -USE_CHRT(NEWTOY(chrt, "^mp#<0iRbrfo[!ibrfo]", TOYFLAG_USR|TOYFLAG_SBIN)) | ||
36 | +USE_CHRT(NEWTOY(chrt, "^mp#<0iRbrfo[!ibrfo]", TOYFLAG_USR|TOYFLAG_BIN)) | ||
37 | |||
38 | config CHRT | ||
39 | bool "chrt" | ||
40 | diff --git a/toys/other/hwclock.c b/toys/other/hwclock.c | ||
41 | index 1d313e3..412582d 100644 | ||
42 | --- a/toys/other/hwclock.c | ||
43 | +++ b/toys/other/hwclock.c | ||
44 | @@ -4,7 +4,7 @@ | ||
45 | * | ||
46 | * No standard, but see Documentation/rtc.txt in the linux kernel source.. | ||
47 | * | ||
48 | -USE_HWCLOCK(NEWTOY(hwclock, ">0(fast)f(rtc):u(utc)l(localtime)t(systz)s(hctosys)r(show)w(systohc)[-ul][!rtsw]", TOYFLAG_USR|TOYFLAG_BIN)) | ||
49 | +USE_HWCLOCK(NEWTOY(hwclock, ">0(fast)f(rtc):u(utc)l(localtime)t(systz)s(hctosys)r(show)w(systohc)[-ul][!rtsw]", TOYFLAG_SBIN)) | ||
50 | |||
51 | config HWCLOCK | ||
52 | bool "hwclock" | ||
53 | diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c | ||
54 | index 1178d67..966a9de 100644 | ||
55 | --- a/toys/other/modinfo.c | ||
56 | +++ b/toys/other/modinfo.c | ||
57 | @@ -4,7 +4,7 @@ | ||
58 | * | ||
59 | * TODO: cleanup | ||
60 | |||
61 | -USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_BIN)) | ||
62 | +USE_MODINFO(NEWTOY(modinfo, "<1b:k:F:0", TOYFLAG_SBIN)) | ||
63 | |||
64 | config MODINFO | ||
65 | bool "modinfo" | ||
66 | diff --git a/toys/other/pmap.c b/toys/other/pmap.c | ||
67 | index abb0a33..2acef02 100644 | ||
68 | --- a/toys/other/pmap.c | ||
69 | +++ b/toys/other/pmap.c | ||
70 | @@ -5,7 +5,7 @@ | ||
71 | * | ||
72 | * No Standard. | ||
73 | |||
74 | -USE_PMAP(NEWTOY(pmap, "<1xq", TOYFLAG_BIN)) | ||
75 | +USE_PMAP(NEWTOY(pmap, "<1xq", TOYFLAG_USR|TOYFLAG_BIN)) | ||
76 | |||
77 | config PMAP | ||
78 | bool "pmap" | ||
79 | diff --git a/toys/other/printenv.c b/toys/other/printenv.c | ||
80 | index e8bcf29..65f62ed 100644 | ||
81 | --- a/toys/other/printenv.c | ||
82 | +++ b/toys/other/printenv.c | ||
83 | @@ -2,7 +2,7 @@ | ||
84 | * | ||
85 | * Copyright 2012 Georgi Chorbadzhiyski <georgi@unixsol.org> | ||
86 | |||
87 | -USE_PRINTENV(NEWTOY(printenv, "0(null)", TOYFLAG_USR|TOYFLAG_BIN)) | ||
88 | +USE_PRINTENV(NEWTOY(printenv, "0(null)", TOYFLAG_BIN)) | ||
89 | |||
90 | config PRINTENV | ||
91 | bool "printenv" | ||
92 | diff --git a/toys/other/taskset.c b/toys/other/taskset.c | ||
93 | index 8ffdab7..89fd528 100644 | ||
94 | --- a/toys/other/taskset.c | ||
95 | +++ b/toys/other/taskset.c | ||
96 | @@ -2,7 +2,7 @@ | ||
97 | * | ||
98 | * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com> | ||
99 | |||
100 | -USE_TASKSET(NEWTOY(taskset, "<1^pa", TOYFLAG_BIN|TOYFLAG_STAYROOT)) | ||
101 | +USE_TASKSET(NEWTOY(taskset, "<1^pa", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT)) | ||
102 | USE_NPROC(NEWTOY(nproc, "(all)", TOYFLAG_USR|TOYFLAG_BIN)) | ||
103 | |||
104 | config NPROC | ||
105 | diff --git a/toys/other/timeout.c b/toys/other/timeout.c | ||
106 | index 9b93466..e1d0f4d 100644 | ||
107 | --- a/toys/other/timeout.c | ||
108 | +++ b/toys/other/timeout.c | ||
109 | @@ -4,7 +4,7 @@ | ||
110 | * | ||
111 | * No standard | ||
112 | |||
113 | -USE_TIMEOUT(NEWTOY(timeout, "<2^vk:s: ", TOYFLAG_BIN)) | ||
114 | +USE_TIMEOUT(NEWTOY(timeout, "<2^vk:s: ", TOYFLAG_USR|TOYFLAG_BIN)) | ||
115 | |||
116 | config TIMEOUT | ||
117 | bool "timeout" | ||
118 | diff --git a/toys/other/truncate.c b/toys/other/truncate.c | ||
119 | index 142d3c7..40eb1e5 100644 | ||
120 | --- a/toys/other/truncate.c | ||
121 | +++ b/toys/other/truncate.c | ||
122 | @@ -2,7 +2,7 @@ | ||
123 | * | ||
124 | * Copyright 2011 Rob Landley <rob@landley.net> | ||
125 | |||
126 | -USE_TRUNCATE(NEWTOY(truncate, "<1s:|c", TOYFLAG_BIN)) | ||
127 | +USE_TRUNCATE(NEWTOY(truncate, "<1s:|c", TOYFLAG_USR|TOYFLAG_BIN)) | ||
128 | |||
129 | config TRUNCATE | ||
130 | bool "truncate" | ||
131 | diff --git a/toys/posix/nice.c b/toys/posix/nice.c | ||
132 | index 4b587ee..9f7b119 100644 | ||
133 | --- a/toys/posix/nice.c | ||
134 | +++ b/toys/posix/nice.c | ||
135 | @@ -4,7 +4,7 @@ | ||
136 | * | ||
137 | * See http://opengroup.org/onlinepubs/9699919799/utilities/nice.html | ||
138 | |||
139 | -USE_NICE(NEWTOY(nice, "^<1n#", TOYFLAG_USR|TOYFLAG_BIN)) | ||
140 | +USE_NICE(NEWTOY(nice, "^<1n#", TOYFLAG_BIN)) | ||
141 | |||
142 | config NICE | ||
143 | bool "nice" | ||
144 | diff --git a/toys/posix/nl.c b/toys/posix/nl.c | ||
145 | index 9b02bfa..41e1b89 100644 | ||
146 | --- a/toys/posix/nl.c | ||
147 | +++ b/toys/posix/nl.c | ||
148 | @@ -7,7 +7,7 @@ | ||
149 | * This implements a subset: only one logical page (-ip), no sections (-dfh). | ||
150 | * todo: -lv | ||
151 | |||
152 | -USE_NL(NEWTOY(nl, "v#<1=1l#b:n:s:w#<0=6E", TOYFLAG_BIN)) | ||
153 | +USE_NL(NEWTOY(nl, "v#<1=1l#b:n:s:w#<0=6E", TOYFLAG_USR|TOYFLAG_BIN)) | ||
154 | |||
155 | config NL | ||
156 | bool "nl" | ||
157 | diff --git a/toys/posix/paste.c b/toys/posix/paste.c | ||
158 | index ea04f02..8972f71 100644 | ||
159 | --- a/toys/posix/paste.c | ||
160 | +++ b/toys/posix/paste.c | ||
161 | @@ -6,7 +6,7 @@ | ||
162 | * | ||
163 | * Deviations from posix: the FILE argument isn't mandatory, none == '-' | ||
164 | |||
165 | -USE_PASTE(NEWTOY(paste, "d:s", TOYFLAG_BIN|TOYFLAG_LOCALE)) | ||
166 | +USE_PASTE(NEWTOY(paste, "d:s", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE)) | ||
167 | |||
168 | config PASTE | ||
169 | bool "paste" | ||
170 | diff --git a/toys/posix/ps.c b/toys/posix/ps.c | ||
171 | index aef2a7f..b559e09 100644 | ||
172 | --- a/toys/posix/ps.c | ||
173 | +++ b/toys/posix/ps.c | ||
174 | @@ -44,7 +44,7 @@ | ||
175 | * TODO: top: thread support and SMP | ||
176 | * TODO: pgrep -f only searches the amount of cmdline that fits in toybuf. | ||
177 | |||
178 | -USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][!oO]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE)) | ||
179 | +USE_PS(NEWTOY(ps, "k(sort)*P(ppid)*aAdeflMno*O*p(pid)*s*t*Tu*U*g*G*wZ[!ol][+Ae][!oO]", TOYFLAG_BIN|TOYFLAG_LOCALE)) | ||
180 | // stayroot because iotop needs root to read other process' proc/$$/io | ||
181 | USE_TOP(NEWTOY(top, ">0m" "O*Hk*o*p*u*s#<1d#=3<1n#<1bq[!oO]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE)) | ||
182 | USE_IOTOP(NEWTOY(iotop, ">0AaKO" "k*o*p*u*s#<1=7d#=3<1n#<1bq", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT|TOYFLAG_LOCALE)) | ||
183 | diff --git a/toys/posix/sed.c b/toys/posix/sed.c | ||
184 | index cf7d15e..130ac08 100644 | ||
185 | --- a/toys/posix/sed.c | ||
186 | +++ b/toys/posix/sed.c | ||
187 | @@ -10,7 +10,7 @@ | ||
188 | * TODO: handle error return from emit(), error_msg/exit consistently | ||
189 | * What's the right thing to do for -i when write fails? Skip to next? | ||
190 | |||
191 | -USE_SED(NEWTOY(sed, "(help)(version)e*f*inEr[+Er]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP)) | ||
192 | +USE_SED(NEWTOY(sed, "(help)(version)e*f*inEr[+Er]", TOYFLAG_BIN|TOYFLAG_LOCALE|TOYFLAG_NOHELP)) | ||
193 | |||
194 | config SED | ||
195 | bool "sed" | ||
diff --git a/meta-oe/recipes-core/toybox/toybox/mips-no-STKFLT.patch b/meta-oe/recipes-core/toybox/toybox/mips-no-STKFLT.patch new file mode 100644 index 0000000000..7ab95932cf --- /dev/null +++ b/meta-oe/recipes-core/toybox/toybox/mips-no-STKFLT.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | glibc on mips is missing SIGSTKFLT | ||
2 | |||
3 | Do not therefore assume it being available linuxwide | ||
4 | |||
5 | Fixes | ||
6 | | lib/portability.c:433:3: error: use of undeclared identifier 'SIGSTKFLT' | ||
7 | | SIGNIFY(STKFLT), SIGNIFY(POLL), SIGNIFY(PWR), | ||
8 | | ^ | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/landley/toybox/pull/195] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- a/lib/portability.c | ||
13 | +++ b/lib/portability.c | ||
14 | @@ -430,7 +430,10 @@ static const struct signame signames[] = | ||
15 | // Non-POSIX signals that cause termination | ||
16 | SIGNIFY(PROF), SIGNIFY(IO), | ||
17 | #ifdef __linux__ | ||
18 | - SIGNIFY(STKFLT), SIGNIFY(POLL), SIGNIFY(PWR), | ||
19 | +# if !defined(__GLIBC__) && !defined(__mips__) | ||
20 | + SIGNIFY(STKFLT), | ||
21 | +# endif | ||
22 | + SIGNIFY(POLL), SIGNIFY(PWR), | ||
23 | #elif defined(__APPLE__) | ||
24 | SIGNIFY(EMT), SIGNIFY(INFO), | ||
25 | #endif | ||
diff --git a/meta-oe/recipes-core/toybox/toybox_0.7.5.bb b/meta-oe/recipes-core/toybox/toybox_0.8.3.bb index 2f82978334..4e72f295d3 100644 --- a/meta-oe/recipes-core/toybox/toybox_0.7.5.bb +++ b/meta-oe/recipes-core/toybox/toybox_0.8.3.bb | |||
@@ -3,21 +3,35 @@ HOMEPAGE = "http://www.landley.net/toybox/" | |||
3 | DEPENDS = "attr virtual/crypt" | 3 | DEPENDS = "attr virtual/crypt" |
4 | 4 | ||
5 | LICENSE = "BSD-0-Clause" | 5 | LICENSE = "BSD-0-Clause" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=78659a599b9325da368f2f1eb88f19c7" |
7 | 7 | ||
8 | inherit cml1 update-alternatives | 8 | inherit cml1 update-alternatives |
9 | 9 | ||
10 | SRC_URI = "http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz \ | 10 | SRC_URI = "http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz \ |
11 | file://OE-path-changes.patch \ | 11 | file://mips-no-STKFLT.patch \ |
12 | file://0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch \ | ||
12 | " | 13 | " |
13 | SRC_URI[md5sum] = "a8bb502a1be941f06dd2644fff25f547" | 14 | SRC_URI[sha256sum] = "eab28fd29d19d4e61ef09704e5871940e6f35fd35a3bb1285e41f204504b5c01" |
14 | SRC_URI[sha256sum] = "3ada450ac1eab1dfc352fee915ea6129b9a4349c1885f1394b61bd2d89a46c04" | ||
15 | 15 | ||
16 | SECTION = "base" | 16 | SECTION = "base" |
17 | 17 | ||
18 | TOYBOX_BIN = "generated/unstripped/toybox" | 18 | TOYBOX_BIN = "generated/unstripped/toybox" |
19 | 19 | ||
20 | EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}' | 20 | # Toybox is strict on what CC, CFLAGS and CROSS_COMPILE variables should contain. |
21 | # Fix CC, CFLAGS, CROSS_COMPILE to match expectations. | ||
22 | # CC = compiler name | ||
23 | # CFLAGS = only compiler flags | ||
24 | # CROSS_COMPILE = compiler prefix | ||
25 | CFLAGS += "${TOOLCHAIN_OPTIONS} ${TUNE_CCARGS}" | ||
26 | |||
27 | COMPILER_toolchain-clang = "clang" | ||
28 | COMPILER ?= "gcc" | ||
29 | |||
30 | EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \ | ||
31 | CC="${COMPILER}" \ | ||
32 | STRIP="strip" \ | ||
33 | CFLAGS="${CFLAGS}" \ | ||
34 | HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()} V=1' | ||
21 | 35 | ||
22 | do_configure() { | 36 | do_configure() { |
23 | # allow user to define their own defconfig in bbappend, taken from kernel.bbclass | 37 | # allow user to define their own defconfig in bbappend, taken from kernel.bbclass |