This is the mail archive of the
mailing list for the GCC project.
Re: Building GCC 4.9 biarch (i686+x86_64) on Debian 6.0 i686
- From: Alex Blekhman <a dot tinsmith at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 18 Mar 2015 11:11:48 +0000 (UTC)
- Subject: Re: Building GCC 4.9 biarch (i686+x86_64) on Debian 6.0 i686
- Authentication-results: sourceware.org; auth=none
- References: <loom dot 20150318T070327-942 at post dot gmane dot org> <55094572 dot 8000402 at redhat dot com>
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
> > same Debian 6.0 i686 machine. Default compilation target should be
> > 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">
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.
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.