diff mbox series

[1/3] MIPS: boot/compressed: Disable abicalls

Message ID 20211213224914.1501303-2-paul@crapouillou.net (mailing list archive)
State New
Headers show
Series MIPS: Add support for LTO | expand

Commit Message

Paul Cercueil Dec. 13, 2021, 10:49 p.m. UTC
Avoid complaints from Clang/LLVM by building the decompress program with
-mno-abicalls.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/boot/compressed/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Nathan Chancellor Dec. 14, 2021, 6:06 p.m. UTC | #1
On Mon, Dec 13, 2021 at 10:49:12PM +0000, Paul Cercueil wrote:
> Avoid complaints from Clang/LLVM by building the decompress program with
> -mno-abicalls.

What is the message?

> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/mips/boot/compressed/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> index f27cf31b4140..4c9ecfbb0ef4 100644
> --- a/arch/mips/boot/compressed/Makefile
> +++ b/arch/mips/boot/compressed/Makefile
> @@ -27,10 +27,10 @@ ifdef CONFIG_CPU_LOONGSON64
>  KBUILD_CFLAGS := $(filter-out -march=loongson3a, $(KBUILD_CFLAGS)) -march=mips64r2
>  endif
>  
> -KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \
> +KBUILD_CFLAGS := $(KBUILD_CFLAGS) -mno-abicalls -D__KERNEL__ -D__DISABLE_EXPORTS \
>  	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
>  
> -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
> +KBUILD_AFLAGS := $(KBUILD_AFLAGS) -mno-abicalls -D__ASSEMBLY__ \
>  	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
>  	-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
>  
> -- 
> 2.33.0
> 
>
Paul Cercueil Dec. 14, 2021, 7:09 p.m. UTC | #2
Hi Nathan,

Le mar., déc. 14 2021 at 11:06:57 -0700, Nathan Chancellor 
<nathan@kernel.org> a écrit :
> On Mon, Dec 13, 2021 at 10:49:12PM +0000, Paul Cercueil wrote:
>>  Avoid complaints from Clang/LLVM by building the decompress program 
>> with
>>  -mno-abicalls.
> 
> What is the message?

ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code 
arch/mips/kernel/head.o

Cheers,
-Paul

> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   arch/mips/boot/compressed/Makefile | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>>  diff --git a/arch/mips/boot/compressed/Makefile 
>> b/arch/mips/boot/compressed/Makefile
>>  index f27cf31b4140..4c9ecfbb0ef4 100644
>>  --- a/arch/mips/boot/compressed/Makefile
>>  +++ b/arch/mips/boot/compressed/Makefile
>>  @@ -27,10 +27,10 @@ ifdef CONFIG_CPU_LOONGSON64
>>   KBUILD_CFLAGS := $(filter-out -march=loongson3a, $(KBUILD_CFLAGS)) 
>> -march=mips64r2
>>   endif
>> 
>>  -KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS 
>> \
>>  +KBUILD_CFLAGS := $(KBUILD_CFLAGS) -mno-abicalls -D__KERNEL__ 
>> -D__DISABLE_EXPORTS \
>>   	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) 
>> -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
>> 
>>  -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
>>  +KBUILD_AFLAGS := $(KBUILD_AFLAGS) -mno-abicalls -D__ASSEMBLY__ \
>>   	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
>>   	-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
>> 
>>  --
>>  2.33.0
>> 
>>
Nick Desaulniers Dec. 14, 2021, 7:38 p.m. UTC | #3
On Tue, Dec 14, 2021 at 11:09 AM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Hi Nathan,
>
> Le mar., déc. 14 2021 at 11:06:57 -0700, Nathan Chancellor
> <nathan@kernel.org> a écrit :
> > On Mon, Dec 13, 2021 at 10:49:12PM +0000, Paul Cercueil wrote:
> >>  Avoid complaints from Clang/LLVM by building the decompress program
> >> with
> >>  -mno-abicalls.
> >
> > What is the message?
>
> ld.lld: warning: lto.tmp: linking abicalls code with non-abicalls code
> arch/mips/kernel/head.o

That might be good to put in the commit message, as well as a link to
the corresponding issue in our issue tracker.

Though, I'm unfamiliar with that flag; removing it may allow us to
link, but it may cause problems at runtime.  It sounds like clang
supports the flag, so I have a sinking feeling this is a flag that LTO
is dropping by accident, which we've seen in the past.  Please file a
bug in the issue tracker and let's follow up there?

>
> Cheers,
> -Paul
>
> >
> >>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >>  ---
> >>   arch/mips/boot/compressed/Makefile | 4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >>  diff --git a/arch/mips/boot/compressed/Makefile
> >> b/arch/mips/boot/compressed/Makefile
> >>  index f27cf31b4140..4c9ecfbb0ef4 100644
> >>  --- a/arch/mips/boot/compressed/Makefile
> >>  +++ b/arch/mips/boot/compressed/Makefile
> >>  @@ -27,10 +27,10 @@ ifdef CONFIG_CPU_LOONGSON64
> >>   KBUILD_CFLAGS := $(filter-out -march=loongson3a, $(KBUILD_CFLAGS))
> >> -march=mips64r2
> >>   endif
> >>
> >>  -KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS
> >> \
> >>  +KBUILD_CFLAGS := $(KBUILD_CFLAGS) -mno-abicalls -D__KERNEL__
> >> -D__DISABLE_EXPORTS \
> >>      -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE)
> >> -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
> >>
> >>  -KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
> >>  +KBUILD_AFLAGS := $(KBUILD_AFLAGS) -mno-abicalls -D__ASSEMBLY__ \
> >>      -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
> >>      -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
> >>
> >>  --
> >>  2.33.0
> >>
> >>
>
>
diff mbox series

Patch

diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index f27cf31b4140..4c9ecfbb0ef4 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -27,10 +27,10 @@  ifdef CONFIG_CPU_LOONGSON64
 KBUILD_CFLAGS := $(filter-out -march=loongson3a, $(KBUILD_CFLAGS)) -march=mips64r2
 endif
 
-KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \
+KBUILD_CFLAGS := $(KBUILD_CFLAGS) -mno-abicalls -D__KERNEL__ -D__DISABLE_EXPORTS \
 	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull"
 
-KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
+KBUILD_AFLAGS := $(KBUILD_AFLAGS) -mno-abicalls -D__ASSEMBLY__ \
 	-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
 	-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)