Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310934 > unrolled thread

Re: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash

Started byKalle Valo <kvalo@codeaurora.org>
First post2016-01-16 13:10 +0100
Last post2016-01-16 13:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash Kalle Valo <kvalo@codeaurora.org> - 2016-01-16 13:10 +0100

#1310934 — Re: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash

FromKalle Valo <kvalo@codeaurora.org>
Date2016-01-16 13:10 +0100
SubjectRe: brcmfmac build failure with gcc < 4.3 due to __UNIQUE_ID() clash
Message-ID<qRxQ5-486-3@gated-at.bofh.it>
Geert Uytterhoeven <geert@linux-m68k.org> writes:

> On Wed, Jan 13, 2016 at 5:55 AM, Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org> wrote:
>> Commit:     46d703a775394e4724509ff55cdda41d228c028c
>>    brcmfmac: Unify methods to define and map firmware files.
>

[...]

> This change breaks the build with gcc < 4.3:
>
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: redefinition of ‘__UNIQUE_ID_firmware598’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:598:
> error: previous definition of ‘__UNIQUE_ID_firmware598’ was here
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: redefinition of ‘__UNIQUE_ID_firmware600’
>     drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:599:
> error: previous definition of ‘__UNIQUE_ID_firmware600’ was here
>     ...
>
> The reason is that BRCMF_FW_NVRAM_DEF() expands to two instances of
> MODULE_FIRMWARE():
>
>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h
>>
>> +#define BRCMF_FW_NVRAM_DEF(fw_nvram_name, fw, nvram) \
>> +static const char BRCM_ ## fw_nvram_name ## _FIRMWARE_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH fw; \
>> +static const char BRCM_ ## fw_nvram_name ## _NVRAM_NAME[] = \
>> +       BRCMF_FW_DEFAULT_PATH nvram; \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH fw); \
>> +MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH nvram)
>
> When compiling using gcc < 4.3, __UNIQUE_ID() uses __LINE__ instead of
> __COUNTER__, as the latter is not available. Hence it derives a "unique" ID
> from the same source line number, causing a redefinition.

Hante, what should we do? We need to fix this build breakage ASAP.

-- 
Kalle Valo

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web