From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76729 invoked by alias); 9 Nov 2018 10:49:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 76710 invoked by uid 89); 9 Nov 2018 10:49:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*joseph X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 10:49:08 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 3B14156163; Fri, 9 Nov 2018 05:49:07 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 90UnUABP10D5; Fri, 9 Nov 2018 05:49:07 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id C85AC56162; Fri, 9 Nov 2018 05:49:06 -0500 (EST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTP id wA9AmvDB278470; Fri, 9 Nov 2018 08:48:58 -0200 From: Alexandre Oliva To: JonY <10walls@gmail.com> Cc: NightStrike , "Joseph S. Myers" , GCC Patches Subject: Re: introduce --enable-mingw-full32 to default to --large-address-aware References: <18c16bb7-c54f-f086-0e90-f06345be10d8@gmail.com> <5ba2e87d-b49e-195d-8fbb-62e992c681c1@gmail.com> <9893706a-37ac-8290-bb7b-1cf2f562ed77@gmail.com> <5704d23a-37d1-4cc7-c131-7dac969d1635@gmail.com> <7ea736bc-a259-cfd1-3e5a-b8da6fc5201b@gmail.com> Date: Fri, 09 Nov 2018 10:49:00 -0000 In-Reply-To: <7ea736bc-a259-cfd1-3e5a-b8da6fc5201b@gmail.com> (JonY's message of "Thu, 8 Nov 2018 15:39:11 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-11/txt/msg00695.txt.bz2 On Nov 8, 2018, JonY <10walls@gmail.com> wrote: > No, no. By quick I just mean using -Wl,--large-address-aware on an > existing gcc install, nothing complex. Sorry about not making it clear. Ah, good! > I now understand the problem, thanks for the clarification about the > patch. Patch is OK. Thanks, here's what I'm installing (with comments indicating which configuration each setting applies to, and why one of them won't work) large-addr-aware for biarch non-w64 mingw32 for gcc/ChangeLog * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust for non-w64 x86_64 biarch. --- gcc/config/i386/mingw32.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index c9d8a7a31f30..5759d8d16aef 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -114,11 +114,26 @@ along with GCC; see the file COPYING3. If not see #define SUBTARGET_EXTRA_SPECS \ { "shared_libgcc_undefs", SHARED_LIBGCC_UNDEFS_SPEC } =20 -#if MINGW_DEFAULT_LARGE_ADDR_AWARE +#if ! MINGW_DEFAULT_LARGE_ADDR_AWARE +/* This is used without --enable-large-address-aware. */ +# define LINK_SPEC_LARGE_ADDR_AWARE "" +#elif ! TARGET_BI_ARCH +/* This is used on i686-pc-mingw32 with --enable-large-address-aware. */ # define LINK_SPEC_LARGE_ADDR_AWARE \ "%{!shared:%{!mdll:--large-address-aware}}" +#elif TARGET_64BIT_DEFAULT +/* This is used on x86_64-pc-mingw32 with --enable-large-address-aware. + ??? It probably doesn't work, because the linker emulation defaults + to i386pep, the 64-bit mode that does not support + --large-address-aware, and x86_64-pc-mingw32 does not override the + emulation to i386pe for -m32, unlike x86_64-w64-mingw32. */ +# define LINK_SPEC_LARGE_ADDR_AWARE \ + "%{!shared:%{!mdll:%{m32:--large-address-aware}}}" #else -# define LINK_SPEC_LARGE_ADDR_AWARE "" +/* This would only be used if someone introduced a biarch + configuration that defaulted to 32-bit. */ +# define LINK_SPEC_LARGE_ADDR_AWARE \ + "%{!shared:%{!mdll:%{!m64:--large-address-aware}}}" #endif =20 #define LINK_SPEC "%{mwindows:--subsystem windows} \ --=20 Alexandre Oliva, freedom fighter https://FSFLA.org/blogs/lxo Be the change, be Free! FSF Latin America board member GNU Toolchain Engineer Free Software Evangelist Hay que enGNUrecerse, pero sin perder la terGNUra jam=C3=A1s-GNUChe