microblaze toolchain compilation question

hello all, I'm trying to compile the microblaze-toolchain from source on a 64 bits linux system, but got stuck. The source from the petalogix repository doesn't compile. a first problem was solved with help of colleague: a declaration error in 2 header files of binutils/gas (just wondering if this is done on purpose by petalogix..). Anyhow, compilation proceeded with building of gcc, but it stopped after the first xgcc line after mkinstalldirs libgcc etc. I subsituted as cflag -m32 to force 32 bits cross tools and the build process got a bit further, but still an error. The following line is stopper:

_floatdisf.o /usr/local/microblaze/microblaze-toolchain-sources/build/lin/bld_gcc/gcc/xgcc

-B/usr/local/microblaze/microblaze-toolchain-sources/build/lin/bld_gcc/gcc/

-B/usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/bin/

-B/usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/lib/

-isystem /usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/include

-isystem /usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/sys-include

-O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes

-Wmissing-prototypes -Wold-style-definition -isystem ./include -g

-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/.

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/../include

-DL_fixunsdfsi -c /usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/libgcc2.c -o libgcc/./_fixunsdfsi.o /tmp/cceNkJta.s: Assembler messages: /tmp/cceNkJta.s:124: Error: operand must be absolute in range -2147483648..2147483647, not -1042284544 make[2]: *** [libgcc/./_fixunsdfsi.o] Error 1 make[2]: Leaving directory `/ usr/local/microblaze/microblaze-toolchain-sources/build/lin/bld_gcc/gcc

Somebody any idea how to solve this? Anybody succesful with building this toolchain with a 64 bit linux system (it's running suse 10.2)? Anybody willing to put a ready-to-run toolchain in a tarball somewhere?

Taco

Reply to
taco
Loading thread data ...

I can assure you the source tarball you found on the PetaLogix website is the same as was used to build the gcc at that time. It builds fine on a RHEL/CentOS 3 machine, such as the one I am using right now.

Regards,

John

Reply to
John Williams

Hello john, are you sure? I just did everything again in a clean directory. Executing do_everything results in: /usr/local/microblaze/microblaze-toolchain-sources/srcs/binutils//gas/config/tc-microblaze.h:63: error: array type has incomplete element type and the compilation stops. The solution is to move the struct relax_type from tc.h to as.h in srcs/binutils/gas and remove the forward declaration from as.h. It's just a simple order, but I assume that this also will not work on a RHEL system without doing this unless your gcc compiler works different. (a colleague running ubuntu had the same problem by the way)

After this modification the same script continues but stops again in the gcc phase: mkdir -p -- libgcc mkdir -p -- bs mkdir -p -- libgcc/bs mkdir -p -- m mkdir -p -- libgcc/m mkdir -p -- bs/m mkdir -p -- libgcc/bs/m if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi /usr/local/microblaze/microblaze-toolchain-sources/build/lin/bld_gcc/gcc/xgcc

-B/usr/local/microblaze/microblaze-toolchain-sources/build/lin/bld_gcc/gcc/

-B/usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/bin/

-B/usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/lib/

-isystem /usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/include

-isystem /usr/local/microblaze/microblaze-toolchain-sources/release/lin/microblaze/microblaze/sys-include

-O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes

-Wmissing-prototypes -Wold-style-definition -isystem ./include -g

-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/.

-I/usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/../include

-DL_muldi3 -c /usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/libgcc2.c -o libgcc/./_muldi3.o /usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/libgcc2.c: In function `__muldi3': /usr/local/microblaze/microblaze-toolchain-sources/srcs/gcc/gcc/libgcc2.c:461: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate.

Well, this one is perhaps more related with the compiler/64 bits environment. so I changed do_all_gcc.csh with the -m32 flags and this gives the already mentioned error (libgcc2.c compilation): /tmp/ccYgSyAu.s: Assembler messages: /tmp/ccYgSyAu.s:124: Error: operand must be absolute in range -2147483648..2147483647, not -1042284544 If you've any idea, that would be very nice. Taco

Reply to
taco

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.