Problems compiling 3.2.3 for ARM7TDMI, old ABI

Tsolakos Stavros stsolakos@gmail.com
Sun Sep 11 08:25:00 GMT 2005


Hi all.

This is my first post to this list. Greetings to everybody.

I am trying to compile gcc 3.2.3 under cygwin(WinXP) using gcc 3.2 
(20020927 pre-release). I want to make a cross compiler for ARM7TDMI, 
producing old ABI objects.

I can't afford using the new ABI because I have to link my code with 
many libraries using the old ABI. My code has to be linked by other code 
compiled with ADS 1.2 (old ABI).

So I did this:

I downloaded binutils-2.14.
configure --target=arm-none-oabi --with-cpu=arm7tdmi --prefix=/usr/local
make
make install

Everything worked fine.

Then:

I downloaded gcc-3.2.3 (just the core, no cpp, ada java or other langs)
configure --target=arm-none-oabi --with-cpu=arm7tdmi --prefix=/usr/local
make

Configuration went ok.
While making I kept getting "cpu" re-asserted warnings and I finally got 
thess errors:

/usr/local/src/build_gcc/gcc/xgcc -B/usr/local/src/build_gcc/gcc/ 
-B/usr/local/arm-none-oabi/bin/ -B/usr/local/arm-none-oabi/lib/
-isystem /usr/local/arm-none-oabi/include -O2  -DIN_GCC -DCROSS_COMPILE 
   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-p
rototypes -isystem ./include  -Dinhibit_libc -fno-inline -g 
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../
gcc-3.2.3/gcc -I../../gcc-3.2.3/gcc/. -I../../gcc-3.2.3/gcc/config 
-I../../gcc-3.2.3/gcc/../include  -mthumb -DL_muldi3 -c ../../g
cc-3.2.3/gcc/libgcc2.c -o libgcc/thumb/_muldi3.o
<command line>:1:8: warning: "cpu" re-asserted
<command line>:1:12: warning: "machine" re-asserted
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s: Assembler messages:
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:34: Error: 
garbage following instruction -- `mov r5,r0,lsr#16'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:35: Error: 
garbage following instruction -- `mov r7,r2,lsr#16'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:36: Error: dest 
and source1 must be the same register -- `bic r4,r0,r5,lsl#
16'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:37: Error: bad 
arguments to instruction -- `bic lr,r2,r7,lsl#16'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:38: Error: bad 
arguments to instruction -- `mul ip,r4,lr'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:39: Error: bad 
arguments to instruction -- `mul lr,r5,lr'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:40: Error: dest 
and source1 must be the same register -- `mul r4,r7,r4'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:41: Error: dest 
and source1 must be the same register -- `mul r7,r5,r7'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:42: Error: bad 
instruction `adds r4,lr,r4'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:43: Error: bad 
instruction `addcs r7,r7,#65536'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:44: Error: bad 
instruction `adds ip,ip,r4,lsl#16'
/cygdrive/d/DOCUME~1/STSOLA~1/LOCALS~1/Temp/ccvJlsSc.s:45: Error: 
garbage following instruction -- `adc r7,r7,r4,lsr#16'
make[2]: *** [libgcc/thumb/_muldi3.o] Error 1
make[2]: Leaving directory `/usr/local/src/build_gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/usr/local/src/build_gcc/gcc'
make: *** [all-gcc] Error 2


This seems to be ARM code but the -mthumb option makes me think that 
there is something going really wrong here.

Can anybody help me with this? Has anybody ever come across anything 
similar?

Thank you all,
Stavros

PS: If I have not posted enough info, please tell me so that I can post 
more. This is my first post here and I do not know what exactly should I 
post.



More information about the Gcc-help mailing list