Re: tip/master build: 205 builds: 5 failed, 200 passed, 9 errors, 22 warnings (v6.2-rc7-273-gd67c17ddc899)

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

 



+Thomas Bogendoerfer +linux-mips

On 07/02/2023 14:40, Mark Brown wrote:
> On Tue, Feb 07, 2023 at 10:56:04AM +0100, Guillaume Tucker wrote:
>> On 07/02/2023 09:53, Ingo Molnar wrote:
> 
>>>>     4    cc1: error: ‘-mloongson-mmi’ must be used with ‘-mhard-float’
>>>
>>> ... but this exact same error was 'reported' a year ago on January 22:
>>>
>>>>    2    cc1: error: ‘-mloongson-mmi’ must be used with ‘-mhard-float’
> 
>>> So these regression reports are useless in this form and they clutter 
>>> people's inboxes. Is any person reading them and acting on them to make 
>>> sure these emails are sensible?
> 
>> About the actual kernel build error, I guess it's a shame nobody
>> has fixed this yet.  I'll take a look what the root cause might
>> be.  If it's a KernelCI build configuration issue e.g. using
>> wrong compiler flags then we can fix that, otherwise it's
>> probably something to report more directly to some MIPS
>> maintainers.
> 
> Honestly at this point I think we should just drop the affected MIPS
> configurations at this point, as Ingo says they've been failing for
> so long with nobody caring.

Maybe the MIPS people just haven't seen this.  I've added Thomas
and the linux-mips list to confirm.

After some investigation, it turns out the error happens when
doing "make modules_install".  Here's the issue:

* modules_install is listed in "no-compiler-targets" in the
top-level Makefile

* as a result, scripts/Makefile.compiler is not included

* arch/mips/loongson64/Platform requires the "cc-option" function
  to add -mnon-loongson-mmi

* since "cc-option" is not defined when just doing "make
  modules_install", the flag is not added and the error mentioned
  above occurs

GitHub issue: https://github.com/kernelci/kernelci-project/issues/176

Here's a hack to prove this point, need-compiler is defined in
the top-level Makefile so it shouldn't be used here but
this "fixes" the problem:



diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 490dea07d4e0..024f62dbef76 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -317,10 +317,12 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
 KBUILD_LDFLAGS         += -m $(ld-emul)
 
 ifdef CONFIG_MIPS
+ifdef need-compiler
 CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
        grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
        sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
 endif
+endif
 
 OBJCOPYFLAGS           += --remove-section=.reginfo
 


I guess another way would be to unconditionally add the options
to the cflags, in fact there are other places where this appears
to be done.  I'm not sure which GCC or Clang versions support it
or not, so that may not work in practice.



diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Platform
index 473404cae1c4..b7b2db13f1a2 100644
--- a/arch/mips/loongson64/Platform
+++ b/arch/mips/loongson64/Platform
@@ -12,7 +12,7 @@ endif
 
 # Some -march= flags enable MMI instructions, and GCC complains about that
 # support being enabled alongside -msoft-float. Thus explicitly disable MMI.
-cflags-y += $(call cc-option,-mno-loongson-mmi)
+cflags-y += -mno-loongson-mmi
 
 #
 # Loongson Machines' Support



This was reproduced using GCC 10 with the latest
kernelci/gcc-10:mips-kselftest-kernelci Docker image running as
root.


Is this something someone familiar with MIPS would like to fix
properly?  If not then please confirm that we should just drop
the loongson2k_defconfig builds from KernelCI.  Is this kernel
config actually still maintained in mainline?

Thanks,
Guillaume




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

  Powered by Linux