[oe-commits] [meta-openembedded] 25/36: gperftools: Fix build with clang

git at git.openembedded.org git at git.openembedded.org
Tue Mar 7 12:33:53 UTC 2017


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

martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit c03aff3d8ce976e4f561c85e5ac276952338e662
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Mar 6 23:13:41 2017 -0800

    gperftools: Fix build with clang
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../0001-Support-Atomic-ops-on-clang.patch         | 33 ++++++++++++++++++++++
 .../recipes-support/gperftools/gperftools_2.5.bb   |  4 ++-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch b/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
new file mode 100644
index 0000000..e582c0d
--- /dev/null
+++ b/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
@@ -0,0 +1,33 @@
+From ea9f64eb2cdf3be6c4dc65fa1472d854616e43ca Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Mon, 6 Mar 2017 13:38:46 -0800
+Subject: [PATCH] Support Atomic ops on clang
+
+clang pretends to be gcc 4.2 which is a lie
+it actually supports a lot more features then
+gcc 4.2, here it depends on gcc 4.7 to enable
+the atomics and fails for clang
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+Upstream-Status: Pending
+
+ src/base/atomicops.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/base/atomicops.h b/src/base/atomicops.h
+index be038f3..f1a21ff 100644
+--- a/src/base/atomicops.h
++++ b/src/base/atomicops.h
+@@ -118,7 +118,7 @@
+ #include "base/atomicops-internals-linuxppc.h"
+ #elif defined(__GNUC__) && defined(__mips__)
+ #include "base/atomicops-internals-mips.h"
+-#elif defined(__GNUC__) && GCC_VERSION >= 40700
++#elif defined(__GNUC__) && GCC_VERSION >= 40700 || defined(__clang__)
+ #include "base/atomicops-internals-gcc.h"
+ #else
+ #error You need to implement atomic operations for this architecture
+-- 
+2.12.0
+
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb b/meta-oe/recipes-support/gperftools/gperftools_2.5.bb
index 2e4479c..3cab423 100644
--- a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb
+++ b/meta-oe/recipes-support/gperftools/gperftools_2.5.bb
@@ -4,7 +4,9 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
 DEPENDS = "libunwind"
 
-SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz"
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz \
+           file://0001-Support-Atomic-ops-on-clang.patch\
+          "
 
 SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50"
 SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173"

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


More information about the Openembedded-commits mailing list