Question about Cross-Compiler Build Wiki Tutorial
-
- Posts: 3
- Joined: Tue Nov 11, 2008 11:17 am
Question about Cross-Compiler Build Wiki Tutorial
I am going through the tutorials and now I am rebuilding binutils and gcc with the correct target platform. The only problem I am having is that the TARGET variable is set to "i586-elf". I assume this gets set in the configure file in the binutils folder, but what I want to know is can it be anything other than *5*86? What are the options available to me here? Thanks!
-
- Posts: 3
- Joined: Tue Nov 11, 2008 11:17 am
Re: Question about Cross-Compiler Build Wiki Tutorial
Hmmm... I found how to list the supported Architectures (objdump -i), but it only lists: pe-i386, pei-i386, elf32-little, elf32-big. Not only does this not include the value in the tutorial, but it doesn't show x86_64... Please help.
- Combuster
- 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:
Re: Question about Cross-Compiler Build Wiki Tutorial
For the compiler, 64-bit mode is a different thing compared to 32-bit mode. It is larger, has more registers, and more prefixes to deal with. And when you have a 32-bit processor (i586) 64-bit code doesn't run on it, hence it doesn't get compiled.
Hence you should build a 64 bit compiler as per GCC Cross-Compiler for x86_64 if you want to support that too.
If you're looking for a list of configurations, look at the gcc/config.gcc file that comes with GCC
Hence you should build a 64 bit compiler as per GCC Cross-Compiler for x86_64 if you want to support that too.
If you're looking for a list of configurations, look at the gcc/config.gcc file that comes with GCC
-
- Posts: 3
- Joined: Tue Nov 11, 2008 11:17 am
Re: Question about Cross-Compiler Build Wiki Tutorial
Alright, this helps very much. Thanks!
Re: Question about Cross-Compiler Build Wiki Tutorial
Hi,
I have just made an edit to that wiki page. Since GCC 4.3.2, I have had no problems building x86_64-elf out of the box (it may have been present for 4.3.1 as well), so have a go at the GCC Cross-Compiler tutorial first, simply substituting the build target.
Cheers,
Adam
I have just made an edit to that wiki page. Since GCC 4.3.2, I have had no problems building x86_64-elf out of the box (it may have been present for 4.3.1 as well), so have a go at the GCC Cross-Compiler tutorial first, simply substituting the build target.
Cheers,
Adam