This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcj crosscompiler
- From: Taras <taras dot judge at shaw dot ca>
- To: java at gcc dot gnu dot org
- Date: Sat, 26 Jul 2003 16:32:42 -0700
- Subject: gcj crosscompiler
Please excuse the first message, I accidently hit the wrong shortcut.
Hi,
I've sortof-successfully used Mohan's gcj 3.4 stuff to build my app on
windows. It builds, but strangely doesn't run on the machine that builds it
:)
Oh well, run's well everywhere else.
So I've been trying to setup my own crosscompiler. I used Mohan's
hints/patches to compile the latest gcc cvs.
I used the following command.
echo $TARGET $BUILD
mingw32 i686-pc-linux-gnu
$GCC_SRC_DIR/configure --disable-shared --enable-libgcj --prefix=$PREFIX
--build=$BUILD --host=$HOST --target=$TARGET --disable-nls
--disable-shared --disable-debug --enable-threads=win32 --with-gcc
--with-gnu-as --with-gnu-ld ; make BOOT_CFLAGS='-O2 -pipe -g0'
CFLAGS='-O2 -pipe -g0' CXXFLAGS='-O2 -pipe -g0' LIBCFLAGS='-O2 -pipe -g0'
LIBCXXFLAGS='-O2 -pipe -g0 -fno-implicit-templates' DEBUG_FLAGS='-g0'
LIBGCC2_DEBUG_CFLAGS='-g0' JCFLAGS='-pipe -g0' GCJFLAGS='-O2 -pipe -g0'
LIBGCJ_CFLAGS='-O2 -pipe -g0' LIBGCJ_CXXFLAGS='-O2 -pipe -g0
-fno-implicit-templates' LDFLAGS='-s' -j2
I used
binutils-2.11.90-20010915
Here is my problem. I can't get the linker to work.
mingw32-gcj --classpath=lib/swt.jar *.o -o irate-client.exe
/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4/../../../../mingw32/bin/ld:
cannot find -lpthread
When I run this command with -v, I get
Configured with: /home/taras/work/cvs/gcc/configure --enable-libgcj
--prefix=/home/taras/work/win32/gcc-win32 --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=mingw32 --disable-nls --disable-shared
--disable-debug --enable-threads=win32 --with-gcc --with-gnu-as --with-gnu-ld
: (reconfigured) /home/taras/work/cvs/gcc/configure --disable-shared
--enable-libgcj --prefix=/home/taras/work/win32/gcc-win32
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=mingw32
--disable-nls --disable-shared --disable-debug --enable-threads=win32
--with-gcc --with-gnu-as --with-gnu-ld : (reconfigured)
/home/taras/work/cvs/gcc/configure --disable-shared --enable-libgcj
--prefix=/home/taras/work/win32/gcc-win32 --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=mingw32 --disable-nls --disable-shared
--disable-debug --enable-threads=win32 --with-gcc --with-gnu-as --with-gnu-ld
: (reconfigured) /home/taras/work/cvs/gcc/configure --enable-libgcj
--prefix=/home/taras/work/win32/gcc-win32 --build=i686-pc-linux-gnu
--host=i686-pc-linux-gnu --target=mingw32 --disable-nls --disable-shared
--disable-debug --enable-threads=win32 --with-gcc --with-gnu-as --with-gnu-ld
Thread model: win32
gcc version 3.4 20030726 (experimental)
/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4/../../../../mingw32/bin/ld
-Bdynamic -o irate-client.exe
/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4/../../../../mingw32/lib/crt2.o
-L/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4
-L/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4/../../../../mingw32/lib
irate-client.o irate-common.o irate-download.o irate-swt.o -lmingw32 -lgcc
-lmoldname -lmingwex -lmsvcrt -lgcj -lm -lpthread -lz -ldl -lmingw32 -lgcc
-lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32
-lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt
/home/taras/work/win32/gcc-win32/lib/gcc-lib/mingw32/3.4/../../../../mingw32/bin/ld:
cannot find -lpthread
Any idea on what's going wrong?
Thanks,
Taras