Re: cgcc does not preprocess arbitrary files when -E is used

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

 



On Wed, Nov 21, 2018 at 01:09:17PM +0100, Antonio Ospite wrote:
> Hi,
> 
> I was trying to build dash[1] with cgcc and the compilation failed:
> 
> $ git clone git://git.kernel.org/pub/scm/utils/dash/dash.git
> $ cd dash/
> $ ./autogen
> $ CC=cgcc ./configure && make
> 
> This was because an auto-generated file was not created.
> 
> dash preprocesses a file using gcc[2, line 50] like that:
> 
> builtins.def: builtins.def.in $(top_builddir)/config.h
> 	$(COMPILE) -E -x c -o $@ $<
> 
> however preprocessing files which does not have a .c extension seems to
> be unsupported with cgcc.

...
 
> The issue could be easily fixed in dash by using something like:
> 
> $ cgcc -DHAVE_SOMETHING -E - < test.c.in > test.c
> 
> or by calling $(CPP) directly instead of $(COMPILER), however other
> projects may run into similar issues so maybe fixing cgcc to look
> a little more like gcc when -E is passed would be better.

I agree, better teach cgcc about '-x c'.

Best regards,
-- Luc Van Oostenryck



[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