diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-03-06 23:13:41 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-03-11 17:56:42 +0100 |
commit | e2975aee7c89f87d42ca83d7f40bec5a35ccd9c4 (patch) | |
tree | 285df019d821ffe9b72e336acee78afbfe1c55ee /meta-oe/recipes-support/gperftools | |
parent | a336efc8d7204394b7ab243964a79b0968f65edc (diff) | |
download | meta-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.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-support/gperftools/gperftools_2.5.bb | 4 |
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 @@ | |||
1 | From ea9f64eb2cdf3be6c4dc65fa1472d854616e43ca Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 6 Mar 2017 13:38:46 -0800 | ||
4 | Subject: [PATCH] Support Atomic ops on clang | ||
5 | |||
6 | clang pretends to be gcc 4.2 which is a lie | ||
7 | it actually supports a lot more features then | ||
8 | gcc 4.2, here it depends on gcc 4.7 to enable | ||
9 | the atomics and fails for clang | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | Upstream-Status: Pending | ||
14 | |||
15 | src/base/atomicops.h | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/base/atomicops.h b/src/base/atomicops.h | ||
19 | index 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 | -- | ||
32 | 2.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" | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=762732742c73dc6c7fbe8632f06c059a" |
5 | DEPENDS = "libunwind" | 5 | DEPENDS = "libunwind" |
6 | 6 | ||
7 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/gperftools/gperftools-2.5.tar.gz/aa1eaf95dbe2c9828d0bd3a00f770f50/gperftools-2.5.tar.gz" | 7 | SRC_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 | ||
9 | SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50" | 11 | SRC_URI[md5sum] = "aa1eaf95dbe2c9828d0bd3a00f770f50" |
10 | SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173" | 12 | SRC_URI[sha256sum] = "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173" |