[Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-24 Thread Spork Schivago
Hi.

Is it possible to cross-compiling using pre-compiled binaries of mingw-w64?
  I'm running Windows 7, 64-bit, and I'd like to be able to install the
compiler and make either 32-bit only applications or to make 64-bit
applications.Currently, the only way I found to do this is to install
two versions of MinGW-w64.   The first one I pick for target x86_64, the
second one I pick the i686 one.

For example, I'd like to install the x86_64 targetted version and then pas
-m32 -march=i686 -mtune=i686   as CFLAGS   and as LDFLAGS.   Is this
possible?

Thanks
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-25 Thread Alexandre Pereira Nunes
See tdm-gcc, it works like that.

On Mon, Aug 24, 2015 at 7:05 PM, Spork Schivago 
wrote:

> Hi.
>
> Is it possible to cross-compiling using pre-compiled binaries of
> mingw-w64?   I'm running Windows 7, 64-bit, and I'd like to be able to
> install the compiler and make either 32-bit only applications or to make
> 64-bit applications.Currently, the only way I found to do this is to
> install two versions of MinGW-w64.   The first one I pick for target
> x86_64, the second one I pick the i686 one.
>
> For example, I'd like to install the x86_64 targetted version and then pas
> -m32 -march=i686 -mtune=i686   as CFLAGS   and as LDFLAGS.   Is this
> possible?
>
> Thanks
>
>
> --
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-25 Thread Gisle Vanem
Alexandre Pereira Nunes wrote:

> See tdm-gcc, it works like that.

I know (that's why I love TDM-gcc). But according to my:
  f:\MingW32\MingW-w64\bin\gcc.exe -v --help

MingW-w64 could do that too:
  -m32 Generate 32bit i386 code
  -m64 Generate 64bit x86-64 code

I was under the impression that:
   f:\MingW32\MingW-w64\bin\gcc.exe

was just a driver for the right gcc.exe.
True or false?

-- 
--gv

--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-25 Thread niXman
Alexandre Pereira Nunes 2015-08-25 15:31:
> See tdm-gcc, it works like that.

MinGW-W64 builds[1] with SjLj exceptions is also works like that.

[1] 
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download

--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-25 Thread Ray Donnelly
On Tue, Aug 25, 2015 at 1:53 PM, Gisle Vanem  wrote:
> Alexandre Pereira Nunes wrote:
>
>> See tdm-gcc, it works like that.
>
> I know (that's why I love TDM-gcc). But according to my:
>   f:\MingW32\MingW-w64\bin\gcc.exe -v --help
>
> MingW-w64 could do that too:
>   -m32 Generate 32bit i386 code
>   -m64 Generate 64bit x86-64 code
>
> I was under the impression that:
>f:\MingW32\MingW-w64\bin\gcc.exe
>
> was just a driver for the right gcc.exe.
> True or false?

False. Back when Apple used GCC they had such a wrapper to two
distinct GCC builds.

There's a good reason not to use -m32 and -m64. You want to use SEH
for Win64 since it's fastest but you can only use sjlj or dwarf2
exceptions for Win32. Making a 'multilib' MinGW-w64 GCC forces the
same exception model on both.

>
> --
> --gv
>
> --
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-08-25 Thread Spork Schivago
Ahh, that's a good point.   So does that mean I shouldn't be trying to
cross-compile like that?   (By cross-compile, I mean on the same OS, create
binaries for that os, just a different architecture.   Like using the
32-bit compiler to create 64-bit exe's and vice-versa)

Is the best way to do this, if I really need 32-bit binaries and 64-bit
binaries, just to install a 32-bit version and a 64-bit version of MinGW?
I noticed the 32-bit version can create 64-bit executables.

On Tue, Aug 25, 2015 at 8:59 AM, Ray Donnelly 
wrote:

> On Tue, Aug 25, 2015 at 1:53 PM, Gisle Vanem  wrote:
> > Alexandre Pereira Nunes wrote:
> >
> >> See tdm-gcc, it works like that.
> >
> > I know (that's why I love TDM-gcc). But according to my:
> >   f:\MingW32\MingW-w64\bin\gcc.exe -v --help
> >
> > MingW-w64 could do that too:
> >   -m32 Generate 32bit i386 code
> >   -m64 Generate 64bit x86-64 code
> >
> > I was under the impression that:
> >f:\MingW32\MingW-w64\bin\gcc.exe
> >
> > was just a driver for the right gcc.exe.
> > True or false?
>
> False. Back when Apple used GCC they had such a wrapper to two
> distinct GCC builds.
>
> There's a good reason not to use -m32 and -m64. You want to use SEH
> for Win64 since it's fastest but you can only use sjlj or dwarf2
> exceptions for Win32. Making a 'multilib' MinGW-w64 GCC forces the
> same exception model on both.
>
> >
> > --
> > --gv
> >
> >
> --
> > ___
> > Mingw-w64-public mailing list
> > Mingw-w64-public@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
> --
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Cross-compiling with MinGW-w64

2015-09-09 Thread Alexandre Pereira Nunes
On Tue, Aug 25, 2015 at 9:59 AM, Ray Donnelly 
wrote:

> On Tue, Aug 25, 2015 at 1:53 PM, Gisle Vanem  wrote:
> > I was under the impression that:
> >f:\MingW32\MingW-w64\bin\gcc.exe
> >
> > was just a driver for the right gcc.exe.
> > True or false?
>
> False. Back when Apple used GCC they had such a wrapper to two
> distinct GCC builds.
>
> There's a good reason not to use -m32 and -m64. You want to use SEH
> for Win64 since it's fastest but you can only use sjlj or dwarf2
> exceptions for Win32. Making a 'multilib' MinGW-w64 GCC forces the
> same exception model on both.
>
>
the 64-bit tdm-gcc has SEH with -m64 and sjlj with -m32 on the same
multilib toolchain. Perhaps it patches gcc/binutils/whatever, but it should
be trivial to port the behavior to a custom build.
--
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public