Skip to content

Commit b41c29b

Browse files
arndbMichal Marek
authored andcommitted
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>
1 parent 5399eb9 commit b41c29b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎include/linux/compiler-clang.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
#undef uninitialized_var
1111
#define uninitialized_var(x) x = *(&(x))
1212
#endif
13+
14+
/* same as gcc, this was present in clang-2.6 so we can assume it works
15+
* with any version that can compile the kernel
16+
*/
17+
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)

0 commit comments

Comments
 (0)