OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 10:40 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: i686 cross compiler, GCC can't find liblto_plugin.so
PostPosted: Fri Apr 24, 2015 2:16 pm 
Offline

Joined: Fri Apr 24, 2015 2:11 pm
Posts: 1
I was following the cross compiler tutorial, but stopped halfway when I wasn't able to make binutils without getting massive amounts of errors that I am unable to solve. I then downloaded the first toolchain for OS X at the bottom of the page, and decided to use the cross compiler in there for compiling my kernel. However, when I run the new version of GCC (found within the folders of the tool chain) I get the following error:

Code:
gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
compilation terminated.


This happens, even though I have added the folder where the liblto_plugin.so can be found to my PATH and the LD_LIBRARY_PATH. I have the toolchain and kernel source et.c within my Documents folder on my HDD.

How would I go about solving this problem?


Top
 Profile  
 
 Post subject: Re: i686 cross compiler, GCC can't find liblto_plugin.so
PostPosted: Sat Apr 25, 2015 8:56 pm 
Offline

Joined: Mon Jan 20, 2014 7:58 pm
Posts: 13
Hey Sam,
I had the same problem about a year ago and after much research and hair pulling I found a gcc flag that you append to your compilation.

my list of flags are
Code:
CFLAGS=-nostdlib -ffreestanding -nostdinc -g -fno-builtin


I believe it was either the -nostdlib flag or the -fnobuiltin flag that fixed the problem.

I hope I have been of help.

teenHack42

_________________
https://github.com/teenHack42/MatrixOS
Working on: PCI[E]
--
teenHack42


Top
 Profile  
 
 Post subject: Re: i686 cross compiler, GCC can't find liblto_plugin.so
PostPosted: Sun Apr 26, 2015 2:00 am 
Offline
Member
Member

Joined: Mon Apr 09, 2007 12:10 pm
Posts: 775
Location: London, UK
-fno-use-linker-plugin is the official flag to use. I still don't understand why some cross compilers insist on trying to use it though (I think it relates to the gcc version).

Regards,
John.

_________________
Tysos | rpi-boot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 226 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group