[oe-commits] [openembedded-core] 03/07: mesa: Help compile with clang/mips

git at git.openembedded.org git at git.openembedded.org
Tue Jan 21 07:34:15 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 47ebce441f56791878fdd183be26010ecd2077b2
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Jan 20 09:52:27 2020 -0800

    mesa: Help compile with clang/mips
    
    meson is detecting it does not support 64bit attomics but then when
    defining local suppliments confused clang
    
    ../mesa-19.3.1/src/util/u_atomic.c:38:1: error: cannot redeclare builtin function '__sync_add_and_fetch_8'
    __sync_add_and_fetch_8(uint64_t *ptr, uint64_t val)
    ^
    ../mesa-19.3.1/src/util/u_atomic.c:38:1: note: '__sync_add_and_fetch_8' is a builtin with type 'long long (volatile long long *, long long, ...)'
    ../mesa-19.3.1/src/util/u_atomic.c:38:1: error: definition of builtin function '__sync_add_and_fetch_8'
    __sync_add_and_fetch_8(uint64_t *ptr, uint64_t val)
    ^
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...on-misdetects-64bit-atomics-on-mips-clang.patch | 27 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa_19.3.1.bb          |  1 +
 2 files changed, 28 insertions(+)

diff --git a/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
new file mode 100644
index 0000000..15485fe
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
@@ -0,0 +1,27 @@
+From bb2f0bea553d51d659a9bc46f7ae186885405151 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Mon, 13 Jan 2020 15:23:47 -0800
+Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/util/u_atomic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
+index e4bffa8..58e1ddd 100644
+--- a/src/util/u_atomic.c
++++ b/src/util/u_atomic.c
+@@ -21,7 +21,7 @@
+  * IN THE SOFTWARE.
+  */
+ 
+-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
+ 
+ #include <stdint.h>
+ #include <pthread.h>
+-- 
+2.24.1
+
diff --git a/meta/recipes-graphics/mesa/mesa_19.3.1.bb b/meta/recipes-graphics/mesa/mesa_19.3.1.bb
index 855b7f2..b889f09 100644
--- a/meta/recipes-graphics/mesa/mesa_19.3.1.bb
+++ b/meta/recipes-graphics/mesa/mesa_19.3.1.bb
@@ -6,6 +6,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
            file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
            file://0005-vc4-use-intmax_t-for-formatted-output-of-timespec-me.patch \
+           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            "
 
 SRC_URI[md5sum] = "5c5965db31993af47fee82c9a7ccba5e"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list