i686 cross compiler, GCC can't find liblto_plugin.so

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
SamTebbs33
Posts: 1
Joined: Fri Apr 24, 2015 2:11 pm
Libera.chat IRC: SamTebbs33

i686 cross compiler, GCC can't find liblto_plugin.so

Post by SamTebbs33 »

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: Select all

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?
teenHack42
Posts: 13
Joined: Mon Jan 20, 2014 7:58 pm

Re: i686 cross compiler, GCC can't find liblto_plugin.so

Post by teenHack42 »

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: Select all

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
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: i686 cross compiler, GCC can't find liblto_plugin.so

Post by jnc100 »

-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.
Post Reply