On Wed, Oct 30, 2019 at 10:06:41AM +0100, Ben Dooks wrote: > > > On 2019-10-29 21:57, Luc Van Oostenryck wrote: > > On Tue, Oct 29, 2019 at 06:57:02PM +0000, Ramsay Jones wrote: > > > > Do you see some complications? > > > > > > No, I was thinking about the opportunity to simplify cgcc! : > > Should we also have an option to use cc to provide the current > architecture and other cc defines introduced by the ore processor > stage to allow synchronization with compiler? Or shod this be done > in the makefile calling It depends. I think that for the kernel it is not needed because all CFLAGS are also given as CHECKFLAGS (and, of course, I planning to send in the following days a patch for the kernel to add 'CHECKFLAGS += --arch=$(ARCH)'). I think that for the kernel it would be enough. For user-space, part of this is more or less done in the cgcc script (and you can specifiy the compiler via the unusual environment variable 'REAL_CC', the idea being to be able to define cgcc tself as 'CC'). In both cases, arch-specific details surely need to be added, like the recent -mcmodel for RISC-V. I'm thinking mainly about '-march' & '-mabi'. These can be added as needed but are often quite arch-specific which is currently a problem for Sparse. My longer term plan is to move everything arch-specific to separated files. To answer your question, I would say that if you can easily do it via the makefile or the makefile's configuration, then do it so. -- Luc