x86-64 Cross GCC compiler build error

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
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

x86-64 Cross GCC compiler build error

Post by hendric »

While Configure gcc with --disable-nls --without-headers --target=x86_64-pc-linux-gnu There used to be an error : crti.o Not FOUND.
Is there anyone who knows how to solve it?Any help is appreciated.
Just Lazy Writing Anything...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

From the wiki:
Creating a cross-compiler to a different CPU is harder than just targeting a different binary format. To add insult to injury, x86_64 is a special case since it does not support a plain ELF target (yet?). Binutils works fine, but GCC causes problems when trying to build it as --target=x86_64-elf, so we have to trick our way around it.
I suggest you read the rest.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

Thanks for your kind reply, I'll have a try.

But I remeber before I reinstalled My Linux I 've ever built the x86_64 gcc successfully But I did not know what happended now

Anyway, Thank you
Just Lazy Writing Anything...
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Post by Candy »

There's a bit of the manual there that says you either need to apply a patch or ignore the errors. The patch is the cleaner way. There's a script to set them up on my SVN server (http://www.sf.net/projects/atlantisos) under the "cross" directory. It also adds a few features from c++0x, which you might not prefer. You can still use the script and the patch.
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

I've tried a lot but it said that x86_64-pc-elf DOES NOT support cause me so crazy....
Just Lazy Writing Anything...
hendric
Member
Member
Posts: 38
Joined: Sat Oct 21, 2006 10:56 am
Location: China

Post by hendric »

It's been solved after my trying again and again . But still don't I know why...Sigh
Just Lazy Writing Anything...
Post Reply