Skip to content

Commit

Permalink
toybox: bump version to 0.8.3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
amiartus authored and kraj committed May 21, 2020
1 parent b5cb4b9 commit eaf4a81
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 200 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 9e5b1420b89813ee3c58c2b792077fa8bb71f327 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 21 May 2020 13:53:27 -0700
Subject: [PATCH] Tackle SIGEMT and SIGSTKFLT is not glibc specific

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/portability.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/portability.c b/lib/portability.c
index 294141c6..1c7ebc12 100644
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -430,8 +430,11 @@ static const struct signame signames[] = {
// Non-POSIX signals that cause termination
SIGNIFY(PROF), SIGNIFY(IO),
#ifdef __linux__
-# if !defined(__GLIBC__) && !defined(__mips__)
+# ifdef SIGSTKFLT
SIGNIFY(STKFLT),
+# endif
+# ifdef SIGEMT
+ SIGNIFY(EMT),
# endif
SIGNIFY(POLL), SIGNIFY(PWR),
#elif defined(__APPLE__)
--
2.26.2

195 changes: 0 additions & 195 deletions meta-oe/recipes-core/toybox/toybox/OE-path-changes.patch

This file was deleted.

25 changes: 25 additions & 0 deletions meta-oe/recipes-core/toybox/toybox/mips-no-STKFLT.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
glibc on mips is missing SIGSTKFLT

Do not therefore assume it being available linuxwide

Fixes
| lib/portability.c:433:3: error: use of undeclared identifier 'SIGSTKFLT'
| SIGNIFY(STKFLT), SIGNIFY(POLL), SIGNIFY(PWR),
| ^

Upstream-Status: Submitted [https://github.com/landley/toybox/pull/195]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -430,7 +430,10 @@ static const struct signame signames[] =
// Non-POSIX signals that cause termination
SIGNIFY(PROF), SIGNIFY(IO),
#ifdef __linux__
- SIGNIFY(STKFLT), SIGNIFY(POLL), SIGNIFY(PWR),
+# if !defined(__GLIBC__) && !defined(__mips__)
+ SIGNIFY(STKFLT),
+# endif
+ SIGNIFY(POLL), SIGNIFY(PWR),
#elif defined(__APPLE__)
SIGNIFY(EMT), SIGNIFY(INFO),
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@ HOMEPAGE = "http://www.landley.net/toybox/"
DEPENDS = "attr virtual/crypt"

LICENSE = "BSD-0-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f0b8b3dd6431bcaa245da0a08bd0d511"
LIC_FILES_CHKSUM = "file://LICENSE;md5=78659a599b9325da368f2f1eb88f19c7"

inherit cml1 update-alternatives

SRC_URI = "http://www.landley.net/toybox/downloads/${BPN}-${PV}.tar.gz \
file://OE-path-changes.patch \
file://mips-no-STKFLT.patch \
file://0001-Tackle-SIGEMT-and-SIGSTKFLT-is-not-glibc-specific.patch \
"
SRC_URI[md5sum] = "a8bb502a1be941f06dd2644fff25f547"
SRC_URI[sha256sum] = "3ada450ac1eab1dfc352fee915ea6129b9a4349c1885f1394b61bd2d89a46c04"
SRC_URI[sha256sum] = "eab28fd29d19d4e61ef09704e5871940e6f35fd35a3bb1285e41f204504b5c01"

SECTION = "base"

TOYBOX_BIN = "generated/unstripped/toybox"

EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}'
# Toybox is strict on what CC, CFLAGS and CROSS_COMPILE variables should contain.
# Fix CC, CFLAGS, CROSS_COMPILE to match expectations.
# CC = compiler name
# CFLAGS = only compiler flags
# CROSS_COMPILE = compiler prefix
CFLAGS += "${TOOLCHAIN_OPTIONS} ${TUNE_CCARGS}"

COMPILER_toolchain-clang = "clang"
COMPILER ?= "gcc"

EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \
CC="${COMPILER}" \
STRIP="strip" \
CFLAGS="${CFLAGS}" \
HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()} V=1'

do_configure() {
# allow user to define their own defconfig in bbappend, taken from kernel.bbclass
Expand Down

0 comments on commit eaf4a81

Please sign in to comment.