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: Andrew Haley <aph at redhat dot com>
- To: Alex Blekhman <a dot tinsmith at gmail dot com>, gcc-help at gcc dot gnu dot org
- Date: Wed, 18 Mar 2015 11:48:54 +0000
- 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> <loom dot 20150318T115826-290 at post dot gmane dot org> <55096526 dot 2000709 at redhat dot com>
On 03/18/2015 11:44 AM, Andrew Haley wrote:
> On 03/18/2015 11:11 AM, Alex Blekhman wrote:
>> 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.
> If you're not cross-compiling you should never set the target. The
> same for sysroot. GCC has sensible defaults for everything, and
> unless you know exactly what you're doing overriding them is only
> likely to break things.
>> 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.
I am very sorry. I have told you an untruth. I didn't read what you wrote.
Cross-compiling from 32- to 64-bit hosts is notoriously tricky. People
almost always go in the opposite direction. I don't even know if it
can be done.