diff options
Diffstat (limited to 'meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch')
-rw-r--r-- | meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch | 37 |
1 files changed, 37 insertions, 0 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 | |||