diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-08-24 20:56:28 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-31 10:18:32 +0200 |
commit | 6f6f0b6284b3aea1e0b2f7c8b115ed0378192596 (patch) | |
tree | f6a1e4413b4d74a94adf9edf1d945d424ae33962 /meta-oe/recipes-extended/efivar | |
parent | 91df32a7901c64164fb70bf4f070579f75c71397 (diff) | |
download | meta-openembedded-6f6f0b6284b3aea1e0b2f7c8b115ed0378192596.tar.gz |
efivar: 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-extended/efivar')
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch | 32 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar_0.31.bb | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch new file mode 100644 index 000000000..1b8815e9d --- /dev/null +++ b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 3d43c5efdb632da5d7387dcadce4e87b83929c64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 24 Aug 2017 15:54:47 -0700 | ||
4 | Subject: [PATCH] efivar-dp.h: Add -Wunknown-attributes when using clang | ||
5 | |||
6 | change !dp check to a comparision against NULL to silent clang warning | ||
7 | nonnull parameter 'dp' will evaluate to 'true' on first encounter | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/include/efivar/efivar-dp.h | 12 +++++++----- | ||
12 | 1 file changed, 7 insertions(+), 5 deletions(-) | ||
13 | |||
14 | Index: git/src/include/efivar/efivar-dp.h | ||
15 | =================================================================== | ||
16 | --- git.orig/src/include/efivar/efivar-dp.h | ||
17 | +++ git/src/include/efivar/efivar-dp.h | ||
18 | @@ -783,9 +783,14 @@ extern int efidp_append_instance(const_e | ||
19 | * though older or other compilers might just ignore that attribute if they | ||
20 | * don't support it. Ugh. | ||
21 | */ | ||
22 | +#pragma GCC diagnostic push | ||
23 | #if defined(__GNUC__) && __GNUC__ >= 6 | ||
24 | #pragma GCC diagnostic ignored "-Wnonnull-compare" | ||
25 | #endif | ||
26 | +#if defined(__clang__) | ||
27 | +#pragma GCC diagnostic ignored "-Wunknown-attributes" | ||
28 | +#pragma GCC diagnostic ignored "-Wpointer-bool-conversion" | ||
29 | +#endif | ||
30 | |||
31 | static inline int16_t | ||
32 | __attribute__((__artificial__)) | ||
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.31.bb b/meta-oe/recipes-extended/efivar/efivar_0.31.bb index 10dde896e..6ad3b361d 100644 --- a/meta-oe/recipes-extended/efivar/efivar_0.31.bb +++ b/meta-oe/recipes-extended/efivar/efivar_0.31.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/rhinstaller/efivar.git \ | |||
17 | file://allow-multi-definitions-for-native.patch \ | 17 | file://allow-multi-definitions-for-native.patch \ |
18 | file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \ | 18 | file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \ |
19 | file://musl-strndupa.patch \ | 19 | file://musl-strndupa.patch \ |
20 | file://0001-efivar-dp.h-Add-Wunknown-attributes-when-using-clang.patch \ | ||
20 | " | 21 | " |
21 | SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ | 22 | SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ |
22 | file://0003-efivar-fix-for-cross-compile.patch \ | 23 | file://0003-efivar-fix-for-cross-compile.patch \ |