|
From: SONE T. <ts...@ts...> - 2000-11-28 18:11:29
|
On Tue, Nov 28, 2000 at 09:39:53AM -0500, Edmund Ng wrote:
> SONE Takeshi wrote:
> > On Mon, Nov 27, 2000 at 05:33:35PM -0500, Edmund Ng wrote:
> > > I should mention that the cross compiler for one reason or another
> > > doesn't accept the --shared option. (I'm using the latest version
> > > 2.95.2 of GCC)
> > I am successfully cross-building DLLs on Linux using "-shared" option.
> > My cross-tools are built from Mumit Khan's snapshot gcc and binutils
> > source.
> I had used version binutils 2.10.1 to build my binary sources... would that
> have cause the error? However, my cross linker does accept the --shared
> option.
The option is "-shared" to gcc.
Here is excerpt from my Makefile:
TARGET = $(BASE).dll
IMPLIB = lib$(BASE).a
CROSS = i386-mingw32-
CC = $(CROSS)gcc
LD = $(CC)
DLDFLAGS = -shared -mwindows -Wl,--out-implib=$(DBINDIR)/$(IMPLIB),--image-base,
0x68000000
$(DBINDIR)/$(TARGET) $(DBINDIR)/$(IMPLIB): $(DOBJS) $(DBINDIR)
$(LD) $(DLDFLAGS) -o $(DBINDIR)/$(TARGET) $(DOBJS)
I have never tried binutils >=2.10 for cross toolchain.
I heard that version is not yet stable for Win32 target, so I stuck
with Mumit's last version.
I believe Paul Sokolovsky and guys at RedHat are working on it.
> I have applied the patch to the code but I had one file that was non
> existent that worried me at the time but did not seem to affect the
> compilation.
>
> gcc-2.95.2/gcc/gthr-win32.h
>
> I"m not sure if the problems I'm having could be related to it. Does anyone
> perchance know what this file does and where I can get it (if I need it).
That file is part of the patch.
In gcc-2.95.2-1-x86-win32.diff.gz:
> Index: gcc-2.95.2/gcc/gthr-win32.h
> diff -c /dev/null gcc-2.95.2/gcc/gthr-win32.h:1.2
> *** /dev/null Sat Jan 22 16:26:03 2000
> --- gcc-2.95.2/gcc/gthr-win32.h Fri Nov 5 02:39:46 1999
I suspect you did not apply the patch correctly.
AFAIK gthr-win32.h is a part of source for libgcc.a and it is not
activated unless you specify --enable-threads to configure.
--
Takeshi
|