Re: [PATCH] cgcc: handle -x assembler

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

 



Hi,

Sorry for this late reply.
 
On Sun, Apr 10, 2022 at 10:00:26AM -0400, Tom Rix wrote:
> On linux-next, using
> make CC=cgcc
> 
> fails with
> cgcc: unknown assembler invoked
> scripts/Kconfig.include:50: Sorry, this assembler is not supported.
> 
> cgcc is being invoked with
> cgcc -Wa,--version -c -x assembler /dev/null -o /dev/null
> And dieing when the '-x c' is not matched.
>
> Add a check for -x assember.


As you most probably know, cgcc is a wrapper around GCC to transparently
also call sparse on the source code.
This was designed when using sparse on non-kernel code. The kernel doesn't
need it since its build system can do the same directly using the commands:
	make C=1 <...>
or
	make C=2 <...>
insuring it's called with the correct arguments (like the --arch option)
and taking in account a few idiosyncrasies.

Your patch is OK regarding cgcc itself but I don't know what good it will
do after, when calling sparse, since sparse can only process C code an will
surely choke on assembly files.

So, are you sure you must cgcc here and can't use the existing make C=[12]
mechanism? Otherwise, a more correct patch would be to change the check
for '-x c', set $do_check = 0 when the argument is 'assembler' (or
better, when anything other than 'c') and preferably stop to parse the
remaining arguments/directly call the $REAL_CC.

Best regards,
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux