This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problem create shared dll and -shared option


On Fri, 2003-03-28 at 00:07, longchuan wrote:
> I follow your build script and rebuilt gcc for arm-wince-pe, I got a
> cross-compiler after some minor mistake,
> but ld still could not generate the .base file( zero size). The built
> steps are:
> 1.binutils
> 2.gcc
> 3.newlib
> all configurations are follow build script download for your site, under
> msys1.08 win2000
> As i know for building cross-gcc , normally step 2 would failed because
> lack of some headers
> and libs of newlib, but with --enable-multilib=no, it won't. 
> Trying to build libstdc++-v3 failed at configure, but i don't think this
> is necessary, at lease for 
> my purpose. 
> Is this gcc for wince/pe a complete GCC ? I doubt it.

Our port of the compiler is complete except for C++ exception handling,
which I am going to have to add soon.  libstdc++ compiles too, and it
seems to work.  We are about to port GCJ to arm-wince-pe, so I guess
we'll soon know just "how complete" our gcc really is!!

> as you said, you had do a lot of work to built a gcc for wince/pe, :-),
> i think 
> that is what i eagerly to know: how much changes and how to do with the
> BIG sources. Gcc support for wince/pe is poor by now i think. Could you
> document your work? i believe that is very valuable for many people.:)))
> 
> BTW, as my gcc for wince/pe can't create .base file, I use the base file
> created
> by mingw32 for win32 gcc from the same sources. the wince/pe compiler
> didn't complaint 
> anything and the result wince/pe dll do have the relocation info. So I
> think that those
> infos are machine-independent, is that right?
> Anyway, the whole build progress is completely ugly :-(

Here is some more information I hope will help.  I reran the Make for
HelloWorld.dll with -v turned on so you can see exactly what the
different compiler passes do:

make config=dbgthreads -f Makecommon HelloWorld.dll
make[1]: Entering directory `/a/zetar/craigv/sarmwinceb/vbx/src/jnidll'
arm-wince-pe-gcc -c   -v -I/usr/local/include/java -I/usr/local/include/java/win32 -I   -march=armv4 -DSARM -DWIN32 -DNEWLIB -DGNUWINCE -DALIGN64 -DLITENDIAN -DARM -D_ARM_ -fno-exceptions -O0 -DDEBUG -Dpthreads -D_MT HelloWorld.cc
Reading specs from /usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2/specs
Configured with: ../../gcc-3.2/configure --target=arm-wince-pe --prefix=/usr/local/wince --enable-languages=c,c++ --with-cpu=strongarm --disable-shared --with-newlib --enable-multilib=no
Thread model: single
gcc version 3.2
 /usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2/cc1plus -v -I/usr/local/include/java -I/usr/local/include/java/win32 -I -march=armv4 -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=arm -Amachine=arm -D__ARM_ARCH_4__ -D__APCS_32__ -D__ARMEL__ -D__pe__ -D__declspec(x)=__attribute__((x)) -D__arm__ -DSARM -DWIN32 -DNEWLIB -DGNUWINCE -DALIGN64 -DLITENDIAN -DARM -D_ARM_ -DDEBUG -Dpthreads -D_MT HelloWorld.cc -D__GNUG__=3 -D__DEPRECATED -malignment-traps -quiet -dumpbase HelloWorld.cc -O0 -version -fno-exceptions -o /tmp/ccJqS39C.s
ignoring nonexistent directory "-march=armv4"
GNU CPP version 3.2 (cpplib) (ARM/pe)
GNU C++ version 3.2 (arm-wince-pe)
	compiled by GNU C version 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/java
 /usr/local/include/java/win32
 /usr/local/wince/include/c++/3.2
 /usr/local/wince/include/c++/3.2/arm-wince-pe
 /usr/local/wince/include/c++/3.2/backward
 /usr/local/wince/include
 /usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2/include
 /usr/local/wince/arm-wince-pe/sys-include
 /usr/local/wince/arm-wince-pe/include
End of search list.
 /usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2/../../../../arm-wince-pe/bin/as --traditional-format -o HelloWorld.o /tmp/ccJqS39C.s
arm-wince-pe-ld -s --dll --subsystem wince:3.00 -e _DllMain --base-file HelloWorld.base -o HelloWorld.dll HelloWorld.o -L/a/zetar/craigv/sarmwinceb/lib -L/usr/local/wince/arm-wince-pe/lib -L/usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2  -lsupc++ -lm -lc -lwinsock -lcoredll -lgcc
arm-wince-pe-dlltool --verbose -dllname HelloWorld.dll --def HelloWorld.def --base-file HelloWorld.base --output-exp HelloWorld.exp
arm-wince-pe-dlltool: Using file: arm-wince-pe-as
arm-wince-pe-dlltool: Processing def file: HelloWorld.def
arm-wince-pe-dlltool: LIBRARY: HelloWorld base: ffffffff
arm-wince-pe-dlltool: Processed def file
arm-wince-pe-dlltool: Scanning object file HelloWorld.dll
arm-wince-pe-dlltool: Done reading HelloWorld.dll
arm-wince-pe-dlltool: Processing definitions
arm-wince-pe-dlltool: Processed definitions
arm-wince-pe-dlltool: Generating export file: HelloWorld.exp
arm-wince-pe-dlltool: Opened temporary file: dc.s
arm-wince-pe-dlltool: run: arm-wince-pe-as -mapcs-32  -o HelloWorld.exp dc.s
arm-wince-pe-dlltool: Generated exports file
arm-wince-pe-ld -s --dll --subsystem wince:3.00 -e _DllMain --base-file HelloWorld.base HelloWorld.exp -o HelloWorld.dll HelloWorld.o -L/a/zetar/craigv/sarmwinceb/lib -L/usr/local/wince/arm-wince-pe/lib -L/usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2  -lsupc++ -lm -lc -lwinsock -lcoredll -lgcc
arm-wince-pe-dlltool --verbose --dllname HelloWorld.dll --def HelloWorld.def --base-file HelloWorld.base --output-exp HelloWorld.exp
arm-wince-pe-dlltool: Using file: arm-wince-pe-as
arm-wince-pe-dlltool: Processing def file: HelloWorld.def
arm-wince-pe-dlltool: LIBRARY: HelloWorld base: ffffffff
arm-wince-pe-dlltool: Processed def file
arm-wince-pe-dlltool: Processing definitions
arm-wince-pe-dlltool: Processed definitions
arm-wince-pe-dlltool: Generating export file: HelloWorld.exp
arm-wince-pe-dlltool: Opened temporary file: dc.s
arm-wince-pe-dlltool: run: arm-wince-pe-as -mapcs-32  -o HelloWorld.exp dc.s
arm-wince-pe-dlltool: Generated exports file
arm-wince-pe-ld -M --dll --subsystem wince:3.00 -e _DllMain HelloWorld.exp -o HelloWorld.dll HelloWorld.o -L/a/zetar/craigv/sarmwinceb/lib -L/usr/local/wince/arm-wince-pe/lib -L/usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2  -lsupc++ -lm -lc -lwinsock -lcoredll -lgcc > map 2>&1
make[1]: Leaving directory `/a/zetar/craigv/sarmwinceb/vbx/src/jnidll'
> 
> I try to build your sample dll , but arm-wince-pe-ld reports:
> ./arm-wince-pe-ld -s --dll --subsystem wince:3.00 -e _DllMain
> --base-file HelloWorld.base -o HelloWorld.dll HelloWorld.o
> -L/usr/local/wince/arm-wince-pe/lib
> -L/usr/local/wince/lib/gcc-lib/arm-wince-pe/3.2 -lgcc -lsupc++ -lm -lc
> -lwinsock -lcoredll
> 
> ./arm-wince-pe-ld: /lib/libc.so.6: version `GLIBC_2.3' not found
> (required by ./arm-wince-pe-ld)
> ./arm-wince-pe-ld: /lib/libc.so.6: version `GLIBC_2.2.3' not found
> (required by ./arm-wince-pe-ld)
> what is up? I am not familiar with Linux actually.
>

Your glibc on your linux machine is older than mine.  If I do "ldd" this
is what I get:

zetar% ldd -v `which arm-wince-pe-ld`
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

        Version information:
        /usr/local/wince/bin/arm-wince-pe-ld:
                libc.so.6 (GLIBC_2.3) => /lib/i686/libc.so.6
                libc.so.6 (GLIBC_2.2.3) => /lib/i686/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/i686/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/i686/libc.so.6
        /lib/i686/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

So it looks like you'd have to update your libc to something a little
newer.  This isn't hard to do, and would allow you to run "latest and
greatest" builds of compilers, tools, and applications.  The newer libc
is backwards-compatible, so you probably should just bite the bullet and
do it.

Another option is source.  We provide all of the modified gcc/binutils
sources and we'd be happy to give this stuff to you.  There is one major
problem remaining with GNU as though, which is that it seems to generate
incorrect code for our platform.  We have not yet solved the problem,
and we are using GNU as v2.11.2 in our toolchain, since this WORKS.

Documentation is a big problem.  We are in the midst of setting up a
much better site for GNUWINCE that will have some better examples and
more completely explain what we've done.  We will do more, but the
README is what there is for now.  As far as how much you could do with
the compiler, we have JNI dll's, built with our toolchain, that use C++
(heavily), threads, networking, audio i/o, and perform without problems.

Hope this helps,
craig

> regards
> wreckor
> 
> > -----Original Message-----
> > From: Craig A. Vanderborgh [mailto:craigv at voxware dot com] 
> > Sent: Friday, March 28, 2003 01:25
> > To: longchuan
> > Cc: 'Crossgcc'; 'Kai Ruottu'
> > Subject: RE: problem create shared dll and -shared option
> > 
> > 
> [snip]
> > We had to do a fair amount of work to get GCC working 
> > properly for the arm-wince-pe target.  It sounds like your 
> > configuration may not be "quite there" yet..  Let me know if 
> > I can help.  By the way, what exactly *is* your target 
> > platform anyhow?  Are you running wince?
> > 
> > craig
> >



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe at sources dot redhat dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]