This is the mail archive of the gcc-patches@gcc.gnu.org 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: [lto][patch] Add a wrapper to share code among collect2 and the linker plugin


On Fri, Nov 28, 2008 at 10:56, Rafael Espindola <espindola@google.com> wrote:

> It produces some noise in the failing test cases since now collect2
> reports on the lto-wrapper failure.

Noise?  New failures or different messages confusing dejagnu?

> -      char *ltrans_output_file = NULL;
> +      char *lto_wrapper = getenv ("COLLECT_LTO_WRAPPER");
> +      struct pex_obj *pex;
> +      const char *prog = "lto-wrapper";
> +
> +      if (!lto_wrapper)
> +	fatal ("lto wrapper not found");

Better use the more explicit message: "COLLECT_LTO_WRAPPER not
set".

> --- /dev/null
> +++ b/gcc/lto-wrapper.c
> @@ -0,0 +1,269 @@

Copyright headers missing.

This is a good place to put an overall description of how the
whole thing works and the purpose of lto-wrapper.  Entry point,
how it's called, what it does, etc.

> +static enum lto_mode_d lto_mode = LTO_MODE_NONE; /* current LTO mode. */
> +
> +/* Just die.  */
> +

Might as well put properly documented arguments now.  Likewise
all the other functions copied from collect2.

> +static void
> +fork_execute (char **argv)

Needs documenting comment.

> +{
> +  struct pex_obj *pex;
> +
> +  pex = collect_execute (argv);
> +  collect_wait (argv[0], pex);
> +}
> +
> +static void
> +run_gcc(unsigned argc, char *argv[])

Likewise.

> +static int
> +process_args (int argc, char *argv[], char *gcc_argv[])

Likewise.

OK with those changes.


Diego.


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