summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/gperftools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-03-06 23:13:41 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2017-03-11 17:56:42 +0100
commite2975aee7c89f87d42ca83d7f40bec5a35ccd9c4 (patch)
tree285df019d821ffe9b72e336acee78afbfe1c55ee /meta-oe/recipes-support/gperftools
parenta336efc8d7204394b7ab243964a79b0968f65edc (diff)
downloadmeta-openembedded-e2975aee7c89f87d42ca83d7f40bec5a35ccd9c4.tar.gz
gperftools: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/gperftools')
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch33
-rw-r--r--meta-oe/recipes-support/gperftools/gperftools_2.5.bb4
2 files changed, 36 insertions, 1 deletions
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 000000000..e582c0da6
--- /dev/null
+++ b/meta-oe/recipes-support/gperftools/gperftools/0001-Support-Atomic-ops-on-clang.patch
@@ -0,0 +1,33 @@
1From ea9f64eb2cdf3be6c4dc65fa1472d854616e43ca Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Mar 2017 13:38:46 -0800
4Subject: [PATCH] Support Atomic ops on clang
5
6clang pretends to be gcc 4.2 which is a lie
7it actually supports a lot more features then
8gcc 4.2, here it depends on gcc 4.7 to enable
9the atomics and fails for clang
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Pending
14
15 src/base/atomicops.h | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/base/atomicops.h b/src/base/atomicops.h
19index be038f3..f1a21ff 100644
20--- a/src/base/atomicops.h
21+++ b/src/base/atomicops.h
22@@ -118,7 +118,7 @@
23 #include "base/atomicops-internals-linuxppc.h"
24 #elif defined(__GNUC__) && defined(__mips__)
25 #include "base/atomicops-internals-mips.h"
26-#elif defined(__GNUC__) && GCC_VERSION >= 40700
27+#elif defined(__GNUC__) && GCC_VERSION >= 40700 || defined(__clang__)
28 #include "base/atomicops-internals-gcc.h"
29 #else
30 #error You need to implement atomic operations for this architecture
31--
322.12.0
33
diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.5.bb b/meta-oe/recipes-support/gperftools/gperftools_2.5.bb
index 2e4479c9d..3cab42385 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"
4LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" 4LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a"
5DEPENDS = "libunwind" 5DEPENDS = "libunwind"
6 6
7SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz" 7SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz \
8 file://0001-Support-Atomic-ops-on-clang.patch\
9 "
8 10
9SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50" 11SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50"
10SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173" 12SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173"