From 56f70b3cef7426449a62d7cb658fdf8ed5f0fd8d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Apr 2018 15:08:09 +0200 Subject: [PATCH] 4.4-stable patches added patches: kbuild-provide-a-__unique_id-for-clang.patch --- ...uild-provide-a-__unique_id-for-clang.patch | 38 +++++++++++++++++++ queue-4.4/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 queue-4.4/kbuild-provide-a-__unique_id-for-clang.patch diff --git a/queue-4.4/kbuild-provide-a-__unique_id-for-clang.patch b/queue-4.4/kbuild-provide-a-__unique_id-for-clang.patch new file mode 100644 index 00000000000..3c8fe02c591 --- /dev/null +++ b/queue-4.4/kbuild-provide-a-__unique_id-for-clang.patch @@ -0,0 +1,38 @@ +From b41c29b0527c7fd6a95d0f71274abb79933bf960 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Mon, 8 Feb 2016 15:38:32 +0100 +Subject: Kbuild: provide a __UNIQUE_ID for clang + +From: Arnd Bergmann + +commit b41c29b0527c7fd6a95d0f71274abb79933bf960 upstream. + +The default __UNIQUE_ID macro in compiler.h fails to work for some drivers: + +drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:615:1: error: redefinition of + '__UNIQUE_ID_firmware615' +BRCMF_FW_NVRAM_DEF(4354, "brcmfmac4354-sdio.bin", "brcmfmac4354-sdio.txt"); + +This adds a copy of the version we use for gcc-4.3 and higher, as the same +one works with all versions of clang that I could find in svn (2.6 and higher). + +Signed-off-by: Arnd Bergmann +Signed-off-by: Michal Marek +Cc: Matthias Kaehlcke +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/compiler-clang.h | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/include/linux/compiler-clang.h ++++ b/include/linux/compiler-clang.h +@@ -10,3 +10,8 @@ + #undef uninitialized_var + #define uninitialized_var(x) x = *(&(x)) + #endif ++ ++/* same as gcc, this was present in clang-2.6 so we can assume it works ++ * with any version that can compile the kernel ++ */ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) diff --git a/queue-4.4/series b/queue-4.4/series index 34035ece1a9..032caa96b3a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -166,3 +166,4 @@ virtio_net-check-return-value-of-skb_to_sgvec-always.patch virtio_net-check-return-value-of-skb_to_sgvec-in-one-more-location.patch random-use-lockless-method-of-accessing-and-updating-f-reg_idx.patch futex-remove-requirement-for-lock_page-in-get_futex_key.patch +kbuild-provide-a-__unique_id-for-clang.patch -- 2.47.3