From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Mass-building defconfigs: many fail with assembler errors
Date: Thu, 15 Dec 2022 06:55:45 +0000 [thread overview]
Message-ID: <958dd327-aa24-a1e9-3572-bf7bbf28efda@csgroup.eu> (raw)
In-Reply-To: <592bf160-80c2-ec5b-43bf-b8d91e57fc7b@csgroup.eu>
Le 15/12/2022 à 07:49, Christophe Leroy a écrit :
>
>
> Le 14/12/2022 à 15:45, Jan-Benedict Glaw a écrit :
>> On Tue, 2022-12-13 14:49:20 +1100, Michael Ellerman
>> <mpe@ellerman.id.au> wrote:
>> [...]
>>> Both treeboot-akebono.c and treeboot-currituck.c are for 476 so should
>>> probably be built with -mcpu=476. eg:
>>>
>>> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
>>> index d32d95aea5d6..acb6eddace8f 100644
>>> --- a/arch/powerpc/boot/Makefile
>>> +++ b/arch/powerpc/boot/Makefile
>>> @@ -88,8 +88,8 @@ $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
>>> $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
>>> $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
>>> $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
>>> -$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405
>>> -$(obj)/treeboot-akebono.o: BOOTCFLAGS += -mcpu=405
>>> +$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=476
>>> +$(obj)/treeboot-akebono.o: BOOTCFLAGS += -mcpu=476
>>> # The pre-boot decompressors pull in a lot of kernel headers and
>>> other source
>>> # files. This creates a bit of a dependency headache since we need
>>> to copy
>>
>> With this patch applied, it seems this fixes these asm-related builds:
>>
>> linux-powerpc-bamboo_defconfig
>> linux-powerpc-cell_defconfig
>> linux-powerpc-ebony_defconfig
>> linux-powerpc-katmai_defconfig
>> linux-powerpc-ppc44x_defconfig
>> linux-powerpc-rainier_defconfig
>> linux-powerpc-sam440ep_defconfig
>> linux-powerpc-sequoia_defconfig
>> linux-powerpc-taishan_defconfig
>>
>> ...while three remain unresolved:
>>
>> linux-powerpc-asp8347_defconfig
>> linux-powerpc-mvme5100_defconfig
>> linux-powerpc-ppc64e_defconfig
>>
>
> Can you try with below changes (you may have to apply manually as I'm
> not sure my mail client preserves text integrity):
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index bf5f0a998273..3245eec95627 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -201,18 +201,15 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
> # often slow when they are implemented at all
> KBUILD_CFLAGS += $(call cc-option,-mno-string)
>
> -cpu-as-$(CONFIG_40x) += -Wa,-m405
> -cpu-as-$(CONFIG_44x) += -Wa,-m440
> cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
> -cpu-as-$(CONFIG_PPC_E500) += -Wa,-me500
> +cpu-as-$(CONFIG_TARGET_CPU_BOOL) += -Wa,-m$(CONFIG_TARGET_CPU)
>
> # When using '-many -mpower4' gas will first try and find a matching
> power4
> # mnemonic and failing that it will allow any valid mnemonic that GAS
> knows
> # about. GCC will pass -many to GAS when assembling, clang does not.
> # LLVM IAS doesn't understand either flag:
> https://github.com/ClangBuiltLinux/linux/issues/675
> # but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
> -cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call
> as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
> -cpu-as-$(CONFIG_PPC_E500MC) += $(call as-option,-Wa$(comma)-me500mc)
> +cpu-as-$(CONFIG_PPC_BOOK3S_64) += $(call as-option,-Wa$(comma)-many)
>
> KBUILD_AFLAGS += $(cpu-as-y)
> KBUILD_CFLAGS += $(cpu-as-y)
>
For ppc64e_defconfig, also make sure you have the fix that is on top of
powerpc/next-test branch :
https://github.com/linuxppc/linux/commits/next-test
next prev parent reply other threads:[~2022-12-15 6:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 21:51 Mass-building defconfigs: many fail with assembler errors Jan-Benedict Glaw
2022-12-13 0:26 ` Segher Boessenkool
2022-12-13 10:00 ` Jan-Benedict Glaw
2022-12-14 9:00 ` Jan-Benedict Glaw
2022-12-14 18:36 ` Jan-Benedict Glaw
2022-12-14 20:08 ` Segher Boessenkool
2022-12-15 8:47 ` Jan-Benedict Glaw
2022-12-13 3:49 ` Michael Ellerman
2022-12-13 8:41 ` Jan-Benedict Glaw
2022-12-13 12:23 ` Segher Boessenkool
2022-12-14 14:45 ` Jan-Benedict Glaw
2022-12-15 6:49 ` Christophe Leroy
2022-12-15 6:55 ` Christophe Leroy [this message]
2022-12-15 12:47 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=958dd327-aa24-a1e9-3572-bf7bbf28efda@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=jbglaw@lug-owl.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).