Cross Compiler - Can't build gcc

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
sjele
Posts: 2
Joined: Tue Apr 15, 2014 9:32 am

Cross Compiler - Can't build gcc

Post by sjele »

Hello,
I'm about to build the cross compiler. I followed the tutorial on this site.
I've already built the binutils.
But if I want to build gcc, an error occurs.
After the command 'make all-gcc' it says:
...
configure: former value: 'i686-elf'
configure: current value: 'x86_64-unknown-linux-gnu'
configure: error: in '/home/samuel/src/build-gcc/fixincludes':
configure: error: changes in the environment can compromise the build
configure: error: run 'make distclean' and/or 'rm ./config.cache and start over
make: *** [configure-fixincludes] Error 1

I've already done the 'make-distclean' command. But if i try it again, the same errors occur.

Im trying to solve this problem for 5 hours, but I can't find the problem.
But I wondered about a few things during the preperation:
1. I don't have a src folder in my homedirectory... So I created it manualy. Is that OK?
2. I don't have a gmp directory in the gcc diretory. Is that normal? I created it manualy, too.

PS: sorry for my bad english :P
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Cross Compiler - Can't build gcc

Post by iansjack »

Just delete the entire build directory (you are building in a directory separate from the source, aren't you?) and start over.
sjele
Posts: 2
Joined: Tue Apr 15, 2014 9:32 am

Re: Cross Compiler - Can't build gcc

Post by sjele »

Should I delete the build-gcc?

Yea I think so. The sourcecode I've downloaded is in /home/src/gcc-x.y.z and I've got an other directory called /home/src/build-gcc.
But why do I need the /home/opt/cross
directory?

I try to delete the build-gcc directory and try it again.

Thanks!
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Cross Compiler - Can't build gcc

Post by iansjack »

Yes, delete the the contents of the build-gcc directory and start again. the .../opt/cross directory is (I assume) where you are going to install the finished product.
User avatar
hometue
Member
Member
Posts: 100
Joined: Thu Dec 19, 2013 1:40 am
Location: Asia, Singapore

Re: Cross Compiler - Can't build gcc

Post by hometue »

Just wondering, where did you get the source for gcc?
CookieOS. Want a cookie? Its only black and white for now though, probably as bad as my baking skills.
Post Reply