added my Recipes
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 00f822ab79b6c06936147af4d832e439cecf0fc0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 7 Jan 2023 19:31:58 -0800
|
||||
Subject: [PATCH] build: Use ilp32d abi on riscv32 and lp64d on rv64
|
||||
|
||||
ilp32d is common ABI used for linux distributions therefore a better
|
||||
default, similarily lp64d is common ABI for rv64 linux
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/concurrencykit/ck/pull/204]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
build/ck.build.riscv | 2 +-
|
||||
build/ck.build.riscv64 | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build/ck.build.riscv b/build/ck.build.riscv
|
||||
index 61e0033..11ac840 100644
|
||||
--- a/build/ck.build.riscv
|
||||
+++ b/build/ck.build.riscv
|
||||
@@ -1 +1 @@
|
||||
-CFLAGS+=-mabi=ilp32
|
||||
+CFLAGS+=-mabi=ilp32d
|
||||
diff --git a/build/ck.build.riscv64 b/build/ck.build.riscv64
|
||||
index 9f89791..7639bd6 100644
|
||||
--- a/build/ck.build.riscv64
|
||||
+++ b/build/ck.build.riscv64
|
||||
@@ -1 +1 @@
|
||||
-CFLAGS+=-mabi=lp64
|
||||
+CFLAGS+=-mabi=lp64d
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
From e1dcd27e816520bdabc69511d90c4a2ebc242831 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 6 Jan 2023 18:51:34 -0800
|
||||
Subject: [PATCH] configure: Fix compoiler detection logic for
|
||||
cross-compilation
|
||||
|
||||
We can not run binaries during cross compile, so poke at compiler to
|
||||
figure out if it is clang or gcc, for OE we do not have other compilers
|
||||
in opensource world if there are we can extend this logic
|
||||
|
||||
Upstream-Status: Inappropriate [OE-Specific]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure | 56 ++++++++++++++++---------------------------------------
|
||||
1 file changed, 16 insertions(+), 40 deletions(-)
|
||||
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -661,48 +661,24 @@ if test "$PROFILE"; then
|
||||
fi
|
||||
|
||||
printf "Finding suitable compiler........"
|
||||
-if test ! -x "${CC}"; then
|
||||
- CC=`pathsearch "${CC:-cc}"`
|
||||
- if test -z "$CC" -o ! -x "$CC"; then
|
||||
- CC=`pathsearch "${CC:-gcc}"`
|
||||
- fi
|
||||
+if test -z "$CC"; then
|
||||
+ if test ! -x "${CC}"; then
|
||||
+ CC=`pathsearch "${CC:-cc}"`
|
||||
+ if test -z "$CC" -o ! -x "$CC"; then
|
||||
+ CC=`pathsearch "${CC:-gcc}"`
|
||||
+ fi
|
||||
+ fi
|
||||
+ assert "$CC" "not found"
|
||||
+fi
|
||||
+if `$CC --version | grep gcc > /dev/null 2>&1`; then
|
||||
+ COMPILER=gcc
|
||||
+elif `$CC --version | grep clang > /dev/null 2>&1`; then
|
||||
+ COMPILER=clang
|
||||
+else
|
||||
+ COMPILER="not-found"
|
||||
fi
|
||||
-assert "$CC" "not found"
|
||||
-
|
||||
-cat << EOF > .1.c
|
||||
-#include <stdio.h>
|
||||
-int main(void) {
|
||||
-#if defined(_WIN32)
|
||||
-#if defined(__MINGW64__)
|
||||
- puts("mingw64");
|
||||
- return (0);
|
||||
-#elif defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION >= 3)
|
||||
- puts("mingw32");
|
||||
- return (0);
|
||||
-#else
|
||||
- return (1);
|
||||
-#endif /* __MINGW32__ && __MINGW32_MAJOR_VERSION >= 3 */
|
||||
-#elif defined(__clang__) && (__clang_major__ >= 3)
|
||||
- puts("clang");
|
||||
- return (0);
|
||||
-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5110)
|
||||
- puts("suncc");
|
||||
- return (0);
|
||||
-#elif defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
- puts("gcc");
|
||||
- return (0);
|
||||
-#else
|
||||
- return (1);
|
||||
-#endif
|
||||
-}
|
||||
-EOF
|
||||
-
|
||||
-$CC -o .1 .1.c
|
||||
-COMPILER=`./.1 2> /dev/null`
|
||||
-r=$?
|
||||
-rm -f .1.c .1
|
||||
|
||||
-if test "$r" -ne 0; then
|
||||
+if test "$COMPILER" = "not-found"; then
|
||||
assert "" "update compiler"
|
||||
else
|
||||
echo "success [$CC]"
|
||||
@@ -0,0 +1,42 @@
|
||||
DESCRIPTION = "Concurrency Kit provides a plethora of concurrency primitives, \
|
||||
safe memory reclamation mechanisms and non-blocking data structures \
|
||||
designed to aid in the design and implementation of high performance \
|
||||
concurrent systems."
|
||||
|
||||
LICENSE = "BSD-2-Clause & Apache-2.0"
|
||||
HOMEPAGE = "http://concurrencykit.org"
|
||||
SECTION = "base"
|
||||
|
||||
PV = "0.7.0+git${SRCPV}"
|
||||
SRCREV = "6e8e5bec2e2f8cef2072a68579cbb07ababf3331"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a0b24c1a8f9ad516a297d055b0294231"
|
||||
SRC_URI = "git://github.com/concurrencykit/ck.git;branch=master;protocol=https \
|
||||
file://0001-configure-Fix-compoiler-detection-logic-for-cross-co.patch \
|
||||
file://0001-build-Use-ilp32d-abi-on-riscv32-and-lp64d-on-rv64.patch"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64|powerpc|powerpc64|riscv32|riscv64).*-linux*"
|
||||
|
||||
inherit autotools-brokensep
|
||||
|
||||
PLAT:powerpc64 = "ppc64"
|
||||
PLAT:powerpc64le = "ppc64"
|
||||
PLAT:riscv32 = "riscv"
|
||||
PLAT ?= "${HOST_ARCH}"
|
||||
|
||||
do_configure () {
|
||||
export PLATFORM=${PLAT}
|
||||
${S}/configure \
|
||||
--prefix=${prefix} \
|
||||
--includedir=${includedir} \
|
||||
--libdir=${libdir}
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
}
|
||||
Reference in New Issue
Block a user