Skip to contentSkip to conversation

"arm64: Silence gcc warnings about arch ABI drift" breaks clang

DISCUSSION Qian Cai 4 participants 6 messages Jun 7, 2019 EFI

lore
Share & tools
lore

Qian Cai

author
#0 lore raw

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-email-D
[email protected]/

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

#1 lore raw
Quoted 3 lines · Qian Cai

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

So that can be easily fixed with cc-option...

Quoted 15 lines

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-email-D
[email protected]/

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

... but this looks unrelated. Are you saying you don't see these errors if you revert Dave's patch?

Will

author
#2 lore raw
Quoted 24 lines · Will Deacon
Quoted 3 lines · Qian Cai

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

So that can be easily fixed with cc-option...

Quoted 4 lines

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-ema
il-D
[email protected]/

Quoted 12 lines

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

Quoted 2 lines

... but this looks unrelated. Are you saying you don't see these errors if you revert Dave's patch?

Yes.

#3 lore raw
Quoted 25 lines · Qian Cai
Quoted 24 lines · Will Deacon
Quoted 3 lines · Qian Cai

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

So that can be easily fixed with cc-option...

Quoted 16 lines

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-ema
il-D
[email protected]/

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

Quoted 4 lines
Quoted 2 lines

... but this looks unrelated. Are you saying you don't see these errors if you revert Dave's patch?

Yes.

I suspect the reason for this is -Wunknown-warning-option causes cc-option to fail. I see some disabled warnings like -Waddress-of-packed-member and -Wunused-const-variable when -Wno-psabi is unconditionally added.

I'll do some further triage but I think the obvious fix as Will suggested is to use cc-disable-warning. I'll send a patch.

Cheers,
Nathan

#4 lore raw
Quoted 31 lines · Nathan Chancellor
Quoted 25 lines · Qian Cai
Quoted 24 lines · Will Deacon
Quoted 3 lines · Qian Cai

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

So that can be easily fixed with cc-option...

Quoted 16 lines

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-ema
il-D
[email protected]/

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

Quoted 4 lines
Quoted 2 lines

... but this looks unrelated. Are you saying you don't see these errors if you revert Dave's patch?

Yes.

Quoted 7 lines

I suspect the reason for this is -Wunknown-warning-option causes cc-option to fail. I see some disabled warnings like -Waddress-of-packed-member and -Wunused-const-variable when -Wno-psabi is unconditionally added.

I'll do some further triage but I think the obvious fix as Will suggested is to use cc-disable-warning. I'll send a patch.

Cheers, Nathan. I've already sent the pull for -rc4, but I can send your fix for -rc5 next week.

Will

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw
In reply to Nathan Chancellor
Quoted 31 lines · Nathan Chancellor
Quoted 25 lines · Qian Cai
Quoted 24 lines · Will Deacon
Quoted 3 lines · Qian Cai

The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below,

So that can be easily fixed with cc-option...

Quoted 16 lines

[1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-ema
il-D
[email protected]/

./drivers/firmware/efi/libstub/arm-stub.stub.o: In function `install_memreserve_table':
./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:73: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:93: undefined reference to __efistub___stack_chk_guard' ./linux/drivers/firmware/efi/libstub/arm-stub.c:94: undefined reference to `__efistub___stack_chk_fail

Quoted 4 lines
Quoted 2 lines

... but this looks unrelated. Are you saying you don't see these errors if you revert Dave's patch?

Yes.

Quoted 7 lines

I suspect the reason for this is -Wunknown-warning-option causes cc-option to fail. I see some disabled warnings like -Waddress-of-packed-member and -Wunused-const-variable when -Wno-psabi is unconditionally added.

I'll do some further triage but I think the obvious fix as Will suggested is to use cc-disable-warning. I'll send a patch.

Thanks for that.

Cheers
---Dave