linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
@ 2024-01-27 18:07 Nathan Chancellor
  2024-03-05 22:43 ` Nathan Chancellor
  2024-03-13 13:19 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2024-01-27 18:07 UTC (permalink / raw)
  To: mpe
  Cc: Nathan Chancellor, llvm, patches, aneesh.kumar, npiggin,
	justinstitt, naveen.n.rao, stable, linuxppc-dev, morbo

arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
error when building with clang after a recent change in main:

  error: option '-msoft-float' cannot be specified with '-maltivec'
  make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1

Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS
to override the previous inclusion of '-msoft-float' (as the last option
wins), which matches how other areas of the kernel use '-maltivec', such
as AMDGPU.

Cc: stable@vger.kernel.org
Closes: https://github.com/ClangBuiltLinux/linux/issues/1986
Link: https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/powerpc/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 6eac63e79a89..0ab65eeb93ee 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -76,7 +76,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
 obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
 
 obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
-CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
+CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
 # Enable <altivec.h>
 CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
 

---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240127-ppc-xor_vmx-drop-msoft-float-ad68b437f86c

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
  2024-01-27 18:07 [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS Nathan Chancellor
@ 2024-03-05 22:43 ` Nathan Chancellor
  2024-03-06  1:01   ` Michael Ellerman
  2024-03-13 13:19 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Nathan Chancellor @ 2024-03-05 22:43 UTC (permalink / raw)
  To: mpe
  Cc: llvm, patches, aneesh.kumar, npiggin, justinstitt, naveen.n.rao,
	stable, linuxppc-dev, morbo

Ping? We have been applying this in our CI since it was sent, it would
be nice to have this upstream soon so it can start filtering through the
stable trees.

On Sat, Jan 27, 2024 at 11:07:43AM -0700, Nathan Chancellor wrote:
> arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
> powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
> error when building with clang after a recent change in main:
> 
>   error: option '-msoft-float' cannot be specified with '-maltivec'
>   make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1
> 
> Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS
> to override the previous inclusion of '-msoft-float' (as the last option
> wins), which matches how other areas of the kernel use '-maltivec', such
> as AMDGPU.
> 
> Cc: stable@vger.kernel.org
> Closes: https://github.com/ClangBuiltLinux/linux/issues/1986
> Link: https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  arch/powerpc/lib/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index 6eac63e79a89..0ab65eeb93ee 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -76,7 +76,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
>  obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
>  
>  obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
> -CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
> +CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
>  # Enable <altivec.h>
>  CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
>  
> 
> ---
> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> change-id: 20240127-ppc-xor_vmx-drop-msoft-float-ad68b437f86c
> 
> Best regards,
> -- 
> Nathan Chancellor <nathan@kernel.org>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
  2024-03-05 22:43 ` Nathan Chancellor
@ 2024-03-06  1:01   ` Michael Ellerman
  2024-03-06 16:48     ` Nathan Chancellor
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2024-03-06  1:01 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: llvm, patches, aneesh.kumar, npiggin, justinstitt, naveen.n.rao,
	stable, linuxppc-dev, morbo

Nathan Chancellor <nathan@kernel.org> writes:
> Ping? We have been applying this in our CI since it was sent, it would
> be nice to have this upstream soon so it can start filtering through the
> stable trees.

Sorry, I was away in January and missed this. Will pick it up.

cheers

> On Sat, Jan 27, 2024 at 11:07:43AM -0700, Nathan Chancellor wrote:
>> arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
>> powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
>> error when building with clang after a recent change in main:
>> 
>>   error: option '-msoft-float' cannot be specified with '-maltivec'
>>   make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1
>> 
>> Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS
>> to override the previous inclusion of '-msoft-float' (as the last option
>> wins), which matches how other areas of the kernel use '-maltivec', such
>> as AMDGPU.
>> 
>> Cc: stable@vger.kernel.org
>> Closes: https://github.com/ClangBuiltLinux/linux/issues/1986
>> Link: https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
>> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>> ---
>>  arch/powerpc/lib/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
>> index 6eac63e79a89..0ab65eeb93ee 100644
>> --- a/arch/powerpc/lib/Makefile
>> +++ b/arch/powerpc/lib/Makefile
>> @@ -76,7 +76,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
>>  obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
>>  
>>  obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
>> -CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
>> +CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
>>  # Enable <altivec.h>
>>  CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
>>  
>> 
>> ---
>> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
>> change-id: 20240127-ppc-xor_vmx-drop-msoft-float-ad68b437f86c
>> 
>> Best regards,
>> -- 
>> Nathan Chancellor <nathan@kernel.org>
>> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
  2024-03-06  1:01   ` Michael Ellerman
@ 2024-03-06 16:48     ` Nathan Chancellor
  0 siblings, 0 replies; 5+ messages in thread
From: Nathan Chancellor @ 2024-03-06 16:48 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: llvm, patches, aneesh.kumar, npiggin, justinstitt, naveen.n.rao,
	stable, linuxppc-dev, morbo

On Wed, Mar 06, 2024 at 12:01:42PM +1100, Michael Ellerman wrote:
> Nathan Chancellor <nathan@kernel.org> writes:
> > Ping? We have been applying this in our CI since it was sent, it would
> > be nice to have this upstream soon so it can start filtering through the
> > stable trees.
> 
> Sorry, I was away in January and missed this. Will pick it up.

No worries, I've done that more times than I would like to admit. Thanks
a lot for the quick response and picking it up!

Cheers,
Nathan

> > On Sat, Jan 27, 2024 at 11:07:43AM -0700, Nathan Chancellor wrote:
> >> arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
> >> powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
> >> error when building with clang after a recent change in main:
> >> 
> >>   error: option '-msoft-float' cannot be specified with '-maltivec'
> >>   make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1
> >> 
> >> Explicitly add '-mhard-float' before '-maltivec' in xor_vmx.o's CFLAGS
> >> to override the previous inclusion of '-msoft-float' (as the last option
> >> wins), which matches how other areas of the kernel use '-maltivec', such
> >> as AMDGPU.
> >> 
> >> Cc: stable@vger.kernel.org
> >> Closes: https://github.com/ClangBuiltLinux/linux/issues/1986
> >> Link: https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
> >> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> >> ---
> >>  arch/powerpc/lib/Makefile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> >> index 6eac63e79a89..0ab65eeb93ee 100644
> >> --- a/arch/powerpc/lib/Makefile
> >> +++ b/arch/powerpc/lib/Makefile
> >> @@ -76,7 +76,7 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
> >>  obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
> >>  
> >>  obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o xor_vmx_glue.o
> >> -CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)
> >> +CFLAGS_xor_vmx.o += -mhard-float -maltivec $(call cc-option,-mabi=altivec)
> >>  # Enable <altivec.h>
> >>  CFLAGS_xor_vmx.o += -isystem $(shell $(CC) -print-file-name=include)
> >>  
> >> 
> >> ---
> >> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> >> change-id: 20240127-ppc-xor_vmx-drop-msoft-float-ad68b437f86c
> >> 
> >> Best regards,
> >> -- 
> >> Nathan Chancellor <nathan@kernel.org>
> >> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
  2024-01-27 18:07 [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS Nathan Chancellor
  2024-03-05 22:43 ` Nathan Chancellor
@ 2024-03-13 13:19 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2024-03-13 13:19 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: llvm, patches, aneesh.kumar, npiggin, justinstitt, naveen.n.rao,
	stable, linuxppc-dev, morbo

On Sat, 27 Jan 2024 11:07:43 -0700, Nathan Chancellor wrote:
> arch/powerpc/lib/xor_vmx.o is built with '-msoft-float' (from the main
> powerpc Makefile) and '-maltivec' (from its CFLAGS), which causes an
> error when building with clang after a recent change in main:
> 
>   error: option '-msoft-float' cannot be specified with '-maltivec'
>   make[6]: *** [scripts/Makefile.build:243: arch/powerpc/lib/xor_vmx.o] Error 1
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
      https://git.kernel.org/powerpc/c/35f20786c481d5ced9283ff42de5c69b65e5ed13

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-13 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-27 18:07 [PATCH] powerpc: xor_vmx: Add '-mhard-float' to CFLAGS Nathan Chancellor
2024-03-05 22:43 ` Nathan Chancellor
2024-03-06  1:01   ` Michael Ellerman
2024-03-06 16:48     ` Nathan Chancellor
2024-03-13 13:19 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).