diff options
4 files changed, 167 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch new file mode 100644 index 0000000000..4c41cd8902 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From 70926666f7c5c35add363e3bcade6eaabace7206 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sinan Kaya <sinan.kaya@microsoft.com> | ||
| 3 | Date: Mon, 3 Feb 2020 03:25:57 +0000 | ||
| 4 | Subject: [PATCH] Remove maes option from cross-compilation | ||
| 5 | |||
| 6 | --- | ||
| 7 | absl/copts/GENERATED_AbseilCopts.cmake | 4 ---- | ||
| 8 | absl/copts/GENERATED_copts.bzl | 4 ---- | ||
| 9 | absl/copts/copts.py | 4 ---- | ||
| 10 | 3 files changed, 12 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake | ||
| 13 | index 01bd40b..af99694 100644 | ||
| 14 | --- a/absl/copts/GENERATED_AbseilCopts.cmake | ||
| 15 | +++ b/absl/copts/GENERATED_AbseilCopts.cmake | ||
| 16 | @@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS | ||
| 17 | "/Ob2" | ||
| 18 | ) | ||
| 19 | |||
| 20 | -list(APPEND ABSL_RANDOM_HWAES_X64_FLAGS | ||
| 21 | - "-maes" | ||
| 22 | - "-msse4.1" | ||
| 23 | -) | ||
| 24 | diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl | ||
| 25 | index 82f332f..9a548d1 100644 | ||
| 26 | --- a/absl/copts/GENERATED_copts.bzl | ||
| 27 | +++ b/absl/copts/GENERATED_copts.bzl | ||
| 28 | @@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [ | ||
| 29 | "/Ob2", | ||
| 30 | ] | ||
| 31 | |||
| 32 | -ABSL_RANDOM_HWAES_X64_FLAGS = [ | ||
| 33 | - "-maes", | ||
| 34 | - "-msse4.1", | ||
| 35 | -] | ||
| 36 | diff --git a/absl/copts/copts.py b/absl/copts/copts.py | ||
| 37 | index 068abce..c2f70fb 100644 | ||
| 38 | --- a/absl/copts/copts.py | ||
| 39 | +++ b/absl/copts/copts.py | ||
| 40 | @@ -203,10 +203,6 @@ COPT_VARS = { | ||
| 41 | # to improve performance of some random bit generators. | ||
| 42 | "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"], | ||
| 43 | "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"], | ||
| 44 | - "ABSL_RANDOM_HWAES_X64_FLAGS": [ | ||
| 45 | - "-maes", | ||
| 46 | - "-msse4.1", | ||
| 47 | - ], | ||
| 48 | "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [ | ||
| 49 | "/O2", # Maximize speed | ||
| 50 | "/Ob2", # Aggressive inlining | ||
| 51 | -- | ||
| 52 | 2.23.0 | ||
| 53 | |||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch new file mode 100644 index 0000000000..fab4a738ea --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 9384735383a0b8688e3f05ed23a53f18863eae20 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sinan Kaya <sinan.kaya@microsoft.com> | ||
| 3 | Date: Tue, 11 Feb 2020 11:36:00 -0500 | ||
| 4 | Subject: [PATCH] Add forgotten ABSL_HAVE_VDSO_SUPPORT conditional | ||
| 5 | |||
| 6 | Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com> | ||
| 7 | --- | ||
| 8 | absl/debugging/internal/stacktrace_x86-inl.inc | 4 ++++ | ||
| 9 | 1 file changed, 4 insertions(+) | ||
| 10 | |||
| 11 | diff --git a/absl/debugging/internal/stacktrace_x86-inl.inc b/absl/debugging/internal/stacktrace_x86-inl.inc | ||
| 12 | index ff0fd31..28607c3 100644 | ||
| 13 | --- a/absl/debugging/internal/stacktrace_x86-inl.inc | ||
| 14 | +++ b/absl/debugging/internal/stacktrace_x86-inl.inc | ||
| 15 | @@ -171,6 +171,7 @@ static void **NextStackFrame(void **old_fp, const void *uc) { | ||
| 16 | static const unsigned char *kernel_rt_sigreturn_address = nullptr; | ||
| 17 | static const unsigned char *kernel_vsyscall_address = nullptr; | ||
| 18 | if (num_push_instructions == -1) { | ||
| 19 | +#ifdef ABSL_HAVE_VDSO_SUPPORT | ||
| 20 | absl::debugging_internal::VDSOSupport vdso; | ||
| 21 | if (vdso.IsPresent()) { | ||
| 22 | absl::debugging_internal::VDSOSupport::SymbolInfo | ||
| 23 | @@ -199,6 +200,9 @@ static void **NextStackFrame(void **old_fp, const void *uc) { | ||
| 24 | } else { | ||
| 25 | num_push_instructions = 0; | ||
| 26 | } | ||
| 27 | +#else | ||
| 28 | + num_push_instructions = 0; | ||
| 29 | +#endif | ||
| 30 | } | ||
| 31 | if (num_push_instructions != 0 && kernel_rt_sigreturn_address != nullptr && | ||
| 32 | old_fp[1] == kernel_rt_sigreturn_address) { | ||
| 33 | -- | ||
| 34 | 2.20.1.windows.1 | ||
| 35 | |||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch new file mode 100644 index 0000000000..bb78813a7f --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0003-Add-fPIC-option.patch | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | From d7160d647c8f8847f3ea8d7b0eb222936962c1af Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sinan Kaya <sinan.kaya@microsoft.com> | ||
| 3 | Date: Tue, 11 Feb 2020 11:58:02 -0500 | ||
| 4 | Subject: [PATCH] Add fPIC option | ||
| 5 | |||
| 6 | Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com> | ||
| 7 | --- | ||
| 8 | CMakeLists.txt | 3 +++ | ||
| 9 | 1 file changed, 3 insertions(+) | ||
| 10 | |||
| 11 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 12 | index 74a3a4c..4f837b3 100644 | ||
| 13 | --- a/CMakeLists.txt | ||
| 14 | +++ b/CMakeLists.txt | ||
| 15 | @@ -79,6 +79,9 @@ option(ABSL_USE_GOOGLETEST_HEAD | ||
| 16 | |||
| 17 | option(ABSL_RUN_TESTS "If ON, Abseil tests will be run." OFF) | ||
| 18 | |||
| 19 | +# link fails on arm64 and x86-64 without this | ||
| 20 | +add_compile_options(-fPIC) | ||
| 21 | + | ||
| 22 | if(${ABSL_RUN_TESTS}) | ||
| 23 | # enable CTest. This will set BUILD_TESTING to ON unless otherwise specified | ||
| 24 | # on the command line | ||
| 25 | -- | ||
| 26 | 2.20.1.windows.1 | ||
| 27 | |||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb new file mode 100644 index 0000000000..77afba8de9 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | SUMMARY = "Abseil is a cpp library like STL" | ||
| 2 | DESCRIPTION = "Abseil provides pieces missing from the C++ standard. Contains \ | ||
| 3 | additional useful libraries like algorithm, container, debugging, hash, memory, \ | ||
| 4 | meta, numeric, strings, synchronization, time, types and utility" | ||
| 5 | HOMEPAGE = "https://abseil.io/" | ||
| 6 | SECTION = "libs" | ||
| 7 | LICENSE = "Apache-2.0" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915" | ||
| 9 | |||
| 10 | SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde" | ||
| 11 | BRANCH = "lts_2019_08_08" | ||
| 12 | SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH} \ | ||
| 13 | file://0001-Remove-maes-option-from-cross-compilation.patch \ | ||
| 14 | file://0002-Add-forgotten-ABSL_HAVE_VDSO_SUPPORT-conditional.patch \ | ||
| 15 | file://0003-Add-fPIC-option.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | S = "${WORKDIR}/git" | ||
| 19 | |||
| 20 | ASNEEDED_class-native = "" | ||
| 21 | ASNEEDED_class-nativesdk = "" | ||
| 22 | |||
| 23 | inherit cmake | ||
| 24 | |||
| 25 | BBCLASSEXTEND = "native nativesdk" | ||
| 26 | ALLOW_EMPTY_${PN} = "1" | ||
| 27 | |||
| 28 | python () { | ||
| 29 | arch = d.getVar("TARGET_ARCH") | ||
| 30 | |||
| 31 | if arch == "aarch64": | ||
| 32 | tunes = d.getVar("TUNE_FEATURES") | ||
| 33 | if not tunes: | ||
| 34 | raise bb.parse.SkipPackage("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv)) | ||
| 35 | return | ||
| 36 | pkgn = d.getVar("PN") | ||
| 37 | pkgv = d.getVar("PV") | ||
| 38 | if "crypto" not in tunes: | ||
| 39 | raise bb.parse.SkipPackage("%s-%s Needs support for crypto on armv8" % (pkgn, pkgv)) | ||
| 40 | |||
| 41 | if arch == "x86_64": | ||
| 42 | tunes = d.getVar("TUNE_FEATURES") | ||
| 43 | if not tunes: | ||
| 44 | raise bb.parse.SkipPackage("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv)) | ||
| 45 | return | ||
| 46 | pkgn = d.getVar("PN") | ||
| 47 | pkgv = d.getVar("PV") | ||
| 48 | if "corei7" not in tunes: | ||
| 49 | raise bb.parse.SkipPackage("%s-%s Needs support for corei7 on x86_64" % (pkgn, pkgv)) | ||
| 50 | |||
| 51 | } | ||
| 52 | |||
