Hello everyone, I am struggling to build h8300 crosscompiler from GCC4.4.0. I learned it is necessary to patch gcc for complying to double 64 bits.
I used next sources. binutils-2.19.1.tar.bz2 gcc-4.4.0.tar.bz2 newlib-1.17.0.tar.gz I've got patch for GCC3.3.2 source. I appended it in compressed file. patch-sources/patch-for-gcc3.3.2/gcc_diff-new.txt But I was disappointed that it could not be used for GCC4.4.0 source per se.So I studied the patch and converted GCC4.4.0 source for installing h8300 croscompiler.
The patch changes next four files. /gcc-3.3.2/gcc/config/h8300/extfloatlib.c /gcc-3.3.2/gcc/config/h8300/float-h8300.h /gcc-3.3.2/gcc/config/h8300/h8300.h /gcc-3.3.2/gcc/config/h8300/t-h8300 First two files(extfloatlib.c,float-h8300.h) are newly made,so I think I could use them per ce into GCC4.4.0 source. h8300.h and t-h8300 are modified and I must apply differences to GCC4.4.0 source. I appended gcc3.3.2 original h8300.h,t-h8300. patch-sources/gcc3.3.2-before-patch-sources/h8300.h,t-h8300 And after-patch-applied gcc3.3.2 four files. patch-sources/gcc3.3.2-after-patch-sources/h8300.h,t-h8300,extfloatlib.c,float-h8300.h And gcc4.4.0 original h8300.h,t-h8300. patch-sources\gcc4.4.0-original-sources/h8300.h,t-h8300 And after-patch-converted gcc4.4.0 four files. patch-sources/gcc4.4.0-patch-converted-sources/h8300.h,t-h8300,extfloatlib.c,float-h8300.h I succeeded binutils configure. But when I configured gcc next error happened. --error/tmp/build/build_gcc/./gcc/xgcc -B/tmp/build/build_gcc/./gcc/ -nostdinc -B/tmp/build/build_gcc/h8300-elf/newlib/ -isyste m /tmp/build/build_gcc/h8300-elf/newlib/targ-include -isystem /src/gcc-4.4.0/newlib/libc/include -B/gnutools/h8300-elf/b in/ -B/gnutools/h8300-elf/lib/ -isystem /gnutools/h8300-elf/include -isystem /gnutools/h8300-elf/sys-include -g -O2 -mh -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wca st-qual -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. - I../../.././gcc -I/src/gcc-4.4.0/libgcc -I/src/gcc-4.4.0/libgcc/. -I/src/gcc-4.4.0/libgcc/../gcc -I/src/gcc-4.4.0/libgcc /../include -DHAVE_CC_TLS -o _bswapdi2.o -MT _bswapdi2.o -MD -MP -MF _bswapdi2.dep -DL_bswapdi2 -c /src/gcc-4.4.0/libgc
c/../gcc/libgcc2.c \/src/gcc-4.4.0/libgcc/../gcc/libgcc2.c:503: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__bswapdi2' /src/gcc-4.4.0/libgcc/../gcc/libgcc2.c:505:19: warning: integer constant is too large for its type /src/gcc-4.4.0/libgcc/../gcc/libgcc2.c:506:14: warning: integer constant is too large for its type /src/gcc-4.4.0/libgcc/../gcc/libgcc2.c:507:14: warning: integer constant is too large for its type /src/gcc-4.4.0/libgcc/../gcc/libgcc2.c:508:14: warning: integer constant is too large for its type
make[4]: *** [_bswapdi2.o] Error 1 make[4]: Leaving directory `/tmp/build/build_gcc/h8300-elf/h8300h/libgcc' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libgcc' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/tmp/build/build_gcc/h8300-elf/libgcc' make[1]: *** [all-target-libgcc] Error 2 make[1]: Leaving directory `/tmp/build/build_gcc' make: *** [all] Error 2 make: Leaving directory `/tmp/build/build_gcc' -- end of error It is caused by next declaration in libgcc2.c. #ifdef L_bswapdi2 DItype __bswapdi2 (DItype u)Since when I retrieved original h8300.h,t-h8300 then not occurred above error,
I am sure I wrongly converted gcc4.4.0 four files. Would you please teach me what is wrong my conversion ? Please help me. Masahiro Ariga
patch-sources.tar.bz2
Description: Binary data