Re: mingw cross compilation

Thomas Stover <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Date: Fri, 9 Jan 2009 12:05:44 +0100
> From: "Frediano Ziglio" <[email protected]>
> Subject: Re: [freetds] mingw cross compilation
> To: "FreeTDS Development Group" <[email protected]>
>
> 2009/1/8 Thomas Stover <[email protected]>:
>   
>> Anyone ever figure out how to target win32 from a linux host via mingw?
>> I found a few comments in the archives, but it seems I missed allot or
>> something. Better yet, how about targeting win64?
>>     
>
> Either win32 and win64 compile and works (tested win32). Just use
> --host options during configure.
>
> freddy77
>   

Awesome! I'm still looking for that magic touch though. Autoconf is 
always a nebulous area of pain for me...


$CC=/opt/crosscompilers/win32/bin/i686-mingw32-gcc ./configure --host win32
...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... Invalid configuration `win32': machine 
`win32' not recognized
configure: error: /bin/bash ./config.sub win32 failed


$CC=/opt/crosscompilers/win32/bin/i686-mingw32-gcc ./configure --host 
i686-mingw32
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
...
configure: error: No 16-bit int found.


$CC=/opt/crosscompilers/win32/bin/i686-mingw32-gcc ./configure --build 
i686-mingw32
...
configure: error: No 16-bit int found.


Win64 is looking much smoother however...

$make clean
$CC=/opt/crosscompilers/win64/bin/x86_64-pc-mingw32-gcc ./configure 
--host=x86_64-pc-mingw32 
--prefix=/opt/crosscompilers/win64/x86_64-pc-mingw32/ --disable-server 
--enable-msdblib 
--includedir=/opt/crosscompilers/win64/x86_64-pc-mingw32/include/freetds
$make
...
no -i ../../win32/setup.rc --input-format=rc -o ../../win32/setup.res -O 
coff
/bin/bash: no: command not found

Any insights? I've been looking for some program called 'no', but that's 
a hard word to search for :)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.