diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-04-10 09:21:38 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-04-24 11:00:51 +0200 |
commit | 1d79b368594e09e2cec1a251c609e020c0f3ace9 (patch) | |
tree | 0b557908adc004ab1987f2e9483deb1d869c0096 | |
parent | 2d384da051f7ff4622c0d1a12b154dd94e4b893d (diff) | |
download | meta-openembedded-1d79b368594e09e2cec1a251c609e020c0f3ace9.tar.gz |
avro-c: Fix build with clang
Update SRC_URI to point to github mirror
Add a patch to fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch | 37 | ||||
-rw-r--r-- | meta-oe/recipes-support/avro/avro-c_1.8.1.bb | 10 |
2 files changed, 43 insertions, 4 deletions
diff --git a/meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch b/meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch new file mode 100644 index 000000000..01235d8ef --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 518bb8ccfb3f3fc143fbd571782f3e40573d01b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 10 Apr 2017 09:15:04 -0700 | ||
4 | Subject: [PATCH] avro-c: Fix build with clang compiler | ||
5 | |||
6 | Clang advertizes itself to be compatible with gcc 4.2.1 | ||
7 | while that was true several years ago, it now supports | ||
8 | a lot more newer features, the test to just check gcc | ||
9 | version should be supplanted with clang check as well | ||
10 | so atomic support in clang can be asserted as well | ||
11 | |||
12 | Fixes | ||
13 | |||
14 | lang/c/src/avro/refcount.h:301:2: error: "No atomic implementation!" | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | lang/c/src/avro/refcount.h | 3 ++- | ||
19 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/lang/c/src/avro/refcount.h b/lang/c/src/avro/refcount.h | ||
22 | index 69afa4fc..d76ba057 100644 | ||
23 | --- a/lang/c/src/avro/refcount.h | ||
24 | +++ b/lang/c/src/avro/refcount.h | ||
25 | @@ -118,7 +118,8 @@ avro_refcount_dec(volatile int *refcount) | ||
26 | * GCC intrinsics | ||
27 | */ | ||
28 | |||
29 | -#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500 | ||
30 | +#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500 \ | ||
31 | +|| defined(__clang__) | ||
32 | |||
33 | static inline void | ||
34 | avro_refcount_set(volatile int *refcount, int value) | ||
35 | -- | ||
36 | 2.12.2 | ||
37 | |||
diff --git a/meta-oe/recipes-support/avro/avro-c_1.8.1.bb b/meta-oe/recipes-support/avro/avro-c_1.8.1.bb index 8deee4b23..276fe2b5a 100644 --- a/meta-oe/recipes-support/avro/avro-c_1.8.1.bb +++ b/meta-oe/recipes-support/avro/avro-c_1.8.1.bb | |||
@@ -2,16 +2,18 @@ SUMMARY = "Apache Avro data serialization system." | |||
2 | HOMEPAGE = "http://apr.apache.org/" | 2 | HOMEPAGE = "http://apr.apache.org/" |
3 | SECTION = "libs" | 3 | SECTION = "libs" |
4 | 4 | ||
5 | |||
6 | LICENSE = "Apache-2.0" | 5 | LICENSE = "Apache-2.0" |
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=73bdf70f268f0b3b9c5a83dd7a6f3324" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=73bdf70f268f0b3b9c5a83dd7a6f3324" |
8 | 7 | ||
9 | DEPENDS = "jansson zlib xz" | 8 | DEPENDS = "jansson zlib xz" |
9 | PV .= "+git${SRCPV}" | ||
10 | 10 | ||
11 | SRC_URI = "${APACHE_MIRROR}/avro/avro-${PV}/c/avro-c-${PV}.tar.gz" | 11 | SRCREV = "4b3677c32b879e0e7f717eb95f9135ac654da760" |
12 | SRC_URI = "git://github.com/apache/avro \ | ||
13 | file://0001-avro-c-Fix-build-with-clang-compiler.patch;patchdir=../../ \ | ||
14 | " | ||
12 | 15 | ||
13 | SRC_URI[md5sum] = "b268348536714541e10411823a1b59b0" | 16 | S = "${WORKDIR}/git/lang/c" |
14 | SRC_URI[sha256sum] = "e5042088fa47e1aa2860c5cfed0bd061d81f9e96628f8b4d87a24d9b8c5e4ecc" | ||
15 | 17 | ||
16 | LDFLAGS_append_libc-uclibc = " -lm" | 18 | LDFLAGS_append_libc-uclibc = " -lm" |
17 | 19 | ||