diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2016-02-08 15:38:32 +0100 |
|---|---|---|
| committer | Greg Hackmann <ghackmann@google.com> | 2017-10-09 14:00:13 -0700 |
| commit | f01b0c528e75ee1e8ec13da27bd987f34b8fbe10 (patch) | |
| tree | 825cebcb5a7c295441f785b0a86eee86d052e50e /include/linux/compiler-clang.h | |
| parent | b8a6c2329c3e11c6a671ef0349f709ec2a91384a (diff) | |
UPSTREAM: Kbuild: provide a __UNIQUE_ID for clang
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 <arnd@arndb.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
(cherry picked from commit b41c29b0527c7fd6a95d0f71274abb79933bf960)
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Change-Id: I161dfa3ccb6b226966c3c87bba6b2fff1561bc61
Diffstat (limited to 'include/linux/compiler-clang.h')
| -rw-r--r-- | include/linux/compiler-clang.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index d1e49d52b640..de179993e039 100644 --- 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__) |
