From 5a4d3da0c548c295a4c4a79b2935662180e639a0 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 28 Oct 2019 13:14:23 +0200 Subject: klibc: Upgrade 2.0.6 -> 2.0.7 Patches applied upstream removed. Use the release tarball. Signed-off-by: Adrian Bunk Signed-off-by: Khem Raj --- .../0001-Fix-missing-include-in-sys-mman.h.patch | 36 ---------------------- .../klibc/files/klibc-config-eabi.patch | 23 -------------- .../recipes-devtools/klibc/klcc-cross_2.0.6.bb | 32 ------------------- .../recipes-devtools/klibc/klcc-cross_2.0.7.bb | 32 +++++++++++++++++++ .../klibc/klibc-static-utils_2.0.6.bb | 12 -------- .../klibc/klibc-static-utils_2.0.7.bb | 12 ++++++++ .../recipes-devtools/klibc/klibc-utils_2.0.6.bb | 14 --------- .../recipes-devtools/klibc/klibc-utils_2.0.7.bb | 14 +++++++++ meta-initramfs/recipes-devtools/klibc/klibc.inc | 11 ++++--- .../recipes-devtools/klibc/klibc_2.0.6.bb | 26 ---------------- .../recipes-devtools/klibc/klibc_2.0.7.bb | 26 ++++++++++++++++ 11 files changed, 90 insertions(+), 148 deletions(-) delete mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch delete mode 100644 meta-initramfs/recipes-devtools/klibc/files/klibc-config-eabi.patch delete mode 100644 meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.6.bb create mode 100644 meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.7.bb delete mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.6.bb create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.7.bb delete mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.6.bb create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.7.bb delete mode 100644 meta-initramfs/recipes-devtools/klibc/klibc_2.0.6.bb create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc_2.0.7.bb diff --git a/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch deleted file mode 100644 index 4bedef8052..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 36360b16833400de7818151be5588b16ac4fd5bc Mon Sep 17 00:00:00 2001 -From: Barret Rhoden -Date: Thu, 14 Mar 2019 17:30:38 -0400 -Subject: [PATCH] Fix missing include in sys/mman.h - -Linux commit 746c9398f5ac ("arch: move common mmap flags to -linux/mman.h") moved a few mmap flags, particularly MAP_PRIVATE, from -asm/mman.h to linux/mman.h. This broke klibc's build, which uses -MAP_PRIVATE. - -linux/mman.h includes asm/mman.h, so this commit merely includes -linux/mman.h instead of asm/mman.h. - -Signed-off-by: Barret Rhoden -Signed-off-by: Ben Hutchings ---- -Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=d4853d030639cf3542ae39129c18b654d8d4f020] - usr/include/sys/mman.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/include/sys/mman.h b/usr/include/sys/mman.h -index 56f0b65c..3fd626e7 100644 ---- a/usr/include/sys/mman.h -+++ b/usr/include/sys/mman.h -@@ -7,7 +7,7 @@ - - #include - #include --#include -+#include - - #define MAP_FAILED ((void *)-1) - --- -2.23.0 - diff --git a/meta-initramfs/recipes-devtools/klibc/files/klibc-config-eabi.patch b/meta-initramfs/recipes-devtools/klibc/files/klibc-config-eabi.patch deleted file mode 100644 index a6998f86d6..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/files/klibc-config-eabi.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1118cc971917abe19ddb029aa80417f6fd6bb343 Mon Sep 17 00:00:00 2001 -From: Thomas Kunze -Date: Sat, 6 Aug 2011 05:30:14 +0000 -Subject: [PATCH] klibc: initial commit of version 1.5.24 - -Patch was imported from the OpenEmbedded git server -(git://git.openembedded.org/openembedded) -as of commit id b6764cf32ec93547531130dca364fb95e1c495f4 -Signed-off-by: Thomas Kunze - ---- - defconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/defconfig -+++ b/defconfig -@@ -6,5 +6,5 @@ CONFIG_KLIBC_ZLIB=y - CONFIG_REGPARM=y - # ARM options - # CONFIG_KLIBC_THUMB is not set --# CONFIG_AEABI is not set -+CONFIG_AEABI=y - # CONFIG_DEBUG_INFO is not set diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.6.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.6.bb deleted file mode 100644 index 4011aa231e..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.6.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "The klcc crosscompiler for klibc" - -require klibc.inc -DEPENDS = "klibc" - -# no packaging for this crossscript -PACKAGES = "" -inherit nopackages - -SRC_URI += "file://use-env-for-perl.patch" - -# disable task already run in klibc recipe -do_configure[noexec] = "1" - -do_compile() { - oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc -} - -do_install() { - install -d ${D}${bindir_crossscripts}/ - install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc - # Turn the horribly encoded paths into something which sstate can transform using its ususal - # magic by removing all the crazy escaping. - sed -i -e "2i \$TARGETSYSROOT = '${STAGING_DIR_TARGET}';" \ - -e "2i \$NATIVESYSROOT = '${STAGING_DIR_NATIVE}';" \ - -e 's#${@d.getVar("STAGING_DIR_NATIVE").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${NATIVESYSROOT}#g;' \ - -e 's#${@d.getVar("STAGING_DIR_TARGET").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${TARGETSYSROOT}#g' \ - ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc -} - -SYSROOT_DIRS += "${bindir_crossscripts}" -SSTATE_SCAN_FILES += "*-klcc" diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.7.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.7.bb new file mode 100644 index 0000000000..4011aa231e --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.7.bb @@ -0,0 +1,32 @@ +SUMMARY = "The klcc crosscompiler for klibc" + +require klibc.inc +DEPENDS = "klibc" + +# no packaging for this crossscript +PACKAGES = "" +inherit nopackages + +SRC_URI += "file://use-env-for-perl.patch" + +# disable task already run in klibc recipe +do_configure[noexec] = "1" + +do_compile() { + oe_runmake 'INSTALLDIR=${STAGING_DIR_TARGET}${libdir}/klibc' klcc +} + +do_install() { + install -d ${D}${bindir_crossscripts}/ + install -m 0755 klcc/klcc ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc + # Turn the horribly encoded paths into something which sstate can transform using its ususal + # magic by removing all the crazy escaping. + sed -i -e "2i \$TARGETSYSROOT = '${STAGING_DIR_TARGET}';" \ + -e "2i \$NATIVESYSROOT = '${STAGING_DIR_NATIVE}';" \ + -e 's#${@d.getVar("STAGING_DIR_NATIVE").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${NATIVESYSROOT}#g;' \ + -e 's#${@d.getVar("STAGING_DIR_TARGET").replace("/", "\\\\/").replace("-", "\\\\-").replace(".", "\\\\.")}#${TARGETSYSROOT}#g' \ + ${D}${bindir_crossscripts}/${TARGET_PREFIX}klcc +} + +SYSROOT_DIRS += "${bindir_crossscripts}" +SSTATE_SCAN_FILES += "*-klcc" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.6.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.6.bb deleted file mode 100644 index c835fd647a..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.6.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "klibc utils for initramfs statically compiled" - -FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" - -PACKAGES = "${PN}" -FILES_${PN} = "" - -KLIBC_UTILS_VARIANT = "static" -KLIBC_UTILS_PKGNAME = "klibc-static-utils" - -require klibc-utils.inc -require klibc.inc diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.7.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.7.bb new file mode 100644 index 0000000000..c835fd647a --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.7.bb @@ -0,0 +1,12 @@ +SUMMARY = "klibc utils for initramfs statically compiled" + +FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" + +PACKAGES = "${PN}" +FILES_${PN} = "" + +KLIBC_UTILS_VARIANT = "static" +KLIBC_UTILS_PKGNAME = "klibc-static-utils" + +require klibc-utils.inc +require klibc.inc diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.6.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.6.bb deleted file mode 100644 index 06e71cb7b8..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.6.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "klibc utils for initramfs" - -FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" - -PACKAGES = "${PN}" -FILES_${PN} = "" - -KLIBC_UTILS_VARIANT = "shared" -KLIBC_UTILS_PKGNAME = "klibc-utils" - -require klibc-utils.inc -require klibc.inc - -DEPENDS = "klibc" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.7.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.7.bb new file mode 100644 index 0000000000..06e71cb7b8 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.7.bb @@ -0,0 +1,14 @@ +SUMMARY = "klibc utils for initramfs" + +FILESPATH =. "${FILE_DIRNAME}/klibc-${PV}:" + +PACKAGES = "${PN}" +FILES_${PN} = "" + +KLIBC_UTILS_VARIANT = "shared" +KLIBC_UTILS_PKGNAME = "klibc-utils" + +require klibc-utils.inc +require klibc.inc + +DEPENDS = "klibc" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 26689f87e7..e1afe7f33e 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc @@ -5,9 +5,8 @@ SECTION = "libs" LICENSE = "BSD-3-Clause & GPL-2.0 & MIT & Zlib" LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8b" DEPENDS = "linux-libc-headers perl-native" -SRCREV = "22b36d1ae34416bc48869619cbb0cccb2070f48f" -SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \ +SRC_URI = "${KERNELORG_MIRROR}/linux/libs/klibc/2.0/klibc-${PV}.tar.xz \ ${ARMPATCHES} \ file://klcc-consider-sysroot.patch \ file://klcc-cross-accept-clang-options.patch \ @@ -23,16 +22,18 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \ file://0001-klibc-add-getrandom-syscall.patch \ file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \ file://0001-Define-ulocked_-fgets-fread-fwrite-aliases.patch \ - file://0001-Fix-missing-include-in-sys-mman.h.patch \ " ARMPATCHES ?= "" -ARMPATCHES_arm = "file://klibc-config-eabi.patch \ +ARMPATCHES_arm = " \ file://armv4-fix-v4bx.patch \ " -S = "${WORKDIR}/git" +SRC_URI[md5sum] = "712f8bc1a069e03d92584b7f5380c521" +SRC_URI[sha256sum] = "abef2637ca823485d9c90ce9512e2b08a65047ec4da204635eeaef95a41a9122" + +S = "${WORKDIR}/klibc-${PV}" OPTFLAGS = "${TUNE_CCARGS} -Os" OPTFLAGS_append_toolchain-clang = " -fno-builtin-bcmp" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.6.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.6.bb deleted file mode 100644 index 7df0b0a3d5..0000000000 --- a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.6.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "klibc, a small C library for use with initramfs" - -do_install() { - oe_runmake install - # the crosscompiler is packaged by klcc-cross - # remove klcc - rm ${D}${bindir}/klcc - # remove now empty dir - rmdir ${D}${bindir} - install -d ${D}${libdir} - install -m 755 usr/klibc/klibc-*.so ${D}${libdir} - (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) - rm -rf ${D}${exec_prefix}/man - rm -rf ${D}${libdir}/klibc/bin -} - -PACKAGES = "libklibc libklibc-staticdev libklibc-dev" - -FILES_libklibc = "${libdir}/klibc-*.so" -FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" -FILES_libklibc-dev = "${libdir}/klibc.so \ - ${libdir}/klibc/lib/* \ - ${libdir}/klibc/include/* \ - " - -require klibc.inc diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.7.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.7.bb new file mode 100644 index 0000000000..7df0b0a3d5 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.7.bb @@ -0,0 +1,26 @@ +SUMMARY = "klibc, a small C library for use with initramfs" + +do_install() { + oe_runmake install + # the crosscompiler is packaged by klcc-cross + # remove klcc + rm ${D}${bindir}/klcc + # remove now empty dir + rmdir ${D}${bindir} + install -d ${D}${libdir} + install -m 755 usr/klibc/klibc-*.so ${D}${libdir} + (cd ${D}${libdir}; ln -s klibc-*.so klibc.so) + rm -rf ${D}${exec_prefix}/man + rm -rf ${D}${libdir}/klibc/bin +} + +PACKAGES = "libklibc libklibc-staticdev libklibc-dev" + +FILES_libklibc = "${libdir}/klibc-*.so" +FILES_libklibc-staticdev = "${libdir}/klibc/lib/libc.a" +FILES_libklibc-dev = "${libdir}/klibc.so \ + ${libdir}/klibc/lib/* \ + ${libdir}/klibc/include/* \ + " + +require klibc.inc -- cgit v1.2.3-54-g00ecf