This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, M2] Compiler driver patches

On Wed, 20 Nov 2013, Gaius Mulley wrote:

> As an example of why this is required - the Modula-2 compiler driver
> uses its own linker.  So it needs to both suppress the default linker
> and also get a list of objects generated from a compiler invocation.

I think you'll need to explain that a lot more - what you mean by using 
its own linker, why it uses it, and what the implications are for 
mixed-language programs, for LTO, for target-specific aspects of linker 
specs (including LINK_COMMAND_SPEC).  In general patches submitted 
separately from the front end need to be given a self-contained 
motivation - it's a lot harder to get confidence in the design of a 
feature without users of that feature being posted at the same time.

I suspect that some of the driver changes could better be motivated, in 
the absence of a front-end submission, as part of a refactoring of 
existing drivers, if there is anything you found existing drivers did that 
you also wanted to do in your driver but where there was no better way of 
using it than copy-and-paste.

> /*
>  *  lang_register_spec_functions - register the Modula-2 associated
>  *                                 spec functions.
>  */

Note the leading "*" on each line of comments isn't GNU style.

> void lang_register_spec_functions (void)

And there should be a newline not a space between the return type and the 
function name.

> 2013-11-21  Gaius Mulley   <>
>         * gcc/gcc.c (handle_OPT_B): New function which reduces size of

ChangeLot entries don't include the leading gcc/ - they are always 
relative to the directory containing the ChangeLog file.

> @@ -757,6 +762,7 @@
>  /* We pass any -flto flags on to the linker, which is expected
>     to understand them.  In practice, this means it had better be collect2.  */
>  /* %{e*} includes -export-dynamic; see comment in common.opt.  */
> +
>  #define LINK_COMMAND_SPEC "\
>  %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\

Generally avoid spurious diff hunks like this that just change whitespace 
in existing code.

> +/* front end registered spec functions */

Comments should start with a capital letter and end with ".  */".

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]