meta-arago-extras: Backport abseil-cpp from meta-oe master
PATCH v2 1/1 meta-arago-extras: Backport abseil-cpp from meta-oe master
ONNX and ONNX Runtime depend on a very specific version of Abseil that is not the version included with meta-oe scarthgap. But it just so happens to be the version provided in current meta-oe master. Backport this version for our use in scarthgap.
This patch is not needed for meta-arago master branch. If meta-oe master at some point moves to a newer incompatible version of Abseil we will deal with this dependency in a different way.
Signed-off-by Andrew Davis <[email protected]>
---
Changes for v2:
- Split from the ONNX series as this one is only needed on scarthgap
.../0001-absl-always-use-asm-sgidefs.h.patch | 38 +++++++ ...e-maes-option-from-cross-compilation.patch | 38 +++++++ ...e-neon-option-from-cross-compilation.patch | 49 +++++++++ .../abseil-cpp/0004-abseil-ppc-fixes.patch | 103 ++++++++++++++++++ ...-virtual-dtor-in-the-flags-are-neede.patch | 30 +++++ .../abseil-cpp/abseil-cpp_20240722.0.bb | 54 +++++++++ 6 files changed, 312 insertions(+) create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch create mode 100644 meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0001-absl-always-use-asm-sgidefs.h.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 11faa06436fdeb0c9948080a11f9a99d3b5ba16c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 9 Apr 2020 13:06:27 -0700 +Subject: [PATCH] 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 <[email protected]> +--- + 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 1beb2ee4..140b0697 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 +
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0002-Remove-maes-option-from-cross-compilation.patch new file +38 -0
@@ -0,0 +1,38 @@ +From a573ccd57e713486e7d8e782d6b3b34fde01ff9e Mon Sep 17 00:00:00 2001 +From: Sinan Kaya <[email protected]> +Date: Mon, 3 Feb 2020 03:25:57 +0000 +Subject: [PATCH] Remove maes option from cross-compilation + +Upstream-Status: Pending +--- + 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 da2282fe..5e0e8dfd 100644 +--- a/absl/copts/GENERATED_AbseilCopts.cmake ++++ b/absl/copts/GENERATED_AbseilCopts.cmake +@@ -229,7 +229,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 b9e0071e..0072008c 100644 +--- a/absl/copts/GENERATED_copts.bzl ++++ b/absl/copts/GENERATED_copts.bzl +@@ -230,7 +230,3 @@ ABSL_RANDOM_HWAES_ARM64_FLAGS = [ + ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [ + ] + +-ABSL_RANDOM_HWAES_X64_FLAGS = [ +- "-maes", +- "-msse4.1", +-] +-- +2.25.1 +
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0003-Remove-neon-option-from-cross-compilation.patch new file +49 -0
49 lines not on this page · raw message
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0004-abseil-ppc-fixes.patch new file +103 -0
103 lines not on this page · raw message
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp/0005-Don-t-match-Wnon-virtual-dtor-in-the-flags-are-neede.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 9cb5e5d15c142e5cc43a2c1db87c8e4e5b6d38a5 Mon Sep 17 00:00:00 2001 +From: Derek Mauro <[email protected]> +Date: Mon, 5 Aug 2024 07:35:05 -0700 +Subject: [PATCH] Don't match -Wnon-virtual-dtor in the "flags are needed to + suppress warnings in headers". It should fall through to the "don't impose + our warnings on others" case. Do this by matching on "-Wno-*" instead of + "-Wno*". + +Fixes #1737 + +PiperOrigin-RevId: 659548798 +Change-Id: I49d7ba7ddcd7be30f946fca90ba9be467181e854 +Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/9cb5e5d15c142e5cc43a2c1db87c8e4e5b6d38a5] +--- + CMake/AbseilHelpers.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake +index b177e590..3c4c92fe 100644 +--- a/CMake/AbseilHelpers.cmake ++++ b/CMake/AbseilHelpers.cmake +@@ -195,7 +195,7 @@ function(absl_cc_library) + # specified platform. Filter both of them out before the successor + # reaches the "^-m" filter. + set(skip_next_cflag ON) +- elseif(${cflag} MATCHES "^(-Wno|/wd)") ++ elseif(${cflag} MATCHES "^(-Wno-|/wd)") + # These flags are needed to suppress warnings that might fire in our headers. + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
meta-arago-extras/recipes-devtools/abseil-cpp/abseil-cpp_20240722.0.bb new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.39.2