On 10/05/2018 02:18 AM, Alexandre Oliva wrote:
> Add a configure knob for mingw32 and 64 toolchains to default passing
> --large-address-aware to the linker, when creating 32-bit binaries.
> -Wl,--disable-large-address-aware can still reverse its effects.
> 
> I've tested this with cross i686-pc-mingw32-gcc and
> x86_64-w64-mingw64-gcc (is this the usual triplet name?), observing the
> flags passed by gcc to the linker when asked to create an executable
> program or a dynamic library, in 32- or, with the latter compiler, in
> 64-bit mode.
> 
> 
> I wonder if it makes any sense to extend/rename the configure flag to
> apply to cygwin as well, though it should default to enabled for that
> platform.
> 
> I also wonder if it makes sense, at this point, for mingw to default to
> --large-address-aware (I guess not, but it doesn't hurt to ask, does it?
> :-)
> 
> Yet another idea that comes to mind is to introduce gcc flags, say
> -m32full and -m31, to imply -m32 and also pass either
> --large-address-aware or --disable-large-address-aware, respectively, to
> the linker.
> 
> I suppose it might also make sense to approach this issue from the
> linker, rather than from GCC, enabling its default to be configured.
> Would that be preferred?  I thought tweaking GCC would be better, for
> the flag would be visible with -v, both the one passed to the linker and
> the one passed to GCC configure.  It wouldn't be quite as visible as a
> linker configuration knob.
> 
> 
> Given all this, is this patch below ok to install, or should I make
> changes.  I've included the configure and config.in changes because
> they're small enough.
> 
> Below this first patch, I enclose another patch for cygming.h.
> 

They're both OK as far as I can see. I just don't like the configure
name implying all 32bit pointers are used by userspace. Perhaps just
--enable-large-address-aware?

Be sure to also update the documentation as Joseph says.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to