GCC 4.7.2 Cross compiler problems

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
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

GCC 4.7.2 Cross compiler problems

Post by Nessphoro »

Hey guys,

Just decided to recompile my old GCC to a new version (4.7.2) and I've got some issues.
After following the tutorial the tutorial I've successively got the binaries in a folder (I'm using cygwin)

Now the problem is that when I try to compile a file I get this error

"error while loading shared libraries: ?: cannot open shared object file: No such file or directory"

GCC 3.x.x worked fine.

Any points on how to fix this? I even tried configuring with --disable-shared.
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

Re: GCC 4.7.2 Cross compiler problems

Post by Nessphoro »

Another interesting point:
When I try to do this:

Code: Select all

/cygdrive/c/gcc/bin/i586-elf-g++ -o obj/ACPI.o source/ACPI.cpp  -Wall -Wextra  -nostdlib -fno-builtin -nostartfiles -nodefaultlibs -fno-exceptions -fno-rtti -fno-stack-protector -O3 -fleading-underscore -c -ggdb -fpermissive -I source/
Everything works perfectly, but when that line is called from a makefile, it crumbles and produces this:

Code: Select all

/cygdrive/c/gcc/bin/i586-elf-g++.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
Post Reply