Re: [PATCH V2] MIPS: Loongson: Fix build error when make modules_install

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

 



On Wed, 28 Jun 2023, Huacai Chen wrote:

> After commit 0e96ea5c3eb5904e5dc2f ("MIPS: Loongson64: Clean up use of
> cc-ifversion") we get a build error when make modules_install:
> 
> cc1: error: '-mloongson-mmi' must be used with '-mhard-float'
> 
> The reason is when make modules_install, 'call cc-option' doesn't work
> in $(KBUILD_CFLAGS) of 'CHECKFLAGS'. Then there is no -mno-loongson-mmi
> applied and -march=loongson3a enable MMI instructions.

 That's the wrong fix, you've just papered over the actual problem in a 
needlessly complex way.

 The right fix is not to define CHECKFLAGS unless `need-compiler' -- we 
don't need CHECKFLAGS when we aren't going to use the compiler, in which 
case Makefile.compiler is not sourced, as discussed here: 
<https://lore.kernel.org/r/20230204145641.66417-1-alobakin@xxxxxxxxxxx/> 
and here: 
<https://lore.kernel.org/r/alpine.DEB.2.21.2302071942200.11790@xxxxxxxxxxxxxxxxx/>.  
I guess nobody bothers reading such discussions though, hence the most 
obvious fixes are ignored.

 I've posted proper fixes now: 
<https://lore.kernel.org/r/alpine.DEB.2.21.2307180025120.62448@xxxxxxxxxxxxxxxxx/>.

  Maciej



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux