Compiling GMP for Windows CE / ARM processor (cegcc)
Marian Kechlibar
marian.kechlibar at circletech.net
Wed Oct 21 10:46:20 CEST 2009
Dear Torbjorn,
I am actually fighting now with the same task: how to compile GMP for
Windows Mobile 5 (or Windows Mobile 6) so that a correct library is
created. And I am mightily confused about which build target to choose.
>From the CPU-VENDOR-OS triad, I am quite sure that CPU is "arm". But
what "VENDOR" and "OS"?
I tried to dig around the GCC documentation, but I was not able to find
the list of supported OSes, maybe I am looking to wrong places. Searches
for "gcc cross-compilation windows mobile" tend to land me on the CeGCC
project's webpages. As I can see from your previous reply to Tobias ,
this is not a recommended toolchain.
Therefore, I tried to configure via
./configure --host=arm-unknown-wm5 --disable-static --enable-shared
./configure --host=arm-unknown-wm6 --disable-static --enable-shared
where the system complained that wm5, wm6 are unknown operation systems.
I had a little more luck with
./configure --host=arm-unknown-wince --disable-static --enable-shared
which was able to finish correctly, but the subsequent make spit out the
following errors:
tmp-add_n.s: Assembler messages:
tmp-add_n.s:58: Error: no such instruction: `stmfd r13!,{r8,r9,r14}'
tmp-add_n.s:59: Error: too many memory references for `movs'
tmp-add_n.s:60: Error: no such instruction: `bcc .Lskip1'
tmp-add_n.s:61: Error: no such instruction: `ldr r12,[r1],'
tmp-add_n.s:62: Error: no such instruction: `ldr r14,[r2],'
tmp-add_n.s:63: Error: too many memory references for `add'
tmp-add_n.s:64: Error: invalid char '[' beginning operand 2 `[r0]'
tmp-add_n.s:66: Error: no such instruction: `tst r3,'
tmp-add_n.s:67: Error: no such instruction: `beq .Lskip2'
tmp-add_n.s:68: Error: no such instruction: `ldmia r1!,{r8,r9}'
tmp-add_n.s:69: Error: no such instruction: `ldmia r2!,{r12,r14}'
tmp-add_n.s:70: Error: too many memory references for `adc'
tmp-add_n.s:71: Error: too many memory references for `adc'
tmp-add_n.s:72: Error: no such instruction: `stmia r0!,{r8,r9}'
tmp-add_n.s:74: Error: no such instruction: `bics r3,r3,'
tmp-add_n.s:75: Error: no such instruction: `beq .Lreturn'
tmp-add_n.s:76: Error: no such instruction: `stmfd r13!,{r4,r5,r6,r7}'
tmp-add_n.s:78: Error: no such instruction: `ldmia r1!,{r4,r5,r6,r7}'
tmp-add_n.s:79: Error: no such instruction: `ldmia r2!,{r8,r9,r12,r14}'
tmp-add_n.s:80: Error: too many memory references for `adc'
tmp-add_n.s:81: Error: no such instruction: `ldr r8,[r0,'
tmp-add_n.s:82: Error: too many memory references for `adc'
tmp-add_n.s:83: Error: too many memory references for `adc'
tmp-add_n.s:84: Error: too many memory references for `adc'
tmp-add_n.s:85: Error: no such instruction: `stmia r0!,{r4,r5,r6,r7}'
tmp-add_n.s:86: Error: too many memory references for `sub'
tmp-add_n.s:87: Error: no such instruction: `teq r3,'
tmp-add_n.s:88: Error: no such instruction: `bne .Ladd_n_loop'
tmp-add_n.s:89: Error: no such instruction: `ldmfd r13!,{r4,r5,r6,r7}'
tmp-add_n.s:91: Error: too many memory references for `adc'
tmp-add_n.s:92: Error: no such instruction: `ldmfd r13!,{r8,r9,r15}'
make[2]: *** [add_n.lo] Error 1
So I think I qualify for the situation "I read the documentation
thoroughly and made honest attempts to get the thing working, but can't
help myself."
Best regards
Marian Kechlibar
Torbjorn Granlund napsal(a):
> "Tobias Jeske" <mailinglists at tobiweb.com> writes:
>
> I have a problem compiling GMP for Windows CE / ARM processor using CEGCC.
> My aim is to have a DLL at the end, which I can use in my Windows CE
> application.
>
> Here is what I have done:
>
> 1.) run configure script (Ubuntu Linux): "./configure
> CC=/opt/mingw32ce/bin/arm-mingw32ce-gcc --disable-static --enable-shared
> --host=none --build=core2-pc-linux-gnu"
>
> It works. If I set "--host=none" generic C-Code is used, or? If I set
> "--host=ARM" it doesn't work. I get an error message. Here the last line
> from configure:
>
> In general, you cannot keep quiet about the target environment, since it
> affects things like ABI. Also, configure will not be able sensibly to
> find any compiler tools.
>
> You've probably heard it before: It is usually a good idea to check
> documentation before building a package, and an even better idea to read
> it before asking for help.
>
> I won't try to talk you through this process, since I believe GMP's
> documentation is quite adequate for explaining cross-compilation.
>
> If you, after having read it and tried to follow it, still have
> problems, you're of course welcome to ask again!
>
>
More information about the gmp-discuss
mailing list