Skip to contentSkip to conversation

klibc: Fix build with clang

PATCH New Khem Raj 1 participant 4 messages Aug 1, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 klibc: Fix build with clang

Remove gcc specific options use common one instead

---
 ...c-Use-print-libgcc-file-name-instead-of-p.patch | 30 ++++++++++++++++++++++
 meta-initramfs/recipes-devtools/klibc/klibc.inc    |  5 ++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch
meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch new file +30 -0
new file mode 100644
index 000000000..41cc14275
@@ -0,0 +1,30 @@
+From f66edde8a704131d98e8783ea8d4c848e8119b20 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 26 Jul 2017 16:13:16 -0700
+Subject: [PATCH 1/3] Kbuild.klibc: Use -print-libgcc-file-name instead of
+ --print-libgcc
+
+-print-libgcc-file-name works with clang and gcc unlike --print-libgcc
+which is gcc specific
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ scripts/Kbuild.klibc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
+index f500d535..101f86f5 100644
+--- a/scripts/Kbuild.klibc
++++ b/scripts/Kbuild.klibc
+@@ -128,7 +128,7 @@ KLIBCCFLAGS      += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS)  \
+ KLIBCAFLAGS      += -D__ASSEMBLY__ $(KLIBCCFLAGS)
+ KLIBCSTRIPFLAGS  += --strip-all -R .comment -R .note
+ 
+-KLIBCLIBGCC_DEF  := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
++KLIBCLIBGCC_DEF  := $(shell $(KLIBCCC) $(KLIBCCFLAGS) -print-libgcc-file-name)
+ KLIBCLIBGCC	 ?= $(KLIBCLIBGCC_DEF)
+ KLIBCCRT0        := $(KLIBCOBJ)/arch/$(KLIBCARCHDIR)/crt0.o
+ KLIBCLIBC        := $(KLIBCOBJ)/libc.a
+-- 
+2.13.3
+
meta-initramfs/recipes-devtools/klibc/klibc.inc +5 -0
index cd3f39808..45dc6baef 100644
@@ -17,6 +17,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
            file://0001-include-linux-sysinfo.h-directly.patch \
            file://0001-mkfifo-Implement-mkfifo.patch \
            file://0001-always-use-bfd-linker.patch \
+           file://0001-Kbuild.klibc-Use-print-libgcc-file-name-instead-of-p.patch \
 "
 
 ARMPATCHES ?= ""
@@ -48,6 +49,10 @@ do_configure () {
     ln -sf "${STAGING_DIR_TARGET}${exec_prefix}" linux
 }
 
+do_configure_prepend_toolchain-clang() {
+    sed -i -e 's#$(KLIBCROSS)gcc#$(KLIBCROSS)clang#g' ${S}/Makefile
+}
+
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 INSANE_SKIP_${PN} = "already-stripped"
Signature · 1 line
2.13.3
author
#1 lore raw

PATCH 2/4 ninja,re2c: Remove

Moved to OE-Core

---
 meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb     | 30 -----------------------
 meta-oe/recipes-support/re2c/re2c/configure.patch | 18 --------------
 meta-oe/recipes-support/re2c/re2c_0.13.5.bb       | 15 ------------
 3 files changed, 63 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb
 delete mode 100644 meta-oe/recipes-support/re2c/re2c/configure.patch
 delete mode 100644 meta-oe/recipes-support/re2c/re2c_0.13.5.bb
meta-oe/recipes-devtools/ninja/ninja_1.7.2.bb deleted +0 -30
deleted file mode 100644
index 932e3a6ed..000000000
@@ -1,30 +0,0 @@
-SUMMARY = "Ninja is a small build system with a focus on speed."
-HOMEPAGE = "http://martine.github.com/ninja/"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"
-
-DEPENDS = "re2c-native ninja-native"
-
-SRCREV = "717b7b4a31db6027207588c0fb89c3ead384747b"
-
-SRC_URI = "git://github.com/martine/ninja.git;branch=release"
-
-S = "${WORKDIR}/git"
-
-do_configure[noexec] = "1"
-
-do_compile_class-native() {
-    ./configure.py --bootstrap
-}
-
-do_compile() {
-    ./configure.py
-    ninja
-}
-
-do_install() {
-    install -d ${D}${bindir}
-    install -m 0755 ${S}/ninja ${D}${bindir}/
-}
-
-BBCLASSEXTEND = "native nativesdk"
meta-oe/recipes-support/re2c/re2c/configure.patch deleted +0 -18
deleted file mode 100644
index 8ca0969ad..000000000
@@ -1,18 +0,0 @@
-Modernise configure to work with modern automake.
-
-RP 2014/7/14
-
-Upstream-Status: Pending
-
-Index: re2c-0.13.5/configure.in
-===================================================================
---- re2c-0.13.5.orig/configure.in	2008-05-25 14:42:34.000000000 +0000
-+++ re2c-0.13.5/configure.in	2014-07-17 14:10:40.595821292 +0000
-@@ -1,6 +1,6 @@
- AC_PREREQ([2.57])
- AC_INIT(re2c, 0.13.5, [email protected])
--AM_INIT_AUTOMAKE(re2c, $PACKAGE_VERSION)
-+AM_INIT_AUTOMAKE([foreign])
- AC_CONFIG_SRCDIR(actions.cc)
- AM_CONFIG_HEADER(config.h)
- 
meta-oe/recipes-support/re2c/re2c_0.13.5.bb deleted +0 -15
deleted file mode 100644
index dcac940f8..000000000
@@ -1,15 +0,0 @@
-SUMMARY = "Tool for writing very fast and very flexible scanners"
-HOMEPAGE = "http://re2c.sourceforge.net/"
-AUTHOR = "Marcus Börger <[email protected]>"
-SECTION = "devel"
-LICENSE = "PD"
-LIC_FILES_CHKSUM = "file://README;beginline=180;md5=822830a2204aef353f2c489f62e02089"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
-           file://configure.patch"
-SRC_URI[md5sum] = "4a97d8f77ed6d2c76c8bd840a43f5633"
-SRC_URI[sha256sum] = "f3a995139af475e80a30207d02728b1e0065b0caade7375e974cb1b14861668c"
-
-BBCLASSEXTEND = "native"
-
-inherit autotools
Signature · 1 line
2.13.3
author
#2 lore raw

PATCH 3/4 ndisc6: Upgrade to 1.0.3

In reply to Khem Raj
---
 .../recipes-support/ndisc6/{ndisc6_1.0.2.bb => ndisc6_1.0.3.bb}       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-networking/recipes-support/ndisc6/{ndisc6_1.0.2.bb => ndisc6_1.0.3.bb} (94%)
meta-networking/recipes-support/ndisc6/ndisc6_1.0.3.bb renamed from meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb +2 -2
similarity index 94%
rename from meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb
rename to meta-networking/recipes-support/ndisc6/ndisc6_1.0.3.bb
index bea5e13f5..0b5c9e467 100644
@@ -12,8 +12,8 @@ RDEPENDS_${PN}-misc += "perl"
 
 SRC_URI = "http://www.remlab.net/files/ndisc6/ndisc6-${PV}.tar.bz2 \
 "
-SRC_URI[md5sum] = "50cb4c19606cf6ff2b7388e71832f579"
-SRC_URI[sha256sum] = "6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a"
+SRC_URI[md5sum] = "21afdaa3a5a5c1ce50eb7f2b7d795989"
+SRC_URI[sha256sum] = "0f41d6caf5f2edc1a12924956ae8b1d372e3b426bd7b11eed7d38bc974eec821"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
Signature · 1 line
2.13.3
author
#3 lore raw

PATCH 4/4 memcached: Update to 1.5.0

In reply to Khem Raj
---
 .../memcached/{memcached_1.4.36.bb => memcached_1.5.0.bb}             | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta-networking/recipes-support/memcached/{memcached_1.4.36.bb => memcached_1.5.0.bb} (92%)
meta-networking/recipes-support/memcached/memcached_1.5.0.bb renamed from meta-networking/recipes-support/memcached/memcached_1.4.36.bb +2 -2
similarity index 92%
rename from meta-networking/recipes-support/memcached/memcached_1.4.36.bb
rename to meta-networking/recipes-support/memcached/memcached_1.5.0.bb
index 48c3c9ee2..fd3d171f0 100644
@@ -22,8 +22,8 @@ RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \
 SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \
            file://memcached-add-hugetlbfs-check.patch \
            "
-SRC_URI[md5sum] = "1e028fbab7288911fcaa5ed2a21817fe"
-SRC_URI[sha256sum] = "773b6bb20bf80223ca6a15d75f570fbab346ad11ec98595e5af5e33f54bd82d8"
+SRC_URI[md5sum] = "81326513f60d7ba482f8131975cd55ae"
+SRC_URI[sha256sum] = "c001f812024bb461b5e4d7d0506daab63dff9614eea26f46536c3b7e1e601c32"
 
 # set the same COMPATIBLE_HOST as libhugetlbfs
 COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux'
Signature · 1 line
2.13.3