On Fri, 30 Jan 2015, David Malcolm wrote:

> gcc/ChangeLog:
>       PR jit/64810
>       * Makefile.in (GCC_OBJS): Add gcc-main.o.
>       * gcc-main.c: New file, containing "main" taken from gcc.c.
>       * gcc.c (do_self_spec): Free decoded_options.
>       (class driver): Move declaration to gcc.h.
>       (main): Move declaration and implementation to new file
>       gcc-main.c.
>       (driver_get_configure_time_options): New function.
>       * gcc.h (class driver): Move this declaration here, from
>       gcc.c.
>       (driver_get_configure_time_options): New declaration.

The driver changes are OK.  Though in the JIT I suspect you might need to 
process DRIVER_SELF_SPECS as well - not everything handled through 
DRIVER_SELF_SPECS is a default cc1 would follow anyway, sometimes it may 
actually set things rather than merely make them visible to other specs.  
And indeed CC1_SPEC may also be needed.  Some architectures use 
DRIVER_SELF_SPECS to handle -march=native, some use CC1_SPEC - so if you 
configure --with-arch=native (a perfectly legitimate way to configure GCC 
if you're building it for one particular system to use to build code that 
will run only there) then processing OPTION_DEFAULT_SPECS will cause 
-march=native to appear in the list of options, and the other two specs 
are needed to convert it into the underlying options understood by the 
back-end option handling.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to