Re: [SOLVED] Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2020-01-03 Thread Niels Möller
Claude Heiland-Allen writes: > CC_FOR_BUILD is necessary otherwise the configure fails because it > uses the wrong build system compiler: [...] > checking build system compiler x86_64-w64-mingw32-gcc... yes Ah, candidates are for i in "$CC" "$CC $CFLAGS $CPPFLAGS" cc gcc c89 c99; do (from ac

Re: [SOLVED] Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2020-01-03 Thread Claude Heiland-Allen
Hi, On 03/01/2020 12:15, Niels Möller wrote: Claude Heiland-Allen writes: Aha, thanks for this tip, I found an incantation that works: ``` CC=x86_64-w64-mingw32-gcc \ CC_FOR_BUILD=x86_64-linux-gnu-gcc \ CPPFLAGS=-D__USE_MINGW_ANSI_STDIO \ LDFLAGS="-static-libgcc -static-libstdc++" \ ./config

[SOLVED] Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2020-01-03 Thread Claude Heiland-Allen
Hi, On 29/12/2019 19:25, Niels Möller wrote: Claude Heiland-Allen writes: However trying the method suggested in the documentation also fails, but in a different way: ``` CC_FOR_BUILD="gcc" \ CPP_FOR_BUILD="gcc -E" \ CFLAGS="-march=native -O3 -fomit-frame-pointer" \ CXXFLAGS="-march=native -

Re: [SOLVED] Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2020-01-03 Thread Niels Möller
Claude Heiland-Allen writes: > Aha, thanks for this tip, I found an incantation that works: > > ``` > CC=x86_64-w64-mingw32-gcc \ > CC_FOR_BUILD=x86_64-linux-gnu-gcc \ > CPPFLAGS=-D__USE_MINGW_ANSI_STDIO \ > LDFLAGS="-static-libgcc -static-libstdc++" \ > ./configure \ >   --build=x86_64-linux-gnu

Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-29 Thread Niels Möller
Claude Heiland-Allen writes: > However trying the method suggested in the documentation also fails, > but in a different way: > > ``` > CC_FOR_BUILD="gcc" \ > CPP_FOR_BUILD="gcc -E" \ > CFLAGS="-march=native -O3 -fomit-frame-pointer" \ > CXXFLAGS="-march=native -O3 -fomit-frame-pointer" \ > LDFLA

Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-29 Thread Claude Heiland-Allen
Hi, On 29/12/2019 00:43, Torbjörn Granlund wrote: Claude Heiland-Allen writes: Notice it uses compiler `gcc` instead of `x86_64-w64-mingw32-gcc`, which leads to a build for Linux, not Windows. Well, you explicitly tell it to use "gcc" which might be why it uses "gcc". This does work fi

Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-28 Thread Torbjörn Granlund
Claude Heiland-Allen writes: Notice it uses compiler `gcc` instead of `x86_64-w64-mingw32-gcc`, which leads to a build for Linux, not Windows. Well, you explicitly tell it to use "gcc" which might be why it uses "gcc". Thanks for any advice, Advice: 1. Please read the GMP documentation.

Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-28 Thread Claude Heiland-Allen
Hi, On 28/12/2019 23:52, Marc Glisse wrote: On Sat, 28 Dec 2019, Claude Heiland-Allen wrote: I use Linux.  I have a program (that uses GMP via MPFR) that I cross-compile for Windows and run in Wine. I would like to test the new zen-specific optimizations on my AMD Ryzen 7 2700X CPU, but I c

Re: setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-28 Thread Marc Glisse
On Sat, 28 Dec 2019, Claude Heiland-Allen wrote: I use Linux.  I have a program (that uses GMP via MPFR) that I cross-compile for Windows and run in Wine. I would like to test the new zen-specific optimizations on my AMD Ryzen 7 2700X CPU, but I can't seem to get it to work: ``` hg clone ht

setting CPU_TYPE when cross-compiling from Linux to Windows

2019-12-28 Thread Claude Heiland-Allen
Hi, I use Linux.  I have a program (that uses GMP via MPFR) that I cross-compile for Windows and run in Wine. I would like to test the new zen-specific optimizations on my AMD Ryzen 7 2700X CPU, but I can't seem to get it to work: ``` hg clone https://gmplib.org/repo/gmp/ cd gmp ./.bootstra