Solved

LTO with fuse-linker-plugin

Posted on 2010-09-09
4
1,496 Views
Last Modified: 2012-05-10
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,
James
0
Comment
Question by:James_h1023
  • 3
4 Comments
 
LVL 8

Accepted Solution

by:
JIEXA earned 250 total points
ID: 33635316
Check that the linker (binutils) are of appropriate version and configured/built with appropriate flags. Probably, the plugin for the linker is disabled.
0
 
LVL 4

Author Comment

by:James_h1023
ID: 33635722
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?
0
 
LVL 4

Author Comment

by:James_h1023
ID: 33635736
apologies, the error comes during 'sudo make' ./configure, completes wih no errors
0
 
LVL 4

Author Comment

by:James_h1023
ID: 33644487
Solved it, need the package 'bison' as well!

Many thanks for your help,
James
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now