public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
@ 2010-11-16 16:27 Dave Korn
  2010-11-16 16:49 ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Korn @ 2010-11-16 16:27 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]


    Hi list,

  In PR42690(*), GCC is configured with --disable-shared.  This effectively
means that all compilations performed by the built compiler have -static in
effect, but implicitly: there is no actual -static among the command-line
options and thus any related specs do not become activated.  This leads to
unresolved symbols in the final link, owing to the late optimisations
performed by LTO/ltrans introducing new undefined symbols that weren't visible
earlier in either the normal generated object file or the LTO symtab it carries.

  Similar problems arise on PE-COFF even without configuring with
--disable-shared, as I discussed earlier on the main list(**), since even
dynamic symbols are effectively resolved statically through the use of import
library stubs.

  This patch resolves all these problems using the method suggested by Rafael
in comment 12 of the PR audit trail: it uses linker plugin -pass-through=
options to pass libgcc and libc back to the linker one more time after all the
ltrans-generated objects have been added into the link.  It uses a new spec
function to process the link_gcc_c__sequence spec, which should guarantee that
it takes account of platform-specific variations in libc naming and will
incorporate all the effects of any specs based on -static or -static-libgcc on
the way.

gcc/ChangeLog:

2010-11-16  Dave Korn  <...

	PR driver/42690
	* gcc.c (LINK_COMMAND_SPEC): Remove hard-coded pass-through plugin
	options, replace by call of pass-through-libs spec function to process
	link_gcc_c_sequence spec.
	(lto_libgcc_spec): Delete variable.
	(static_specs[]): Remove related entry.
	(static_spec_functions[]): Add new entry for pass-through-libs.
	(main): Don't generate deleted lto_libgcc_spec.
	(pass_through_libs_spec_func): New function to implement the new
	pass-through-libs spec function.
	* doc/invoke.texi (pass-through-libs): Document new spec function.

  Bootstrapped and tested on i686-pc-cygwin without new regressions(***).  Now
running an LTO bootstrap on that platform, but last time I tested it tripped
the unrelated PR45325 in libcpp and I expect it still does.

  Also tested on x86_64-unknown-linux-gnu vs. all eight combinations of a)
LTO-enabled vs. non-LTO-enabled bootstrap, b) GOLD vs. GNU LD for linker and
plugin, c) --enable-static vs. --disable-static, without any regressions, and
fixing bootstrap in three cases (two vs. LD, one vs. GOLD, as even GOLD
currently fails to lto-bootstrap with --disable-static).

  OK for trunk?

    cheers,
      DaveK
-- 
(*)   - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690
(**)  - http://gcc.gnu.org/ml/gcc/2010-10/msg00204.html
(***) - http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg01011.html

[-- Attachment #2: pr42690.diff --]
[-- Type: text/x-c, Size: 4838 bytes --]

Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c	(revision 166803)
+++ gcc/gcc.c	(working copy)
@@ -284,6 +284,7 @@ static const char *print_asm_header_spec_function
 static const char *compare_debug_dump_opt_spec_function (int, const char **);
 static const char *compare_debug_self_opt_spec_function (int, const char **);
 static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
+static const char *pass_through_libs_spec_func (int, const char **);
 \f
 /* The Specs Language
 
@@ -656,8 +657,7 @@ proper position among the other output files.  */
     -plugin %(linker_plugin_file) \
     -plugin-opt=%(lto_wrapper) \
     -plugin-opt=-fresolution=%u.res \
-    %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)}	\
-    %{static:-plugin-opt=-pass-through=-lc}	\
+    %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \
     } \
     %{flto*:%<fcompare-debug*} \
     %{flto*} %l " LINK_PIE_SPEC \
@@ -712,7 +712,6 @@ static const char *linker_name_spec = LINKER_NAME;
 static const char *linker_plugin_file_spec = "";
 static const char *lto_wrapper_spec = "";
 static const char *lto_gcc_spec = "";
-static const char *lto_libgcc_spec = "";
 static const char *link_command_spec = LINK_COMMAND_SPEC;
 static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
 static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC;
@@ -1197,7 +1196,6 @@ static struct spec_list static_specs[] =
   INIT_STATIC_SPEC ("linker_plugin_file",	&linker_plugin_file_spec),
   INIT_STATIC_SPEC ("lto_wrapper",		&lto_wrapper_spec),
   INIT_STATIC_SPEC ("lto_gcc",			&lto_gcc_spec),
-  INIT_STATIC_SPEC ("lto_libgcc",		&lto_libgcc_spec),
   INIT_STATIC_SPEC ("link_libgcc",		&link_libgcc_spec),
   INIT_STATIC_SPEC ("md_exec_prefix",		&md_exec_prefix),
   INIT_STATIC_SPEC ("md_startfile_prefix",	&md_startfile_prefix),
@@ -1242,6 +1240,7 @@ static const struct spec_function static_spec_func
   { "compare-debug-dump-opt",	compare_debug_dump_opt_spec_function },
   { "compare-debug-self-opt",	compare_debug_self_opt_spec_function },
   { "compare-debug-auxbase-opt", compare_debug_auxbase_opt_spec_function },
+  { "pass-through-libs",	pass_through_libs_spec_func },
 #ifdef EXTRA_SPEC_FUNCTIONS
   EXTRA_SPEC_FUNCTIONS
 #endif
@@ -6803,11 +6802,6 @@ warranty; not even for MERCHANTABILITY or FITNESS
 						 false);
 	  if (!linker_plugin_file_spec)
 	    fatal_error ("-fuse-linker-plugin, but " LTOPLUGINSONAME " not found");
-
-	  lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a",
-					 R_OK, true);
-	  if (!lto_libgcc_spec)
-	    fatal_error ("could not find libgcc.a");
 	}
       lto_gcc_spec = argv[0];
 
@@ -8188,3 +8182,33 @@ compare_debug_auxbase_opt_spec_function (int arg,
 
   return name;
 }
+
+/* %:pass-through-libs spec function.  Finds all -l options and input
+   file names in the lib spec passed to it, and makes a list of them
+   prepended with the plugin option to cause them to be passed through
+   to the final link after all the new object files have been added.  */
+
+const char *
+pass_through_libs_spec_func (int argc, const char **argv)
+{
+  char *prepended = xstrdup (" ");
+  int n;
+  /* Shlemiel the painter's algorithm.  Innately horrible, but at least
+     we know that there will never be more than a handful of strings to
+     concat, and it's only once per run, so it's not worth optimising.  */
+  for (n = 0; n < argc; n++)
+    {
+      char *old = prepended;
+      /* Anything that isn't an option is a full path to an output
+         file; pass it through if it ends in '.a'.  Among options,
+	 pass only -l.  */
+      if (argv[n][0] == '-'
+		? argv[n][1] == 'l'
+		: !strcmp (".a", argv[n] + strlen (argv[n]) - 2))
+	prepended = concat (prepended, "-plugin-opt=-pass-through=",
+		argv[n], " ", NULL);
+      if (prepended != old)
+	free (old);
+    }
+  return prepended;
+}
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 166803)
+++ gcc/doc/invoke.texi	(working copy)
@@ -9694,6 +9694,18 @@ its usage:
 %:remove-outfile(-lm)
 @end smallexample
 
+@item @code{pass-through-libs}
+The @code{pass-through-libs} spec function takes any number of arguments.  It
+finds any @option{-l} options and any non-options ending in ".a" (which it
+assumes are the names of linker input library archive files) and returns a
+result containing all the found arguments each prepended by
+@option{-plugin-opt=-pass-through=} and joined by spaces.  This list is
+intended to be passed to the LTO linker plugin.
+
+@smallexample
+%:pass-through-libs(%G %L %G)
+@end smallexample
+
 @item @code{print-asm-header}
 The @code{print-asm-header} function takes no arguments and simply
 prints a banner like:

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-16 16:27 [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues Dave Korn
@ 2010-11-16 16:49 ` Richard Guenther
  2010-11-16 16:52   ` Joseph S. Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Guenther @ 2010-11-16 16:49 UTC (permalink / raw)
  To: Dave Korn; +Cc: GCC Patches, Joseph S. Myers

On Tue, Nov 16, 2010 at 5:42 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>
>    Hi list,
>
>  In PR42690(*), GCC is configured with --disable-shared.  This effectively
> means that all compilations performed by the built compiler have -static in
> effect, but implicitly: there is no actual -static among the command-line
> options and thus any related specs do not become activated.  This leads to
> unresolved symbols in the final link, owing to the late optimisations
> performed by LTO/ltrans introducing new undefined symbols that weren't visible
> earlier in either the normal generated object file or the LTO symtab it carries.
>
>  Similar problems arise on PE-COFF even without configuring with
> --disable-shared, as I discussed earlier on the main list(**), since even
> dynamic symbols are effectively resolved statically through the use of import
> library stubs.
>
>  This patch resolves all these problems using the method suggested by Rafael
> in comment 12 of the PR audit trail: it uses linker plugin -pass-through=
> options to pass libgcc and libc back to the linker one more time after all the
> ltrans-generated objects have been added into the link.  It uses a new spec
> function to process the link_gcc_c__sequence spec, which should guarantee that
> it takes account of platform-specific variations in libc naming and will
> incorporate all the effects of any specs based on -static or -static-libgcc on
> the way.
>
> gcc/ChangeLog:
>
> 2010-11-16  Dave Korn  <...
>
>        PR driver/42690
>        * gcc.c (LINK_COMMAND_SPEC): Remove hard-coded pass-through plugin
>        options, replace by call of pass-through-libs spec function to process
>        link_gcc_c_sequence spec.
>        (lto_libgcc_spec): Delete variable.
>        (static_specs[]): Remove related entry.
>        (static_spec_functions[]): Add new entry for pass-through-libs.
>        (main): Don't generate deleted lto_libgcc_spec.
>        (pass_through_libs_spec_func): New function to implement the new
>        pass-through-libs spec function.
>        * doc/invoke.texi (pass-through-libs): Document new spec function.
>
>  Bootstrapped and tested on i686-pc-cygwin without new regressions(***).  Now
> running an LTO bootstrap on that platform, but last time I tested it tripped
> the unrelated PR45325 in libcpp and I expect it still does.
>
>  Also tested on x86_64-unknown-linux-gnu vs. all eight combinations of a)
> LTO-enabled vs. non-LTO-enabled bootstrap, b) GOLD vs. GNU LD for linker and
> plugin, c) --enable-static vs. --disable-static, without any regressions, and
> fixing bootstrap in three cases (two vs. LD, one vs. GOLD, as even GOLD
> currently fails to lto-bootstrap with --disable-static).
>
>  OK for trunk?

Are we sure that all -l options are joined ones?  The driver accepts
-l  m just fine.

I'm ok with the patch if Joseph thinks it is ok.

Thanks,
Richard.

>    cheers,
>      DaveK
> --
> (*)   - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690
> (**)  - http://gcc.gnu.org/ml/gcc/2010-10/msg00204.html
> (***) - http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg01011.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-16 16:49 ` Richard Guenther
@ 2010-11-16 16:52   ` Joseph S. Myers
  2010-11-16 19:53     ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph S. Myers @ 2010-11-16 16:52 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Dave Korn, GCC Patches

On Tue, 16 Nov 2010, Richard Guenther wrote:

> Are we sure that all -l options are joined ones?  The driver accepts
> -l  m just fine.

The driver converts -l options to joined form when passing them to 
add_infile.  I don't know about the -l options contained directly in 
specs; that's what would need checking.  (Specs other than those in 
driver_self_specs do not go through the option processing machinery; they 
are generating command lines for programs other than the driver.)

> I'm ok with the patch if Joseph thinks it is ok.

I have no comments on this patch.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-16 16:52   ` Joseph S. Myers
@ 2010-11-16 19:53     ` Dave Korn
  2010-11-17 11:03       ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Korn @ 2010-11-16 19:53 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Richard Guenther, GCC Patches

On 16/11/2010 16:33, Joseph S. Myers wrote:
> On Tue, 16 Nov 2010, Richard Guenther wrote:
> 
>> Are we sure that all -l options are joined ones?  The driver accepts
>> -l  m just fine.
> 
> The driver converts -l options to joined form when passing them to 
> add_infile.  I don't know about the -l options contained directly in 
> specs; that's what would need checking.  (Specs other than those in 
> driver_self_specs do not go through the option processing machinery; they 
> are generating command lines for programs other than the driver.)
> 
>> I'm ok with the patch if Joseph thinks it is ok.
> 
> I have no comments on this patch.


  Right you are.  I'll test the patch with separated -l options and see if it
works; if not, I'll submit a respin, but if it does work, can I take this
discussion as approval?  (Also, bear in mind that the spec function only gets
applied to link_gcc_c_sequence: it doesn't need to be fully generic, except of
course that we haven't ever explicitly banned separated -l options in specs;
that said, there probably aren't any.)

  BTW, the lto-bootstrap completed even on Cygwin (I don't know however if
this implies that PR45325 is resolved, or was just lucky not to trip it on
this occasion).  Test results will take a day or two to arrive, as ever.

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-16 19:53     ` Dave Korn
@ 2010-11-17 11:03       ` Richard Guenther
  2010-11-17 21:56         ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Guenther @ 2010-11-17 11:03 UTC (permalink / raw)
  To: Dave Korn; +Cc: Joseph S. Myers, GCC Patches

On Tue, Nov 16, 2010 at 8:31 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 16/11/2010 16:33, Joseph S. Myers wrote:
>> On Tue, 16 Nov 2010, Richard Guenther wrote:
>>
>>> Are we sure that all -l options are joined ones?  The driver accepts
>>> -l  m just fine.
>>
>> The driver converts -l options to joined form when passing them to
>> add_infile.  I don't know about the -l options contained directly in
>> specs; that's what would need checking.  (Specs other than those in
>> driver_self_specs do not go through the option processing machinery; they
>> are generating command lines for programs other than the driver.)
>>
>>> I'm ok with the patch if Joseph thinks it is ok.
>>
>> I have no comments on this patch.
>
>
>  Right you are.  I'll test the patch with separated -l options and see if it
> works; if not, I'll submit a respin, but if it does work, can I take this
> discussion as approval?

Yes.

> (Also, bear in mind that the spec function only gets
> applied to link_gcc_c_sequence: it doesn't need to be fully generic, except of
> course that we haven't ever explicitly banned separated -l options in specs;
> that said, there probably aren't any.)
>
>  BTW, the lto-bootstrap completed even on Cygwin (I don't know however if
> this implies that PR45325 is resolved, or was just lucky not to trip it on
> this occasion).  Test results will take a day or two to arrive, as ever.

Thanks,
Richard.

>    cheers,
>      DaveK
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-17 11:03       ` Richard Guenther
@ 2010-11-17 21:56         ` Dave Korn
  2010-11-18 12:26           ` Richard Guenther
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Korn @ 2010-11-17 21:56 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Joseph S. Myers, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

On 17/11/2010 10:36, Richard Guenther wrote:
> On Tue, Nov 16, 2010 at 8:31 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>> On 16/11/2010 16:33, Joseph S. Myers wrote:
>>> On Tue, 16 Nov 2010, Richard Guenther wrote:
>>>
>>>> Are we sure that all -l options are joined ones?  The driver accepts
>>>> -l  m just fine.
>>> The driver converts -l options to joined form when passing them to
>>> add_infile.  I don't know about the -l options contained directly in
>>> specs; that's what would need checking.  (Specs other than those in
>>> driver_self_specs do not go through the option processing machinery; they
>>> are generating command lines for programs other than the driver.)
>>>
>>>> I'm ok with the patch if Joseph thinks it is ok.
>>> I have no comments on this patch.
>>
>>  Right you are.  I'll test the patch with separated -l options and see if it
>> works; if not, I'll submit a respin, 

  Herewith the respin.  Same ChangeLog as before; only differences from
previous version are contained to pass_through_libs_spec_func().

  LTO-bootstrap and test cycle in progress on i686-pc-cygwin.  OK once that
completes successfully?

    cheers,
      DaveK

[-- Attachment #2: pr42690-take2.diff --]
[-- Type: text/x-c, Size: 5238 bytes --]

Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c	(revision 166803)
+++ gcc/gcc.c	(working copy)
@@ -284,6 +284,7 @@ static const char *print_asm_header_spec_function
 static const char *compare_debug_dump_opt_spec_function (int, const char **);
 static const char *compare_debug_self_opt_spec_function (int, const char **);
 static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
+static const char *pass_through_libs_spec_func (int, const char **);
 \f
 /* The Specs Language
 
@@ -656,8 +657,7 @@ proper position among the other output files.  */
     -plugin %(linker_plugin_file) \
     -plugin-opt=%(lto_wrapper) \
     -plugin-opt=-fresolution=%u.res \
-    %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)}	\
-    %{static:-plugin-opt=-pass-through=-lc}	\
+    %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} \
     } \
     %{flto*:%<fcompare-debug*} \
     %{flto*} %l " LINK_PIE_SPEC \
@@ -712,7 +712,6 @@ static const char *linker_name_spec = LINKER_NAME;
 static const char *linker_plugin_file_spec = "";
 static const char *lto_wrapper_spec = "";
 static const char *lto_gcc_spec = "";
-static const char *lto_libgcc_spec = "";
 static const char *link_command_spec = LINK_COMMAND_SPEC;
 static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
 static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC;
@@ -1197,7 +1196,6 @@ static struct spec_list static_specs[] =
   INIT_STATIC_SPEC ("linker_plugin_file",	&linker_plugin_file_spec),
   INIT_STATIC_SPEC ("lto_wrapper",		&lto_wrapper_spec),
   INIT_STATIC_SPEC ("lto_gcc",			&lto_gcc_spec),
-  INIT_STATIC_SPEC ("lto_libgcc",		&lto_libgcc_spec),
   INIT_STATIC_SPEC ("link_libgcc",		&link_libgcc_spec),
   INIT_STATIC_SPEC ("md_exec_prefix",		&md_exec_prefix),
   INIT_STATIC_SPEC ("md_startfile_prefix",	&md_startfile_prefix),
@@ -1242,6 +1240,7 @@ static const struct spec_function static_spec_func
   { "compare-debug-dump-opt",	compare_debug_dump_opt_spec_function },
   { "compare-debug-self-opt",	compare_debug_self_opt_spec_function },
   { "compare-debug-auxbase-opt", compare_debug_auxbase_opt_spec_function },
+  { "pass-through-libs",	pass_through_libs_spec_func },
 #ifdef EXTRA_SPEC_FUNCTIONS
   EXTRA_SPEC_FUNCTIONS
 #endif
@@ -6803,11 +6802,6 @@ warranty; not even for MERCHANTABILITY or FITNESS
 						 false);
 	  if (!linker_plugin_file_spec)
 	    fatal_error ("-fuse-linker-plugin, but " LTOPLUGINSONAME " not found");
-
-	  lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a",
-					 R_OK, true);
-	  if (!lto_libgcc_spec)
-	    fatal_error ("could not find libgcc.a");
 	}
       lto_gcc_spec = argv[0];
 
@@ -8188,3 +8182,46 @@ compare_debug_auxbase_opt_spec_function (int arg,
 
   return name;
 }
+
+/* %:pass-through-libs spec function.  Finds all -l options and input
+   file names in the lib spec passed to it, and makes a list of them
+   prepended with the plugin option to cause them to be passed through
+   to the final link after all the new object files have been added.  */
+
+const char *
+pass_through_libs_spec_func (int argc, const char **argv)
+{
+  char *prepended = xstrdup (" ");
+  int n;
+  /* Shlemiel the painter's algorithm.  Innately horrible, but at least
+     we know that there will never be more than a handful of strings to
+     concat, and it's only once per run, so it's not worth optimising.  */
+  for (n = 0; n < argc; n++)
+    {
+      char *old = prepended;
+      /* Anything that isn't an option is a full path to an output
+         file; pass it through if it ends in '.a'.  Among options,
+	 pass only -l.  */
+      if (argv[n][0] == '-' && argv[n][1] == 'l')
+	{
+	  const char *lopt = argv[n] + 2;
+	  /* Handle both joined and non-joined -l options.  If for any
+	     reason there's a trailing -l with no joined or following
+	     arg just discard it.  */
+	  if (!*lopt && ++n >= argc)
+	    break;
+	  else if (!*lopt)
+	    lopt = argv[n];
+	  prepended = concat (prepended, "-plugin-opt=-pass-through=-l",
+		lopt, " ", NULL);
+	}
+      else if (!strcmp (".a", argv[n] + strlen (argv[n]) - 2))
+	{
+	  prepended = concat (prepended, "-plugin-opt=-pass-through=",
+		argv[n], " ", NULL);
+	}
+      if (prepended != old)
+	free (old);
+    }
+  return prepended;
+}
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 166803)
+++ gcc/doc/invoke.texi	(working copy)
@@ -9694,6 +9694,18 @@ its usage:
 %:remove-outfile(-lm)
 @end smallexample
 
+@item @code{pass-through-libs}
+The @code{pass-through-libs} spec function takes any number of arguments.  It
+finds any @option{-l} options and any non-options ending in ".a" (which it
+assumes are the names of linker input library archive files) and returns a
+result containing all the found arguments each prepended by
+@option{-plugin-opt=-pass-through=} and joined by spaces.  This list is
+intended to be passed to the LTO linker plugin.
+
+@smallexample
+%:pass-through-libs(%G %L %G)
+@end smallexample
+
 @item @code{print-asm-header}
 The @code{print-asm-header} function takes no arguments and simply
 prints a banner like:

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-17 21:56         ` Dave Korn
@ 2010-11-18 12:26           ` Richard Guenther
  2010-11-23 22:05             ` Dave Korn
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Guenther @ 2010-11-18 12:26 UTC (permalink / raw)
  To: Dave Korn; +Cc: Joseph S. Myers, GCC Patches

On Wed, Nov 17, 2010 at 10:33 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 17/11/2010 10:36, Richard Guenther wrote:
>> On Tue, Nov 16, 2010 at 8:31 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>>> On 16/11/2010 16:33, Joseph S. Myers wrote:
>>>> On Tue, 16 Nov 2010, Richard Guenther wrote:
>>>>
>>>>> Are we sure that all -l options are joined ones?  The driver accepts
>>>>> -l  m just fine.
>>>> The driver converts -l options to joined form when passing them to
>>>> add_infile.  I don't know about the -l options contained directly in
>>>> specs; that's what would need checking.  (Specs other than those in
>>>> driver_self_specs do not go through the option processing machinery; they
>>>> are generating command lines for programs other than the driver.)
>>>>
>>>>> I'm ok with the patch if Joseph thinks it is ok.
>>>> I have no comments on this patch.
>>>
>>>  Right you are.  I'll test the patch with separated -l options and see if it
>>> works; if not, I'll submit a respin,
>
>  Herewith the respin.  Same ChangeLog as before; only differences from
> previous version are contained to pass_through_libs_spec_func().
>
>  LTO-bootstrap and test cycle in progress on i686-pc-cygwin.  OK once that
> completes successfully?

Ok.

Thanks,
Richard.

>    cheers,
>      DaveK
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues.
  2010-11-18 12:26           ` Richard Guenther
@ 2010-11-23 22:05             ` Dave Korn
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Korn @ 2010-11-23 22:05 UTC (permalink / raw)
  To: Richard Guenther; +Cc: Joseph S. Myers, GCC Patches

On 18/11/2010 11:54, Richard Guenther wrote:
> On Wed, Nov 17, 2010 at 10:33 PM, Dave Korn <dave.korn.cygwin@gmail.com>
> wrote:
>> On 17/11/2010 10:36, Richard Guenther wrote:
>>> On Tue, Nov 16, 2010 at 8:31 PM, Dave Korn <dave.korn.cygwin@gmail.com>
>>> wrote:
>>>> On 16/11/2010 16:33, Joseph S. Myers wrote:
>>>>> On Tue, 16 Nov 2010, Richard Guenther wrote:
>>>>> 
>>>>>> Are we sure that all -l options are joined ones?  The driver
>>>>>> accepts -l  m just fine.
>>>>> The driver converts -l options to joined form when passing them to 
>>>>> add_infile.  I don't know about the -l options contained directly
>>>>> in specs; that's what would need checking.  (Specs other than those
>>>>> in driver_self_specs do not go through the option processing
>>>>> machinery; they are generating command lines for programs other
>>>>> than the driver.)
>>>>> 
>>>>>> I'm ok with the patch if Joseph thinks it is ok.
>>>>> I have no comments on this patch.
>>>> Right you are.  I'll test the patch with separated -l options and see
>>>> if it works; if not, I'll submit a respin,
>> Herewith the respin.  Same ChangeLog as before; only differences from 
>> previous version are contained to pass_through_libs_spec_func().
>> 
>> LTO-bootstrap and test cycle in progress on i686-pc-cygwin.  OK once that
>>  completes successfully?
> 
> Ok.
> 

Committed revision 167091.

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-11-23 19:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 16:27 [PATCH,lto] Fix PR42690 and related LTO-vs-static-linking issues Dave Korn
2010-11-16 16:49 ` Richard Guenther
2010-11-16 16:52   ` Joseph S. Myers
2010-11-16 19:53     ` Dave Korn
2010-11-17 11:03       ` Richard Guenther
2010-11-17 21:56         ` Dave Korn
2010-11-18 12:26           ` Richard Guenther
2010-11-23 22:05             ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).