added my Recipes
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
From 738549dea7a4e6c462a79962c414eaa450c2cffd Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 9 Apr 2020 13:06:27 -0700
|
||||
Subject: [PATCH 1/3] absl: always use <asm/sgidefs.h>
|
||||
|
||||
Fixes mips/musl build, since sgidefs.h is not present on all C libraries
|
||||
but on linux asm/sgidefs.h is there and contains same definitions, using
|
||||
that makes it portable.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
absl/base/internal/direct_mmap.h | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
|
||||
index e492bb0..c8a4fba 100644
|
||||
--- a/absl/base/internal/direct_mmap.h
|
||||
+++ b/absl/base/internal/direct_mmap.h
|
||||
@@ -41,13 +41,9 @@
|
||||
|
||||
#ifdef __mips__
|
||||
// Include definitions of the ABI currently in use.
|
||||
-#if defined(__BIONIC__) || !defined(__GLIBC__)
|
||||
-// Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the
|
||||
+// bionic/musl C libs don't have sgidefs.h, but do have asm/sgidefs.h, which has the
|
||||
// definitions we need.
|
||||
#include <asm/sgidefs.h>
|
||||
-#else
|
||||
-#include <sgidefs.h>
|
||||
-#endif // __BIONIC__ || !__GLIBC__
|
||||
#endif // __mips__
|
||||
|
||||
// SYS_mmap and SYS_munmap are not defined in Android.
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 28 Dec 2022 18:24:21 -0800
|
||||
Subject: [PATCH] direct_mmap: Use off_t on linux
|
||||
|
||||
off64_t is not provided without defining _LARGEFILE64_SOURCE on musl
|
||||
this define is not defined automatically like glibc where it gets
|
||||
defined when _GNU_SOURCE is defined. Using off_t makes it portable
|
||||
across musl/glibc and for using 64bit off_t on glibc 32bit systems
|
||||
-D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
absl/base/internal/direct_mmap.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
|
||||
index 815b8d23..fdf88f0b 100644
|
||||
--- a/absl/base/internal/direct_mmap.h
|
||||
+++ b/absl/base/internal/direct_mmap.h
|
||||
@@ -72,7 +72,7 @@ namespace base_internal {
|
||||
// Platform specific logic extracted from
|
||||
// https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h
|
||||
inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
|
||||
- off64_t offset) noexcept {
|
||||
+ off_t offset) noexcept {
|
||||
#if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
|
||||
defined(__m68k__) || defined(__sh__) || \
|
||||
(defined(__hppa__) && !defined(__LP64__)) || \
|
||||
@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
|
||||
#else
|
||||
return reinterpret_cast<void*>(
|
||||
syscall(SYS_mmap2, start, length, prot, flags, fd,
|
||||
- static_cast<off_t>(offset / pagesize)));
|
||||
+ offset / pagesize));
|
||||
#endif
|
||||
#elif defined(__s390x__)
|
||||
// On s390x, mmap() arguments are passed in memory.
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From d25cf3b9aa873595a19e197cc29ab46c0093bff1 Mon Sep 17 00:00:00 2001
|
||||
From: Sinan Kaya <sinan.kaya@microsoft.com>
|
||||
Date: Mon, 3 Feb 2020 03:25:57 +0000
|
||||
Subject: [PATCH 2/3] Remove maes option from cross-compilation
|
||||
|
||||
---
|
||||
absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
|
||||
absl/copts/GENERATED_copts.bzl | 4 ----
|
||||
2 files changed, 8 deletions(-)
|
||||
|
||||
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
index a4ab1aa2041e..23b9253c1f00 100644
|
||||
--- a/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
@@ -158,7 +158,3 @@ list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
|
||||
list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
|
||||
)
|
||||
|
||||
-list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS
|
||||
- "-maes"
|
||||
- "-msse4.1"
|
||||
-)
|
||||
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
|
||||
index a6efc98e11d4..1e847f769501 100644
|
||||
--- a/absl/copts/GENERATED_copts.bzl
|
||||
+++ b/absl/copts/GENERATED_copts.bzl
|
||||
@@ -159,7 +159,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [
|
||||
ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
|
||||
]
|
||||
|
||||
-ABSL_RANDOM_HWAES_X64_FLAGS = [
|
||||
- "-maes",
|
||||
- "-msse4.1",
|
||||
-]
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From fb24c3e3539b5743d398a429a302a3886186f261 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@bisdn.de>
|
||||
Date: Thu, 16 Jun 2022 11:46:31 +0000
|
||||
Subject: [PATCH 3/3] Remove neon option from cross compilation
|
||||
|
||||
Not every arm platform supports neon instructions, so do not enforce
|
||||
them.
|
||||
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
|
||||
---
|
||||
absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
|
||||
absl/copts/GENERATED_copts.bzl | 4 ----
|
||||
2 files changed, 8 deletions(-)
|
||||
|
||||
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
index 23b9253c1f00..5d112a97f3e4 100644
|
||||
--- a/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
|
||||
@@ -147,10 +147,6 @@ list(APPEND ABSL_MSVC_TEST_FLAGS
|
||||
"/DNOMINMAX"
|
||||
)
|
||||
|
||||
-list(APPEND ABSL_RANDOM_HWAES_ARM32_FLAGS
|
||||
- "-mfpu=neon"
|
||||
-)
|
||||
-
|
||||
list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
|
||||
"-march=armv8-a+crypto"
|
||||
)
|
||||
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
|
||||
index 1e847f769501..3e10db204faf 100644
|
||||
--- a/absl/copts/GENERATED_copts.bzl
|
||||
+++ b/absl/copts/GENERATED_copts.bzl
|
||||
@@ -148,10 +148,6 @@ ABSL_MSVC_TEST_FLAGS = [
|
||||
"/DNOMINMAX",
|
||||
]
|
||||
|
||||
-ABSL_RANDOM_HWAES_ARM32_FLAGS = [
|
||||
- "-mfpu=neon",
|
||||
-]
|
||||
-
|
||||
ABSL_RANDOM_HWAES_ARM64_FLAGS = [
|
||||
"-march=armv8-a+crypto",
|
||||
]
|
||||
--
|
||||
2.36.1
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
An all-in-one patch that fixes several issues:
|
||||
|
||||
1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl)
|
||||
2) powerpc stacktrace implementation only works on glibc (disabled on musl)
|
||||
3) powerpc stacktrace implementation has ppc64 assumptions (fixed)
|
||||
4) examine_stack.cpp makes glibc assumptions on powerpc (fixed)
|
||||
|
||||
Sourced from void linux
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
--- a/absl/base/internal/unscaledcycleclock.cc
|
||||
+++ b/absl/base/internal/unscaledcycleclock.cc
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__powerpc__) || defined(__ppc__)
|
||||
+#if (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
|
||||
#ifdef __GLIBC__
|
||||
#include <sys/platform/ppc.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
@@ -58,7 +58,7 @@ double UnscaledCycleClock::Frequency() {
|
||||
return base_internal::NominalCPUFrequency();
|
||||
}
|
||||
|
||||
-#elif defined(__powerpc__) || defined(__ppc__)
|
||||
+#elif (defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)
|
||||
|
||||
int64_t UnscaledCycleClock::Now() {
|
||||
#ifdef __GLIBC__
|
||||
--- a/absl/base/internal/unscaledcycleclock_config.h
|
||||
+++ b/absl/base/internal/unscaledcycleclock_config.h
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
// The following platforms have an implementation of a hardware counter.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
|
||||
- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
|
||||
+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \
|
||||
+ defined(__riscv) || \
|
||||
defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
|
||||
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
|
||||
#else
|
||||
--- a/absl/debugging/internal/examine_stack.cc
|
||||
+++ b/absl/debugging/internal/examine_stack.cc
|
||||
@@ -33,6 +33,10 @@
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
|
||||
+#if defined(__powerpc__)
|
||||
+#include <asm/ptrace.h>
|
||||
+#endif
|
||||
+
|
||||
#include "absl/base/attributes.h"
|
||||
#include "absl/base/internal/raw_logging.h"
|
||||
#include "absl/base/macros.h"
|
||||
@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) {
|
||||
return reinterpret_cast<void*>(context->uc_mcontext.pc);
|
||||
#elif defined(__powerpc64__)
|
||||
return reinterpret_cast<void*>(context->uc_mcontext.gp_regs[32]);
|
||||
-#elif defined(__powerpc__)
|
||||
+#elif defined(__powerpc__) && defined(__GLIBC__)
|
||||
return reinterpret_cast<void*>(context->uc_mcontext.uc_regs->gregs[32]);
|
||||
+#elif defined(__powerpc__)
|
||||
+ return reinterpret_cast<void*>((context->uc_regs)->gregs[32]);
|
||||
#elif defined(__riscv)
|
||||
return reinterpret_cast<void*>(context->uc_mcontext.__gregs[REG_PC]);
|
||||
#elif defined(__s390__) && !defined(__s390x__)
|
||||
--- a/absl/debugging/internal/stacktrace_config.h
|
||||
+++ b/absl/debugging/internal/stacktrace_config.h
|
||||
@@ -60,7 +60,7 @@
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_x86-inl.inc"
|
||||
-#elif defined(__ppc__) || defined(__PPC__)
|
||||
+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
|
||||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_powerpc-inl.inc"
|
||||
#elif defined(__aarch64__)
|
||||
@@ -0,0 +1,36 @@
|
||||
SUMMARY = "Abseil is a cpp library like STL"
|
||||
DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \
|
||||
additional useful libraries like algorithm, container, debugging, hash, memory, \
|
||||
meta, numeric, strings, synchronization, time, types and utility"
|
||||
HOMEPAGE = "https://abseil.io/"
|
||||
SECTION = "libs"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
|
||||
|
||||
PV = "20230125.2"
|
||||
SRCREV = "b971ac5250ea8de900eae9f95e06548d14cd95fe"
|
||||
BRANCH = "lts_2023_01_25"
|
||||
SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \
|
||||
file://0001-absl-always-use-asm-sgidefs.h.patch \
|
||||
file://0002-Remove-maes-option-from-cross-compilation.patch \
|
||||
file://abseil-ppc-fixes.patch \
|
||||
file://0003-Remove-neon-option-from-cross-compilation.patch \
|
||||
file://0001-direct_mmap-Use-off_t-on-linux.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
ASNEEDED:class-native = ""
|
||||
ASNEEDED:class-nativesdk = ""
|
||||
|
||||
inherit cmake
|
||||
|
||||
EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_CXX_STANDARD=14 \
|
||||
-DABSL_ENABLE_INSTALL=ON \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native nativesdk"
|
||||
|
||||
FILES:${PN}-dev += "${includedir} ${libdir}/cmake ${libdir}/pkgconfig"
|
||||
Reference in New Issue
Block a user