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]

"Bad Instruction" Error message while building gcc-3.2.3 cross compiler for ARM on Cygwin on Win2k


hi,

Currently, i am using the arm-elf-gcc cross compiler 2.95.2 with
binutils-2.10.1 and newlib-1.9.0 on the Cygwin platform on Windows
2000. i found the relevant material for building these tools from
Redhat site regarding bulding it for ECos.

Now i want to upgrade my gcc cross-compiler to gcc-3.2.3. i did not
upgrade the binutils and newlib (thinkgin that they should also work
newer gcc version). 

i have run the configure script with the following command.

/src/gcc/gcc-3.2.3/configure --target=arm-elf \
--prefix=/tools \
--exec-prefix=/tools/H-i686-pc-cygwin \
--with-gnu-as --with-gnu-ld --with-newlib \
-v 2>&1 | tee configure.out

It completed successfully and i build the with the command

make -w all-gcc install-gcc \ 
LANGUAGES="c c++" 2>&1 | tee make.out


Initially, error message was reporting concerning the 'Undefined
reference to __mempcpy', so i fix that error manually doing following
changes

gcc:
	PR target/10338
	PR bootstrap/10198
	PR bootstrap/10140
	* fixinc/gnu-regex.c (regerror): Use mempcpy not __mempcpy.
	
libiberty:
	PR target/10338
	PR bootstrap/10198
	PR bootstrap/10140
	* getopt.c (exchange, _getopt_initialize): Use mempcpy not
	__mempcpy.
	* regex.c (regerror): Likewise.


(i found this materail from some mailing list)

When i build the compiler again with the same command. After running
'make' command following error message were reported.

/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_udivsi3 -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_udivsi3.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_divsi3 -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_divsi3.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_umodsi3 -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_umodsi3.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_modsi3 -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_modsi3.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_dvmd_tls -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_dvmd_tls.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_bb_init_func -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_bb_init_func.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_call_via_rX -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_call_via_rX.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include
-mthumb -DL_interwork_call_via_rX -xassembler-with-cpp -c
/src/gcc/gcc-3.2.3/gcc/config/arm/lib1funcs.asm -o
libgcc/thumb/_interwork_call_via_rX.o
/tmp/build/gcc/gcc/xgcc -B/tmp/build/gcc/gcc/ -nostdinc
-B/tmp/build/gcc/arm-elf/newlib/ -isystem
/tmp/build/gcc/arm-elf/newlib/targ-include -isystem
/src/gcc/gcc-3.2.3/newlib/libc/include
-B/tools/H-i686-pc-cygwin/arm-elf/bin/
-B/tools/H-i686-pc-cygwin/arm-elf/lib/ -isystem
/tools/H-i686-pc-cygwin/arm-elf/include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-isystem ./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I.
-I/src/gcc/gcc-3.2.3/gcc -I/src/gcc/gcc-3.2.3/gcc/.
-I/src/gcc/gcc-3.2.3/gcc/config -I/src/gcc/gcc-3.2.3/gcc/../include 
-mthumb -DL_muldi3 -c /src/gcc/gcc-3.2.3/gcc/libgcc2.c -o
libgcc/thumb/_muldi3.o
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s: Assembler
messages:
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:17: Error: bad
instruction `push {r4,r5,r6,r7,lr}'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:35: Error: bad
instruction `lsr r0,r3,#16'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:39: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:41: Error: bad
instruction `lsr r2,r5,#16'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:43: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:45: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:46: Error: bad
instruction `lsr r3,r7,#16'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:49: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:53: Error: bad
instruction `lsl r3,r3,#9'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:56: Error: bad
instruction `lsr r3,r4,#16'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:61: Error: bad
instruction `lsl r3,r4,#16'
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:75: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:78: rd and rm
should be different in mul
/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSh9BFv.s:97: Error: bad
instruction `pop {r4,r5,r6,r7,pc}'
make[2]: *** [libgcc/thumb/_muldi3.o] Error 1
make[2]: Leaving directory `/tmp/build/gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/tmp/build/gcc/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/tmp/build/gcc'



i cant see any apparent reason for these errors. 

Kindly help me in this regard. 
Should i need to apply some patches (as it was instructed on redhat
site for building gcc-2.95.2)

Regards, 
Amir Amin






__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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


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