From: JonY <10walls@gmail.com>
To: Alexandre Oliva <oliva@adacore.com>
Cc: NightStrike <nightstrike@gmail.com>,
"Joseph S. Myers" <joseph@codesourcery.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: introduce --enable-mingw-full32 to default to --large-address-aware
Date: Wed, 07 Nov 2018 12:50:00 -0000 [thread overview]
Message-ID: <5704d23a-37d1-4cc7-c131-7dac969d1635@gmail.com> (raw)
In-Reply-To: <orwopp2smx.fsf@lxoliva.fsfla.org>
[-- Attachment #1.1: Type: text/plain, Size: 2764 bytes --]
On 11/07/2018 08:34 AM, Alexandre Oliva wrote:
> On Nov 1, 2018, JonY wrote:
>
>> Looks like it causes an error on 64bit:
>> /usr/libexec/gcc/x86_64-w64-mingw32/ld: unrecognized option
>> '--large-address-aware'
>
> What does? The patch I suggested? The current trunk?
>
> What was the command in this case? How was the toolchain configured?
>
>
> I've been looking into this, getting progressively puzzled, though I
> actually managed to duplicated the problem you mentioned, but only on
> x86_64-mingw32, NOT on x86_64-w64-mingw32.
>
>
No it's just a quick test to see how x86_64-w64-mingw32 reacts to
--large-address-aware, it doesn't play well.
> Here's what I found out in my investigation:
>
> configured for i686-mingw32, GNU ld supports only the i386pe emulation,
> that supports the --large-address-aware flag.
>
> Configured for x86_64-*-mingw32, it supports i386pe, but it defaults to
> i386pep, the 64-bit binary format, that does NOT support
> --large-address-aware.
>
> x86_64-w64-mingw32 passes -mi386pe or -mi386pep to the linker, depending
> on -m32 or -m64, so the code to pass --large-address-aware to link -m32
> binaries in mingw-w64.h looks correct to me. But x86_64-mingw32 does
> NOT use that: it uses the LINK_SPEC from mingw32.h, so it doesn't
> specify the emulation, ever. That seems awfully broken to me. If you
> ask for a 32-bit binary, using the default 64-bit linker format is
> unlikely to produce the desired results.
>
> Is x86_64-mingw32 really supposed to be a usable target name? It might
> even work as a 64-bit only target, but I don't see how its biarch
> support could possibly be functional.
>
> If it is to be usable, is it really supposed to be different from
> x86_64-w64-mingw32? Using mingw-w64.h besides mingw32.h would fix the
> biarch problems, but perhaps that's not desired for other reasons.
>
> Fixing that is way beyond my knowledge or interest on Windows-based
> platforms, but given clarification as to whether x86_64-mingw32 is
> supposed to support biarch at all, I might be able to fix the
> implementation of --enable-large-address-aware there.
>
> As for the problem you reported on x86_64-w64-mingw32, I'm afraid I'll
> need some more information to be able to duplicate that and try to fix
> it.
>
> Thanks,
>
x86_64-mingw32 is not used as far as I know, only with "w64" or "pc".
The "w64" carries a special meaning to gcc dating back to the early
64bit port. It basically tells gcc to use mingw-w64 specific features
that are not found on the regular mingw.org CRT at the time.
This might be affecting the "pc" vendor build, can you check
x86_64-pc-mingw32 just to see if it is affected?
Thanks.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-11-07 12:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 6:48 Alexandre Oliva
2018-10-05 16:40 ` Joseph Myers
2018-10-09 6:38 ` Alexandre Oliva
2018-10-09 11:31 ` JonY
2018-10-10 4:58 ` Alexandre Oliva
2018-10-10 5:20 ` JonY
2018-10-10 8:00 ` Alexandre Oliva
2018-10-11 0:18 ` JonY
2018-10-11 7:46 ` NightStrike
2018-10-11 11:32 ` JonY
2018-10-12 6:28 ` Alexandre Oliva
2018-10-12 11:27 ` JonY
[not found] ` <ork1lxspuw.fsf@lxoliva.fsfla.org>
2018-11-01 10:48 ` JonY
2018-11-07 11:59 ` Alexandre Oliva
2018-11-07 12:50 ` JonY [this message]
2018-11-08 9:45 ` Alexandre Oliva
2018-11-08 15:39 ` JonY
2018-11-09 10:49 ` Alexandre Oliva
2018-11-09 12:22 ` JonY
2018-10-07 8:03 ` JonY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5704d23a-37d1-4cc7-c131-7dac969d1635@gmail.com \
--to=10walls@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=nightstrike@gmail.com \
--cc=oliva@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).