Re: [PATCH 1/5] MIPS: Move various toolchain ASE check to Kconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> 2023年4月7日 19:57,Nathan Chancellor <nathan@xxxxxxxxxx> 写道:
> 
> Hi Jiaxun,
> 
> On Fri, Apr 07, 2023 at 11:27:17AM +0100, Jiaxun Yang wrote:
>> Use Kconfig to perform Kconfig toolchain feature check, so we will
>> be able to have toolchain feature availablility information in Kconfig
>> to guard relevant options.
>> 
> 
> First of all, thank you a lot for this series! I applied them on top of
> mips-next and my allnoconfig issue appears to be gone. However, with
> this change, 32r1{,el}_defconfig is broken for arch/mips/kernel/traps.c.
> 
> $ make -skj"$(nproc)" ARCH=mips CROSS_COMPILE=mips-linux-gnu- LLVM=1 LLVM_IAS=0 O=build mrproper 32r1_defconfig arch/mips/kernel/traps.o
> ...
> /tmp/traps-f8ea56.s: Assembler messages:
> /tmp/traps-f8ea56.s:8227: Error: `fp=64' used with a 32-bit fpu
> /tmp/traps-f8ea56.s:8228: Error: `fp=64' used with a 32-bit fpu
> /tmp/traps-f8ea56.s:8228: Warning: the `msa' extension requires MIPS32 revision 2 or greater
> clang: error: assembler command failed with exit code 1 (use -v to see invocation)
> ...


Oh that’s actually a problem in code.
Will add a patch to address this in v2.

> 
> In case it matters:
> 
> $ clang --version | head -1
> ClangBuiltLinux clang version 16.0.1
> 
> $ mips-linux-gnu-as --version | head -1
> GNU assembler (GNU Binutils) 2.40
> 
> A few comments below, I have not tested anything beyond this.
> 
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
>> ---
>> arch/mips/Kconfig                | 27 +++++++++++++++++++++++++++
>> arch/mips/Makefile               | 29 +++--------------------------
>> arch/mips/crypto/crc32-mips.c    |  4 ++--
>> arch/mips/include/asm/asmmacro.h |  8 ++++----
>> arch/mips/include/asm/ginvt.h    |  2 +-
>> arch/mips/include/asm/mipsregs.h | 10 +++++-----
>> arch/mips/include/asm/msa.h      |  4 ++--
>> 7 files changed, 44 insertions(+), 40 deletions(-)
>> 
>> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
>> index 770d098b11bf..c52401c155a4 100644
>> --- a/arch/mips/Kconfig
>> +++ b/arch/mips/Kconfig
>> @@ -3157,6 +3157,12 @@ config MIPS32_N32
>> 
>>   If unsure, say N.
>> 
>> +config CC_HAS_SMARTMIPS
>> + def_bool $(cc-option,-mmicromips)
> 
> -msmartmips?

Good catch :-D

> 
>> +
>> +config CC_HAS_MICROMIPS
>> + def_bool $(cc-option,-mmicromips)
> 
> Neither of these configurations are used in this change. Should they be
> moved to the next change in the series?

Hmm I’d prefer leave them here because this patch tracks all compiler checks that
we have in Makefile.


Thanks
- Jiaxun






[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux