diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-09-19 11:55:41 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-20 05:41:32 -0700 |
commit | b650322dcde0811415c3df109502a27a92aa398c (patch) | |
tree | da4968509d13e1bccdc0b2493c6a8b385fce6443 /meta/recipes-devtools/mtools | |
parent | ebecaa5f4814fa30d0b304c495ed4533bbffd5a6 (diff) | |
download | poky-b650322dcde0811415c3df109502a27a92aa398c.tar.gz |
mtools: Fix build with clang
Identify with __clang__ to undefine UNUSED
(From OE-Core rev: fcede6dd3e44d9f7761d058db76dfaf103b75c6a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/mtools')
-rw-r--r-- | meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch | 17 | ||||
-rw-r--r-- | meta/recipes-devtools/mtools/mtools_4.0.18.bb | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch b/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch new file mode 100644 index 0000000000..6bb9d6a3da --- /dev/null +++ b/meta/recipes-devtools/mtools/mtools/clang_UNUSED.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Undefine UNUSED macros with clang | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | Index: mtools-4.0.18/sysincludes.h | ||
6 | =================================================================== | ||
7 | --- mtools-4.0.18.orig/sysincludes.h | ||
8 | +++ mtools-4.0.18/sysincludes.h | ||
9 | @@ -101,7 +101,7 @@ typedef void *caddr_t; | ||
10 | #if defined __GNUC__ && defined __STDC__ | ||
11 | /* gcc -traditional doesn't have PACKED, UNUSED and NORETURN */ | ||
12 | # define PACKED __attribute__ ((packed)) | ||
13 | -# if __GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3 | ||
14 | +# if (__GNUC__ == 2 && __GNUC_MINOR__ > 6 || __GNUC__ >= 3) && !defined(__clang__) | ||
15 | /* gcc 2.6.3 doesn't have "unused" */ /* mool */ | ||
16 | # define UNUSED(x) x __attribute__ ((unused));x | ||
17 | # define UNUSEDP __attribute__ ((unused)) | ||
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/meta/recipes-devtools/mtools/mtools_4.0.18.bb index 91f7b7c610..3c31aca3ad 100644 --- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb +++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb | |||
@@ -32,6 +32,7 @@ SRC_URI = "${GNU_MIRROR}/mtools/mtools-${PV}.tar.bz2 \ | |||
32 | file://no-x11.gplv3.patch \ | 32 | file://no-x11.gplv3.patch \ |
33 | file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \ | 33 | file://0001-Continue-even-if-fs-size-is-not-divisible-by-sectors.patch \ |
34 | file://0001-remove-LOCK_NB-to-use-blocking-request.patch \ | 34 | file://0001-remove-LOCK_NB-to-use-blocking-request.patch \ |
35 | file://clang_UNUSED.patch \ | ||
35 | " | 36 | " |
36 | 37 | ||
37 | SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch" | 38 | SRC_URI_append_class-native = " file://disable-hardcoded-configs.patch" |