BAUM@gmr.com ("ALAN BAUM ", 313-986-1435) (02/05/90)
I have attempted to install the GNU C compiler (version 1.35) on my SUN4/330 (SPARCstation) running SunOS 4.0.3 and I have encountered some differences after generating the stage2 files as recommended. It is quite possible that one or more of the solutions I implemented to various problems I had with the Makefile caused these differences, so I am including the problems and my actions to circumvent them. I assume I should not see any differences (since COFF format is only for 386 systems?), and the differences occur later in the files than byte 8 anyway. First I ran 'config.gcc sun4-os4' which created the following links: aux-output.c -> config/out-sparc.c config.h -> config/xm-sunos4.h md -> config/sparc.md tm.h -> config/tm-sparc.h Then I ran 'make' and proceeded to 'fix' things as described below. Finally, I checked the stage2 files and found 14 files with differences as listed at the end. Can I use the compiler with any confidence? I appreciate any light you may shed on this situation. Thanks. Alan Baum Computer Science Department GM Research Labs Warren, MI 48090 (313) 986-1435 baum@gmr.com ####################### ##### Problem 1 ##### ####################### COMMAND > make mkdir libtemp mkdir: libtemp: File exists *** Error code 1 (ignored) cd libtemp; \ rm -f gnulib; \ for name in _eprintf _builtin_new _builtin_New _builtin_del _umulsi3 _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 _cmpdi2 _ucmpdi2 _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 _cmpdf2 _fixunsdfsi _fixunsdfdi _fixdfsi _fixdfdi _floatsidf _floatdidf _truncdfsf2 _extendsfdf2 _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3 _varargs; \ do \ echo ${name}; \ rm -f ${name}.c; \ cp ../gnulib.c ${name}.c; \ cc -O -I.. -I../config -c -DL${name} ${name}.c; \ ar qc gnulib ${name}.o; \ done sh: libtemp: bad directory *** Error code 1 make: Fatal error: Command failed for target `gnulib' ######################## ##### Solution 1 ##### ######################## Change 'cd libtemp' to 'cd ./libtemp' in Makefile. ####################### ##### Problem 2 ##### ####################### COMMAND > make cc -O -I./config \ -DSTANDARD_STARTFILE_PREFIX=\"/usr/local/lib/\" \ -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-\" -c gcc.c ./config/xm-sparc.h: 39: Can't find include file tm.h *** Error code 2 make: Fatal error: Command failed for target `gcc.o' ######################## ##### Solution 2 ##### ######################## COMMAND > cd config COMMAND > ln -s tm-sparc.h tm.h COMMAND > cd .. ####################### ##### Problem 3 ##### ####################### COMMAND > make cc -O -I./config -I. \ -DSTANDARD_STARTFILE_PREFIX=\"/usr/local/lib/\" \ -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-\" -c gcc.c ./varargs.h: 4: Unreasonable include nesting *** Error code 2 make: Fatal error: Command failed for target `gcc.o' ######################## ##### Solution 3 ##### ######################## COMMAND > mv ./varargs.h ./varargs.hsav. COMMAND > make ##################### ##### Results ##### ##################### # After make completed: COMMAND > mv ./varargs.hsav ./varargs.h COMMAND > make stage1 COMMAND > make CC=stage1/gcc CFLAGS="-O -Bstage1/" COMMAND > make stage2 COMMAND > make CC=stage2/gcc CFLAGS="-O -Bstage2/" # Files which differ when tested with 'cmp $file stage2/$file': caller-save.o stage2/caller-save.o differ: char 8, line 2 cccp.o stage2/cccp.o differ: char 7, line 1 cexp.o stage2/cexp.o differ: char 8, line 1 cse.o stage2/cse.o differ: char 7, line 1 explow.o stage2/explow.o differ: char 8, line 1 expmed.o stage2/expmed.o differ: char 8, line 1 expr.o stage2/expr.o differ: char 8, line 1 fold-const.o stage2/fold-const.o differ: char 7, line 1 loop.o stage2/loop.o differ: char 8, line 1 stmt.o stage2/stmt.o differ: char 8, line 1 stor-layout.o stage2/stor-layout.o differ: char 7, line 1 toplev.o stage2/toplev.o differ: char 8, line 1 tree.o stage2/tree.o differ: char 8, line 1 varasm.o stage2/varasm.o differ: char 7, line 1 # Files which differ when tested with 'cmp foo1 foo2' after # 'tail +10 $file > foo1' and 'tail +10 stage2/$file > foo2': caller-save.o foo1 foo2 differ: char 163, line 3 cccp.o foo1 foo2 differ: char 1, line 1 cexp.o foo1 foo2 differ: char 48, line 2 cse.o foo1 foo2 differ: char 1465, line 12 explow.o foo1 foo2 differ: char 55, line 1 expmed.o foo1 foo2 differ: char 474, line 6 expr.o foo1 foo2 differ: char 660, line 2 fold-const.o foo1 foo2 differ: char 1540, line 22 loop.o foo1 foo2 differ: char 14217, line 88 stmt.o foo1 foo2 differ: char 15636, line 73 stor-layout.o foo1 foo2 differ: char 5, line 1 toplev.o foo1 foo2 differ: char 3904, line 14 tree.o foo1 foo2 differ: char 1676, line 10 varasm.o foo1 foo2 differ: char 2217, line 27