diff mbox

[RFC] Getting LTO incremental linking work

Message ID 5659D60E.3080406@mentor.com
State New
Headers show

Commit Message

Tom de Vries Nov. 28, 2015, 4:27 p.m. UTC
On 28/11/15 13:02, Ilya Verbin wrote:
> 2015-11-28 14:01 GMT+03:00 Tom de Vries <Tom_deVries@mentor.com>:
>> This patch fixes the failures. I'm not sure if this is the right or complete
>> fix though.
>
> I think it's ok, at least until we decide how to rework the offloading
> stuff in lto-wrapper (see PR68463).
>

Bootstrapped and reg-tested on x86_64.

Committed to trunk as attached.

Thanks,
- Tom

Comments

Jan Hubicka Nov. 29, 2015, 8:03 p.m. UTC | #1
> 
> 2015-11-28  Tom de Vries  <tom@codesourcery.com>
> 
> 	* lto-wrapper.c (run_gcc): Handle -flinker-output argument.

Thanks, this looks fine to me.  THe way options are handled in lto-wrapper
seems like a gross hack.  Hopefully we will manage to clean this up eventually.
What happens when I call one of input objects -fresolution=.o?

Honza
> 
> ---
>  gcc/lto-wrapper.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
> index b9ac535..e4772d1 100644
> --- a/gcc/lto-wrapper.c
> +++ b/gcc/lto-wrapper.c
> @@ -1096,7 +1096,10 @@ run_gcc (unsigned argc, char *argv[])
>    if (have_offload && !have_lto)
>      {
>        for (i = 1; i < argc; ++i)
> -	if (strncmp (argv[i], "-fresolution=", sizeof ("-fresolution=") - 1))
> +	if (strncmp (argv[i], "-fresolution=",
> +		     sizeof ("-fresolution=") - 1) != 0
> +	    && strncmp (argv[i], "-flinker-output=",
> +			sizeof ("-flinker-output=") - 1) != 0)
>  	  {
>  	    char *out_file;
>  	    /* Can be ".o" or ".so".  */
diff mbox

Patch

Handle flinker-output in lto-wrapper

2015-11-28  Tom de Vries  <tom@codesourcery.com>

	* lto-wrapper.c (run_gcc): Handle -flinker-output argument.

---
 gcc/lto-wrapper.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index b9ac535..e4772d1 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1096,7 +1096,10 @@  run_gcc (unsigned argc, char *argv[])
   if (have_offload && !have_lto)
     {
       for (i = 1; i < argc; ++i)
-	if (strncmp (argv[i], "-fresolution=", sizeof ("-fresolution=") - 1))
+	if (strncmp (argv[i], "-fresolution=",
+		     sizeof ("-fresolution=") - 1) != 0
+	    && strncmp (argv[i], "-flinker-output=",
+			sizeof ("-flinker-output=") - 1) != 0)
 	  {
 	    char *out_file;
 	    /* Can be ".o" or ".so".  */