• C

LTO with fuse-linker-plugin

Hi all*,

Having some problems with the LTO in GCC 4.5. I've two questions, so split them into different questions.

If I try to compile my program with -fuse-linker-plugin I get
'unrecognized option -plugin'

Any suggestions?

I configured GCC with  '--enable-lto --enable-gold'.

Compiling with just -flto works fine.

Many thanks,
Who is Participating?
JIEXAConnect With a Mentor Commented:
Check that the linker (binutils) are of appropriate version and configured/built with appropriate flags. Probably, the plugin for the linker is disabled.
James_h1023Author Commented:
Thanks for a quick reply.

Very likely!

I'm trying to compile binutils
CC=gcc ./configure --enable-gold --enable-plugins
as suggested by the documentation as I have several versions of gcc installed.

However I get

In file included from expression.cc:33:0:
script-c.h:207:7: warning :'yylex' intialised and declared 'extern'
script-c.h:207:7: error: 'YYSTYPE' was not declared in this scope
script-c.h:207:15: error: expected primary-expression before ',' token
script-c.h:207:17: error: expected primary-expression before 'void'
script-c.h:207:30: error: intializer expression list treated as compound expression

I tried to find script-c.h to perhaps correct the problem, however can't anywhere!

Any suggestions?
James_h1023Author Commented:
apologies, the error comes during 'sudo make' ./configure, completes wih no errors
James_h1023Author Commented:
Solved it, need the package 'bison' as well!

Many thanks for your help,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.