public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] vulkan-samples: fix do_compile failure
@ 2020-11-12  6:02 Changqing Li
  2020-11-12  6:28 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Changqing Li @ 2020-11-12  6:02 UTC (permalink / raw)
  To: openembedded-core

fix error:
| framework/lib/ppc/libframework.a(device.cpp.o): in function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
| /usr/include/c++/10.2.0/bits/atomic_base.h:426: undefined reference to `__atomic_load_8'

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 ...ts.txt-link-atomic-for-arch-ppc-mips.patch | 33 +++++++++++++++++++
 .../vulkan/vulkan-samples_git.bb              |  3 ++
 2 files changed, 36 insertions(+)
 create mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch

diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch
new file mode 100644
index 0000000000..54bd90c610
--- /dev/null
+++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch
@@ -0,0 +1,33 @@
+From e7cccf6626e9a7e20f963f8bbbffc9dae3863ce8 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 12 Nov 2020 08:10:51 +0800
+Subject: [PATCH] CMakeLists.txt: link atomic for arch ppc/mips
+
+fix error:
+| framework/lib/ppc/libframework.a(device.cpp.o): in function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
+| /usr/include/c++/10.2.0/bits/atomic_base.h:426: undefined reference to `__atomic_load_8'
+
+Upstream-Status: oe-specific
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ framework/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
+index bf26786..4d8c594 100644
+--- a/framework/CMakeLists.txt
++++ b/framework/CMakeLists.txt
+@@ -410,7 +410,8 @@ target_link_libraries(${PROJECT_NAME}
+     glslang-default-resource-limits
+     spdlog
+     ctpl
+-    docopt)
++    docopt
++    atomic)
+ 
+ # Link platform specific libraries
+ if(ANDROID)
+-- 
+2.17.1
+
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 241a313a7b..f9d6c9b1de 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -6,6 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
 SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git \
            file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \
            "
+SRC_URI_append_mipsarch = "file://0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch"
+SRC_URI_append_powerpc = "file://0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch"
+
 UPSTREAM_CHECK_COMMITS = "1"
 SRCREV = "f52361d3cd6ac8c30fc3365a464b4e220c32cfd6"
 
-- 
2.26.2


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

* Re: [OE-core] [PATCH] vulkan-samples: fix do_compile failure
  2020-11-12  6:02 [PATCH] vulkan-samples: fix do_compile failure Changqing Li
@ 2020-11-12  6:28 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2020-11-12  6:28 UTC (permalink / raw)
  To: Changqing Li; +Cc: Patches and discussions about the oe-core layer

On Wed, Nov 11, 2020 at 10:02 PM Changqing Li
<changqing.li@windriver.com> wrote:
>
> fix error:
> | framework/lib/ppc/libframework.a(device.cpp.o): in function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
> | /usr/include/c++/10.2.0/bits/atomic_base.h:426: undefined reference to `__atomic_load_8'
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  ...ts.txt-link-atomic-for-arch-ppc-mips.patch | 33 +++++++++++++++++++
>  .../vulkan/vulkan-samples_git.bb              |  3 ++
>  2 files changed, 36 insertions(+)
>  create mode 100644 meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch
>
> diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch
> new file mode 100644
> index 0000000000..54bd90c610
> --- /dev/null
> +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch
> @@ -0,0 +1,33 @@
> +From e7cccf6626e9a7e20f963f8bbbffc9dae3863ce8 Mon Sep 17 00:00:00 2001
> +From: Changqing Li <changqing.li@windriver.com>
> +Date: Thu, 12 Nov 2020 08:10:51 +0800
> +Subject: [PATCH] CMakeLists.txt: link atomic for arch ppc/mips
> +
> +fix error:
> +| framework/lib/ppc/libframework.a(device.cpp.o): in function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
> +| /usr/include/c++/10.2.0/bits/atomic_base.h:426: undefined reference to `__atomic_load_8'
> +
> +Upstream-Status: oe-specific
> +
> +Signed-off-by: Changqing Li <changqing.li@windriver.com>
> +---
> + framework/CMakeLists.txt | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/framework/CMakeLists.txt b/framework/CMakeLists.txt
> +index bf26786..4d8c594 100644
> +--- a/framework/CMakeLists.txt
> ++++ b/framework/CMakeLists.txt
> +@@ -410,7 +410,8 @@ target_link_libraries(${PROJECT_NAME}
> +     glslang-default-resource-limits
> +     spdlog
> +     ctpl
> +-    docopt)
> ++    docopt
> ++    atomic)
> +

I wonder if there was a way to check for relevat atomic and decide if
its from libaromic or compiler intrinsics
see https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/CheckAtomic.cmake
for some guidelines

> + # Link platform specific libraries
> + if(ANDROID)
> +--
> +2.17.1
> +
> diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
> index 241a313a7b..f9d6c9b1de 100644
> --- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
> +++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
> @@ -6,6 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
>  SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git \
>             file://0001-CMakeLists.txt-do-not-hardcode-lib-as-installation-t.patch \
>             "
> +SRC_URI_append_mipsarch = "file://0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch"
> +SRC_URI_append_powerpc = "file://0001-CMakeLists.txt-link-atomic-for-arch-ppc-mips.patch"
> +

its missing space after first "

>  UPSTREAM_CHECK_COMMITS = "1"
>  SRCREV = "f52361d3cd6ac8c30fc3365a464b4e220c32cfd6"
>
> --
> 2.26.2
>
>
> 
>

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

end of thread, other threads:[~2020-11-12  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-12  6:02 [PATCH] vulkan-samples: fix do_compile failure Changqing Li
2020-11-12  6:28 ` [OE-core] " Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox