Fwd: GCC 3.1 linux-to-mingw32 near success but still some questions remain ;-)
Pieter Thysebaert
pieter.thysebaert@intec.rug.ac.be
Sun Jul 14 12:14:00 GMT 2002
---------- Forwarded Message ----------
Subject: GCC 3.1 linux-to-mingw32 near success but still some questions
remain ;-)
Date: Sun, 14 Jul 2002 21:02:22 +0200
From: Pieter Thysebaert <pieter.thysebaert@intec.rug.ac.be>
To: crossgcc@sourceware.cygnus.com
Hello,
First of all, congrats to myself for being able to at least compile
<subject>.
The reason for this post is that I have needed to do some "weird" things (it
seems that way to me) to get it going.
I'm working on debian 2.2 with gcc 2.95.2.
I downloaded binutils-2_12_90-20020518-1-src.tar.gz,
mingw-runtime-2.0.tar.gz, w32api-1.5.tar.gz, gcc-3.1.tar.gz.
1. mkdir build-binutils
cd build-binutils
../binutils-.../configure --prefix=<prefixdir> --target=i686-pc-mingw32
make
-> I got an error here on line 517 of ld/pe-dll.c on the function stricmp(),
so I changed it to strcmp()....; at least now it compiled, but Iguess it's
not supposed to be patched in this way in order to work ?
make install
export PATH=<prefixdir>/bin:$PATH
2. attempt to create bootstrap compiler
mkdir build-gcc
cd build-gcc
../gcc-3.1/configure --prefix=<prefixdir> --target=i686-pc-mingw32
--without-headers --with-newlib --enable-languages=c
-> although I specified --without-headers, this bumps on the first time xgcc
is used looking for target-specific headers, so I untarred
mingw-runtime and w32api into <prefixdir>
3. Redundant attempt to build w32api
mkdir build-w32api
cd build-w32api
../w32api-.../configure --target=i686-pc-mingw32 --prefix=<prefixdir>
make
-> building this requires i686-pc-mingw32-gcc be called gcc (in
<prefixdir>/<target>/bin)
make install failed....so I left it alone
4. rm -rf build-gcc
mkdir build-gcc
cd build-gcc
../gcc-3.1/configure --prefix=<prefixdir> --target=i686-pc-mingw32
--enable-threads --enable-languages=c,c++
make
-> this failed again on xgcc "not being able to create executables". The
problem was that in this step, it could not find header files / object files
that I had untarred in <prefixdir>, so I untarred them a second time in
<prefixdir>/<target>. Is that normal?
make install
I think I've got what I want now...
But
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
cout << "Blabla" << endl;
return 0;
}
Running this through i686-pc-mingw32-g++ -o test.exe test.cc [-mwindows]
gives
/temp/cross-gcc/package/usr/local/i686-pc-mingw32-gcc/lib/gcc-lib/i686-pc-min
gw32/3.1/../../../../i686-pc-mingw32/lib/libstdc++.a(c++locale.o): In
function `ZSt14__convert_to_vIxEvPKcRT_RSt12_Ios_IostateRKPii':
/temp/cross-gcc/build-gcc/i686-pc-mingw32/libstdc++-v3/src/c++locale.cc:90:
undefined reference to `strtoll'
/temp/cross-gcc/package/usr/local/i686-pc-mingw32-gcc/lib/gcc-lib/i686-pc-min
gw32/3.1/../../../../i686-pc-mingw32/lib/libstdc++.a(c++locale.o): In
function `ZSt14__convert_to_vIyEvPKcRT_RSt12_Ios_IostateRKPii':
/temp/cross-gcc/build-gcc/i686-pc-mingw32/libstdc++-v3/src/c++locale.cc:107:
undefined
reference to `strtoull'
So either it is not built correctly, or I missed a cmdline switch (library?)
? Remember that I just untarred the prebuilt w32api and mingw-runtime (which
were probably built for 2.95.3)...Is this the problem
Pieter
-------------------------------------------------------
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list