All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] abseil-cpp: add recipe for git version
@ 2020-02-09  3:46 Sinan Kaya
  2020-02-09  7:53 ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Sinan Kaya @ 2020-02-09  3:46 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Sinan Kaya, Changyi Li

The repository contains the Abseil C++ library code. Abseil is an
open-source collection of C++ code (compliant to C++11) designed to
augment the C++ standard library.

https://github.com/abseil/abseil-cpp

Signed-off-by: Changyi Li <Changyu.Li@microsoft.com>
Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
---
 ...e-maes-option-from-cross-compilation.patch | 53 +++++++++++++++++++
 .../abseil-cpp/abseil-cpp_git.bb              | 27 ++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
 create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb

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 @@
+From 70926666f7c5c35add363e3bcade6eaabace7206 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] Remove maes option from cross-compilation
+
+---
+ absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
+ absl/copts/GENERATED_copts.bzl         | 4 ----
+ absl/copts/copts.py                    | 4 ----
+ 3 files changed, 12 deletions(-)
+
+diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
+index 01bd40b..af99694 100644
+--- a/absl/copts/GENERATED_AbseilCopts.cmake
++++ b/absl/copts/GENERATED_AbseilCopts.cmake
+@@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
+     "/Ob2"
+ )
+ 
+-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 82f332f..9a548d1 100644
+--- a/absl/copts/GENERATED_copts.bzl
++++ b/absl/copts/GENERATED_copts.bzl
+@@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
+     "/Ob2",
+ ]
+ 
+-ABSL_RANDOM_HWAES_X64_FLAGS = [
+-    "-maes",
+-    "-msse4.1",
+-]
+diff --git a/absl/copts/copts.py b/absl/copts/copts.py
+index 068abce..c2f70fb 100644
+--- a/absl/copts/copts.py
++++ b/absl/copts/copts.py
+@@ -203,10 +203,6 @@ COPT_VARS = {
+     # to improve performance of some random bit generators.
+     "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"],
+     "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"],
+-    "ABSL_RANDOM_HWAES_X64_FLAGS": [
+-        "-maes",
+-        "-msse4.1",
+-    ],
+     "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
+         "/O2",  # Maximize speed
+         "/Ob2",  # Aggressive inlining
+-- 
+2.23.0
+
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..c7077c129f
--- /dev/null
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Abseil is a cpp library like STL"
+DESCRIPTION = "It's got containers, algorithms, useful stuff!"
+HOMEPAGE = ""
+SECTION = "libs"
+LICENSE = "Apache-2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
+
+SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
+BRANCH = "lts_2019_08_08"
+SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}         \
+           file://0001-Remove-maes-option-from-cross-compilation.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'aarch64', ' -march=armv8-a+crypto', '', d)}"
+TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'x64', ' -maes -msse4.1', '', d)}"
+
+CXXFLAGS_append_class-nativesdk = " -Wl,--no-as-needed -fPIC"
+CXXFLAGS_append_class-native = " -Wl,--no-as-needed -fPIC"
+CXXFLAGS_append_class-target = " -fPIC"
+
+inherit cmake
+
+BBCLASSEXTEND = "native nativesdk"
+ALLOW_EMPTY_${PN} = "1"
+
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09  3:46 [meta-oe][PATCH] abseil-cpp: add recipe for git version Sinan Kaya
@ 2020-02-09  7:53 ` Khem Raj
  2020-02-09 16:56   ` Khem Raj
  2020-02-10 16:31   ` Sinan Kaya
  0 siblings, 2 replies; 10+ messages in thread
From: Khem Raj @ 2020-02-09  7:53 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On Sat, Feb 8, 2020 at 7:56 PM Sinan Kaya <okaya@kernel.org> wrote:
>
> The repository contains the Abseil C++ library code. Abseil is an
> open-source collection of C++ code (compliant to C++11) designed to
> augment the C++ standard library.
>
> https://github.com/abseil/abseil-cpp
>
> Signed-off-by: Changyi Li <Changyu.Li@microsoft.com>
> Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
> ---
>  ...e-maes-option-from-cross-compilation.patch | 53 +++++++++++++++++++
>  .../abseil-cpp/abseil-cpp_git.bb              | 27 ++++++++++
>  2 files changed, 80 insertions(+)
>  create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
>  create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
>
> 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 @@
> +From 70926666f7c5c35add363e3bcade6eaabace7206 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] Remove maes option from cross-compilation
> +
> +---
> + absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
> + absl/copts/GENERATED_copts.bzl         | 4 ----
> + absl/copts/copts.py                    | 4 ----
> + 3 files changed, 12 deletions(-)
> +
> +diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
> +index 01bd40b..af99694 100644
> +--- a/absl/copts/GENERATED_AbseilCopts.cmake
> ++++ b/absl/copts/GENERATED_AbseilCopts.cmake
> +@@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
> +     "/Ob2"
> + )
> +
> +-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 82f332f..9a548d1 100644
> +--- a/absl/copts/GENERATED_copts.bzl
> ++++ b/absl/copts/GENERATED_copts.bzl
> +@@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
> +     "/Ob2",
> + ]
> +
> +-ABSL_RANDOM_HWAES_X64_FLAGS = [
> +-    "-maes",
> +-    "-msse4.1",
> +-]
> +diff --git a/absl/copts/copts.py b/absl/copts/copts.py
> +index 068abce..c2f70fb 100644
> +--- a/absl/copts/copts.py
> ++++ b/absl/copts/copts.py
> +@@ -203,10 +203,6 @@ COPT_VARS = {
> +     # to improve performance of some random bit generators.
> +     "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"],
> +     "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"],
> +-    "ABSL_RANDOM_HWAES_X64_FLAGS": [
> +-        "-maes",
> +-        "-msse4.1",
> +-    ],
> +     "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
> +         "/O2",  # Maximize speed
> +         "/Ob2",  # Aggressive inlining
> +--
> +2.23.0
> +
> 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..c7077c129f
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
> @@ -0,0 +1,27 @@
> +SUMMARY = "Abseil is a cpp library like STL"
> +DESCRIPTION = "It's got containers, algorithms, useful stuff!"

maybe we can be more specific about it from
https://github.com/abseil/abseil-cpp/blob/master/README.md

> +HOMEPAGE = ""

perhaps https://abseil.io/ instead of leaving it empty is better.

> +SECTION = "libs"
> +LICENSE = "Apache-2"

The current value is not wrong but Apache-2.0 would be better to match SPDX

> +LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
> +
> +SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
> +BRANCH = "lts_2019_08_08"
> +SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}         \
> +           file://0001-Remove-maes-option-from-cross-compilation.patch \
> +          "
> +
> +S = "${WORKDIR}/git"
> +
> +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'aarch64', ' -march=armv8-a+crypto', '', d)}"
> +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'x64', ' -maes -msse4.1', '', d)}"
> +
> +CXXFLAGS_append_class-nativesdk = " -Wl,--no-as-needed -fPIC"
> +CXXFLAGS_append_class-native = " -Wl,--no-as-needed -fPIC"

perhaps use ASNEEDED_<override> = ""

> +CXXFLAGS_append_class-target = " -fPIC"
> +
> +inherit cmake
> +
> +BBCLASSEXTEND = "native nativesdk"
> +ALLOW_EMPTY_${PN} = "1"

why do we need this ?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09  7:53 ` Khem Raj
@ 2020-02-09 16:56   ` Khem Raj
  2020-02-09 17:45     ` Sinan Kaya
  2020-02-10 16:31   ` Sinan Kaya
  1 sibling, 1 reply; 10+ messages in thread
From: Khem Raj @ 2020-02-09 16:56 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

It also fails to build on musl
https://errors.yoctoproject.org/Errors/Details/390527/

On Sat, Feb 8, 2020 at 11:53 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Sat, Feb 8, 2020 at 7:56 PM Sinan Kaya <okaya@kernel.org> wrote:
> >
> > The repository contains the Abseil C++ library code. Abseil is an
> > open-source collection of C++ code (compliant to C++11) designed to
> > augment the C++ standard library.
> >
> > https://github.com/abseil/abseil-cpp
> >
> > Signed-off-by: Changyi Li <Changyu.Li@microsoft.com>
> > Signed-off-by: Sinan Kaya <sinan.kaya@microsoft.com>
> > ---
> >  ...e-maes-option-from-cross-compilation.patch | 53 +++++++++++++++++++
> >  .../abseil-cpp/abseil-cpp_git.bb              | 27 ++++++++++
> >  2 files changed, 80 insertions(+)
> >  create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Remove-maes-option-from-cross-compilation.patch
> >  create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
> >
> > 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 @@
> > +From 70926666f7c5c35add363e3bcade6eaabace7206 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] Remove maes option from cross-compilation
> > +
> > +---
> > + absl/copts/GENERATED_AbseilCopts.cmake | 4 ----
> > + absl/copts/GENERATED_copts.bzl         | 4 ----
> > + absl/copts/copts.py                    | 4 ----
> > + 3 files changed, 12 deletions(-)
> > +
> > +diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
> > +index 01bd40b..af99694 100644
> > +--- a/absl/copts/GENERATED_AbseilCopts.cmake
> > ++++ b/absl/copts/GENERATED_AbseilCopts.cmake
> > +@@ -230,7 +230,3 @@ list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
> > +     "/Ob2"
> > + )
> > +
> > +-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 82f332f..9a548d1 100644
> > +--- a/absl/copts/GENERATED_copts.bzl
> > ++++ b/absl/copts/GENERATED_copts.bzl
> > +@@ -231,7 +231,3 @@ ABSL_RANDOM_HWAES_MSVC_X64_FLAGS = [
> > +     "/Ob2",
> > + ]
> > +
> > +-ABSL_RANDOM_HWAES_X64_FLAGS = [
> > +-    "-maes",
> > +-    "-msse4.1",
> > +-]
> > +diff --git a/absl/copts/copts.py b/absl/copts/copts.py
> > +index 068abce..c2f70fb 100644
> > +--- a/absl/copts/copts.py
> > ++++ b/absl/copts/copts.py
> > +@@ -203,10 +203,6 @@ COPT_VARS = {
> > +     # to improve performance of some random bit generators.
> > +     "ABSL_RANDOM_HWAES_ARM64_FLAGS": ["-march=armv8-a+crypto"],
> > +     "ABSL_RANDOM_HWAES_ARM32_FLAGS": ["-mfpu=neon"],
> > +-    "ABSL_RANDOM_HWAES_X64_FLAGS": [
> > +-        "-maes",
> > +-        "-msse4.1",
> > +-    ],
> > +     "ABSL_RANDOM_HWAES_MSVC_X64_FLAGS": [
> > +         "/O2",  # Maximize speed
> > +         "/Ob2",  # Aggressive inlining
> > +--
> > +2.23.0
> > +
> > 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..c7077c129f
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
> > @@ -0,0 +1,27 @@
> > +SUMMARY = "Abseil is a cpp library like STL"
> > +DESCRIPTION = "It's got containers, algorithms, useful stuff!"
>
> maybe we can be more specific about it from
> https://github.com/abseil/abseil-cpp/blob/master/README.md
>
> > +HOMEPAGE = ""
>
> perhaps https://abseil.io/ instead of leaving it empty is better.
>
> > +SECTION = "libs"
> > +LICENSE = "Apache-2"
>
> The current value is not wrong but Apache-2.0 would be better to match SPDX
>
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
> > +
> > +SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
> > +BRANCH = "lts_2019_08_08"
> > +SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}         \
> > +           file://0001-Remove-maes-option-from-cross-compilation.patch \
> > +          "
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'aarch64', ' -march=armv8-a+crypto', '', d)}"
> > +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'x64', ' -maes -msse4.1', '', d)}"
> > +
> > +CXXFLAGS_append_class-nativesdk = " -Wl,--no-as-needed -fPIC"
> > +CXXFLAGS_append_class-native = " -Wl,--no-as-needed -fPIC"
>
> perhaps use ASNEEDED_<override> = ""
>
> > +CXXFLAGS_append_class-target = " -fPIC"
> > +
> > +inherit cmake
> > +
> > +BBCLASSEXTEND = "native nativesdk"
> > +ALLOW_EMPTY_${PN} = "1"
>
> why do we need this ?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09 16:56   ` Khem Raj
@ 2020-02-09 17:45     ` Sinan Kaya
  2020-02-09 18:40       ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Sinan Kaya @ 2020-02-09 17:45 UTC (permalink / raw)
  To: Khem Raj; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On 2/9/2020 11:56 AM, Khem Raj wrote:
> It also fails to build on musl
> https://errors.yoctoproject.org/Errors/Details/390527/
> 
> On Sat, Feb 8, 2020 at 11:53 PM Khem Raj <raj.khem@gmail.com> wrote:


This library requires "-march=armv8-a+crypto"

-fvisibility-inlines-hidden

Yet, it is getting compiled with: -march=armv8-a+crc

What's the bet way to handle this


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09 17:45     ` Sinan Kaya
@ 2020-02-09 18:40       ` Khem Raj
  2020-02-10 16:33         ` Sinan Kaya
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2020-02-09 18:40 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On Sun, Feb 9, 2020 at 9:45 AM Sinan Kaya <okaya@kernel.org> wrote:
>
> On 2/9/2020 11:56 AM, Khem Raj wrote:
> > It also fails to build on musl
> > https://errors.yoctoproject.org/Errors/Details/390527/
> >
> > On Sat, Feb 8, 2020 at 11:53 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>
> This library requires "-march=armv8-a+crypto"
>
> -fvisibility-inlines-hidden
>
> Yet, it is getting compiled with: -march=armv8-a+crc
>

This means the recipe should be checking for crypto being present in
TUNE_FEATURES
and be marked incompatible if this is not available.

mark it compatible only on architectures where
it works which it seems are only arm/x86, and on aarch64 particularly
check for CPU feature it requires
something on the lines below

python () {
    arch = d.getVar("TARGET_ARCH")

    if arch == "aarch64":
        tunes = d.getVar("TUNE_FEATURES")
        if not tunes:
            return
        pkgn = d.getVar("PN")
        pkgv = d.getVar("PV")
        if "crypto" not in tunes:
            raise bb.parse.SkipPackage("%s-%s Needs support for crypto
on armv8" % (pkgn, pkgv))
}

> What's the bet way to handle this


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09  7:53 ` Khem Raj
  2020-02-09 16:56   ` Khem Raj
@ 2020-02-10 16:31   ` Sinan Kaya
  1 sibling, 0 replies; 10+ messages in thread
From: Sinan Kaya @ 2020-02-10 16:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On 2/9/2020 2:53 AM, Khem Raj wrote:
>> +SUMMARY = "Abseil is a cpp library like STL"
>> +DESCRIPTION = "It's got containers, algorithms, useful stuff!"
> maybe we can be more specific about it from
> https://github.com/abseil/abseil-cpp/blob/master/README.md
> 
>> +HOMEPAGE = ""
> perhaps https://abseil.io/ instead of leaving it empty is better.
> 
done

>> +SECTION = "libs"
>> +LICENSE = "Apache-2"
> The current value is not wrong but Apache-2.0 would be better to match SPDX
> 
done

>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"
>> +
>> +SRCREV = "aa844899c937bde5d2b24f276b59997e5b668bde"
>> +BRANCH = "lts_2019_08_08"
>> +SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}         \
>> +           file://0001-Remove-maes-option-from-cross-compilation.patch \
>> +          "
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'aarch64', '
>> -march=armv8-a+crypto', '', d)}"
>> +TARGET_CXXFLAGS += "${@bb.utils.contains('TARGET_ARCH', 'x64', ' -maes -msse4.1', '', d)}"
>> +
>> +CXXFLAGS_append_class-nativesdk = " -Wl,--no-as-needed -fPIC"
>> +CXXFLAGS_append_class-native = " -Wl,--no-as-needed -fPIC"
> perhaps use ASNEEDED_<override> = ""

done

> 
>> +CXXFLAGS_append_class-target = " -fPIC"
>> +
>> +inherit cmake
>> +
>> +BBCLASSEXTEND = "native nativesdk"
>> +ALLOW_EMPTY_${PN} = "1"
> why do we need this ?

Library generates an empty $PN package and I had problems linking the
library to the new grpc version without producing the empty ${PN}.
This library is requires by the newer grpc versions.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-09 18:40       ` Khem Raj
@ 2020-02-10 16:33         ` Sinan Kaya
  2020-02-10 17:14           ` Sinan Kaya
  0 siblings, 1 reply; 10+ messages in thread
From: Sinan Kaya @ 2020-02-10 16:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On 2/9/2020 1:40 PM, Khem Raj wrote:
> python () {
>     arch = d.getVar("TARGET_ARCH")
> 
>     if arch == "aarch64":
>         tunes = d.getVar("TUNE_FEATURES")
>         if not tunes:
>             return
>         pkgn = d.getVar("PN")
>         pkgv = d.getVar("PV")
>         if "crypto" not in tunes:
>             raise bb.parse.SkipPackage("%s-%s Needs support for crypto
> on armv8" % (pkgn, pkgv))
> }

thanks, I'm adding this now.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-10 16:33         ` Sinan Kaya
@ 2020-02-10 17:14           ` Sinan Kaya
  2020-02-10 17:22             ` Andrey Zhizhikin
  0 siblings, 1 reply; 10+ messages in thread
From: Sinan Kaya @ 2020-02-10 17:14 UTC (permalink / raw)
  To: Khem Raj; +Cc: Sinan Kaya, openembeded-devel, Changyi Li

On 2/10/2020 11:33 AM, Sinan Kaya wrote:
> On 2/9/2020 1:40 PM, Khem Raj wrote:
>> python () {
>>     arch = d.getVar("TARGET_ARCH")
>>
>>     if arch == "aarch64":
>>         tunes = d.getVar("TUNE_FEATURES")
>>         if not tunes:
>>             return
>>         pkgn = d.getVar("PN")
>>         pkgv = d.getVar("PV")
>>         if "crypto" not in tunes:
>>             raise bb.parse.SkipPackage("%s-%s Needs support for crypto
>> on armv8" % (pkgn, pkgv))
>> }
> thanks, I'm adding this now.
> 

Hmm....

I don't see a crypto feature on aarch64. tunes value return just
aarch64.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-10 17:14           ` Sinan Kaya
@ 2020-02-10 17:22             ` Andrey Zhizhikin
  2020-02-10 17:39               ` Sinan Kaya
  0 siblings, 1 reply; 10+ messages in thread
From: Andrey Zhizhikin @ 2020-02-10 17:22 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Sinan Kaya, Changyi Li, openembeded-devel

On Mon, Feb 10, 2020 at 6:15 PM Sinan Kaya <okaya@kernel.org> wrote:
>
> On 2/10/2020 11:33 AM, Sinan Kaya wrote:
> > On 2/9/2020 1:40 PM, Khem Raj wrote:
> >> python () {
> >>     arch = d.getVar("TARGET_ARCH")
> >>
> >>     if arch == "aarch64":
> >>         tunes = d.getVar("TUNE_FEATURES")
> >>         if not tunes:
> >>             return
> >>         pkgn = d.getVar("PN")
> >>         pkgv = d.getVar("PV")
> >>         if "crypto" not in tunes:
> >>             raise bb.parse.SkipPackage("%s-%s Needs support for crypto
> >> on armv8" % (pkgn, pkgv))
> >> }
> > thanks, I'm adding this now.
> >
>
> Hmm....
>
> I don't see a crypto feature on aarch64. tunes value return just
> aarch64.

AFAIK, this is a AArch64 derivative-specific tune. For example,
extracted from [meta/conf/machine/include/tune-cortexa53.inc]:
TUNE_FEATURES_tune-cortexa53          = "aarch64 cortexa53 crc"
TUNE_FEATURES_tune-cortexa53-crypto   = "aarch64 cortexa53 crc crypto"

As you can see, there are 2 sets of features listed. Generic ARMv8
does not provide a Crypto extension, but individual A-profiles might
have those integrated.

>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Regards,
Andrey.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [meta-oe][PATCH] abseil-cpp: add recipe for git version
  2020-02-10 17:22             ` Andrey Zhizhikin
@ 2020-02-10 17:39               ` Sinan Kaya
  0 siblings, 0 replies; 10+ messages in thread
From: Sinan Kaya @ 2020-02-10 17:39 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: Sinan Kaya, Changyi Li, openembeded-devel

On 2/10/2020 12:22 PM, Andrey Zhizhikin wrote:
> AFAIK, this is a AArch64 derivative-specific tune. For example,
> extracted from [meta/conf/machine/include/tune-cortexa53.inc]:
> TUNE_FEATURES_tune-cortexa53          = "aarch64 cortexa53 crc"
> TUNE_FEATURES_tune-cortexa53-crypto   = "aarch64 cortexa53 crc crypto"
> 
> As you can see, there are 2 sets of features listed. Generic ARMv8
> does not provide a Crypto extension, but individual A-profiles might
> have those integrated.

I see. I'll use this to test the recipe.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-02-10 17:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-09  3:46 [meta-oe][PATCH] abseil-cpp: add recipe for git version Sinan Kaya
2020-02-09  7:53 ` Khem Raj
2020-02-09 16:56   ` Khem Raj
2020-02-09 17:45     ` Sinan Kaya
2020-02-09 18:40       ` Khem Raj
2020-02-10 16:33         ` Sinan Kaya
2020-02-10 17:14           ` Sinan Kaya
2020-02-10 17:22             ` Andrey Zhizhikin
2020-02-10 17:39               ` Sinan Kaya
2020-02-10 16:31   ` Sinan Kaya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.