This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building GCC 4.9 biarch (i686+x86_64) on Debian 6.0 i686


Andrew Haley writes:
> On 18/03/15 06:37, Alex Blekhman wrote:
> > My goal is to be able to compile both i686 and x86_64 binaries on 
the 
> > same Debian 6.0 i686 machine. Default compilation target should be 
i686, 
> > and x86_64 should be available via switch -m64.
> 
> That's the usual default.

Thank you for answering. Are you saying that if I just compile GCC with 
all default settings, then it will be capable of 
building x86_64 binaries out of the box? I think I have to specify 
x86_64 as an additional target somewhere.

> Do you really want i686-elf?

I'm not sure which target name to use. I've never built GCC before, so 
I'm trying to make sense out of parameters. `uname' 
reports that the system is "i686 GNU/Linux", so I thought that "i686-
elf" would be the most generic target I can specify.

> Are you cross-compiling?

Well, strictly speaking it seems like cross-compiling. However, GCC docs 
call it "bi-arch":

<from "Installing GCC: Configuration">
--enable-targets=target_list
Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers. These 
are compilers that are able to generate either 64-bit 
or 32-bit code. Typically, the corresponding 32-bit target, e.g. 
powerpc-linux for powerpc64-linux, only generates 32-bit 
code. This option enables the 32-bit target to be a bi-arch compiler, 
which is useful when you want a bi-arch compiler that 
defaults to 32-bit, and you are building a bi-arch or multi-arch 
binutils in a combined tree. On mips-linux, this will build a 
tri-arch compiler (ABI o32/n32/64), defaulted to o32. Currently, this 
option only affects sparc-linux, powerpc-linux, x86-
linux, mips-linux and s390-linux.
</end>

All I want to do is to have 32-bit compiler (and linker, of course), 
which is able to produce both 32- and 64-bit binaries.

Thanks
Alex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]