#12741: R fails to build with LTO
-----------------------------+----------------------------------------------
       Reporter:  SimonKing  |         Owner:  tbd     
           Type:  defect     |        Status:  new     
       Priority:  major      |     Milestone:  sage-5.0
      Component:  packages   |    Resolution:          
       Keywords:  R LTO      |   Work issues:          
Report Upstream:  N/A        |     Reviewers:          
        Authors:             |     Merged in:          
   Dependencies:             |      Stopgaps:          
-----------------------------+----------------------------------------------

Comment (by leif):

 Replying to [comment:8 SimonKing]:
 > Replying to [comment:7 SimonKing]:
 > > I don't understand: At what point do I need to provide `-fuse-linker-
 plugin`?
 >
 > Sorry, now I recall your comments from #12703, where you say that some
 (not all) packages would need `-fuse-linker-plugin` added to `LDFLAGS` in
 order to work with -lto.

 Explicitly specifying `-fuse-linker-plugin` seems to only be necessary in
 case you updated binutils (or your `ld`, or used some older version during
 the GCC build) after building GCC.

 From the GCC manual:

   `-fuse-linker-plugin`

     Enables the use of a linker plugin during link-time optimization. This
 option relies on the linker plugin support in linker that is available in
 gold or in GNU ld 2.21 or newer.

     This option enables the extraction of object files with GIMPLE
 bytecode out of library archives. This improves the quality of
 optimization by exposing more code to the link-time optimizer. This
 information specifies what symbols can be accessed externally (by non-LTO
 object or during dynamic linking). Resulting code quality improvements on
 binaries (and shared libraries that use hidden visibility) are similar to
 `-fwhole-program`. See `-flto` for a description of the effect of this
 flag and how to use it.

     This option is enabled by default when LTO support in GCC is enabled
 and GCC was configured for use with a linker supporting plugins (GNU ld
 2.21 or newer or gold).

 [[BR]]

 It's IMHO a minor issue anyway.

 [[BR]]

 > However, how problematic is that my ld is slightly too old? Would it
 refuse to work with `-fuse-linker-plugin`?  Will it ignore that flag?

 Nope, GCC will exit with an error ''if you specify `-fuse-linker-plugin`''
 but the present linker doesn't support it.

 [[BR]]

 > I guess Sage shouldn't also add another 60MB or so for a binutils spkg,
 isn't it?

 We need a standard LaTeX / TeXLive package, too. ;-)

 No, seriously, we could of course also offer an ''optional'' binutils
 package, but that's not that important, although the GCC package may
 refuse to build on systems with too incapable versions of the programs
 provided by binutils.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12741#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to