Re: arm: shmobile_defconfig: ld.lld: error: undefined symbol: lynx_pcs_destroy

From: Arnd Bergmann
Date: Tue Jun 06 2023 - 06:21:47 EST


On Tue, Jun 6, 2023, at 11:28, Geert Uytterhoeven wrote:
> On Tue, Jun 6, 2023 at 11:16 AM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> On Tue, Jun 6, 2023, at 11:01, Geert Uytterhoeven wrote:
>>
>> This won't work when PCS_LYNX is a loadable module and
>> STMMAC is built-in. I think we should just select PCS_LYNX
>
> Oops, you're right, forgot about that case.
> What about using IS_REACHABLE() instead?
> No, that won't work either, as DWMAC_SOCFPGA can be modular,
> with STMMAC builtin.

It would work because of the 'select PCS_LYNX' below DWMAC_SOCFPGA,
but I think that's too fragile and would easily break when another
dwmac front-end starts using PCS_LYNX without have the same select
statement. I think we should always avoid IS_REACHABLE().

Arnd