This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems building old (3.0.4) gcc on Amiga Unix.


Hi all! Hope someone will be so kind to help.

First the immediate problem, and then below I’ll provide some explanation as to why I’m doing this in the first place, and maybe some will have better ideas.

The immediate problem is I am attempting to build gcc 3.0.4 on an old Amiga Unix box. The Amiga Unix box has a 68030 running a fairly faithful implementation of AT&T Unix SVR4. With the older hardware, I’m limited to 16MB of ram and have 256 MB of swap space. I am trying to compile this with gcc 2.3.7.2 and a vintage 1988 AT&T libc. 

The problem I’m running into is I get a syntax error in an include file (insn-flags.h) while trying to compile _mulsi3.c. Looking at the ins-flags.h, I am not familiar with structures that look like that, what they do, etc. So I’m hoping someone who is familiar with the code can give me an idea how those items should be rephrased. Below is a copy of the output of make and subsequent gcc errors. Below that is a snippet of insn-flags.h where the errors are being generated.


make[1]: Entering directory `/gccdev/gccbuild/gcc'
(cd intl && make all)
make[2]: Entering directory `/gccdev/gccbuild/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/gccdev/gccbuild/gcc/intl'
(cd po && make all)
make[2]: Entering directory `/gccdev/gccbuild/gcc/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/gccdev/gccbuild/gcc/po'
make GCC_FOR_TARGET="/gccdev/gccbuild/gcc/xgcc -B/gccdev/gccbuild/gcc/ -B/usr/local/m68k-cbm-sysv4/bin/ -B/usr/local/m68k-cbm-sysv4/lib/ -isystem /usr/local/m68k-cbm-sysv4/include" \
  HOST_PREFIX="" HOST_PREFIX_1="loser-" \
  AR_FOR_TARGET="ar" \
  AR_CREATE_FOR_TARGET="ar  rc" \
  AR_FLAGS_FOR_TARGET="" \
  OLDCC="/usr/ccs/bin/cc" CCLIBFLAGS="-O" \
  CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional " \
  RANLIB_FOR_TARGET="true" \
  RANLIB_TEST_FOR_TARGET="[ -f true ] || ( [ "m68k-cbm-sysv4" = "m68k-cbm-sysv4" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" \
  NM_FOR_TARGET="/usr/ccs/bin/nm" AWK="gawk" \
  LIBGCC2_CFLAGS="-O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED " \
  INCLUDES="-I. -I. -I../../gcc-3.0.4/gcc -I../../gcc-3.0.4/gcc/. -I../../gcc-3.0.4/gcc/config -I../../gcc-3.0.4/gcc/../include" MAYBE_USE_COLLECT2="" \
  CONFIG_H="tconfig.h  insn-codes.h insn-flags.h" MACHMODE_H="machmode.h machmode.def" \
  LIB1ASMSRC='' \
  MAKEOVERRIDES= \
  -f libgcc.mk all
make[2]: Entering directory `/gccdev/gccbuild/gcc'
for d in libgcc; do \
  if [ -d $d ]; then true; else mkdir $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/usr/ccs/bin/cc -DIN_LIBGCC1 -O -I. -I. -I../../gcc-3.0.4/gcc -I../../gcc-3.0.4/gcc/. -I../../gcc-3.0.4/gcc/config -I../../gcc-3.0.4/gcc/../include -DL_mulsi3 -c ../../gcc-3.0.4/gcc/libgcc1.c -o libgcc/_mulsi3.o
"./insn-flags.h", line 271: syntax error, probably missing ",", ";" or "="
"./insn-flags.h", line 271: syntax error before or at: PARAMS
"./insn-flags.h", line 271: warning: syntax error:  empty declaration
"./insn-flags.h", line 272: syntax error, probably missing ",", ";" or "="
["./insn-flags.h", line 272: internal compiler error:  gen_tstsf_fpa undefined]
"./insn-flags.h", line 272: cannot recover from previous errors
make[2]: *** [libgcc/_mulsi3.o] Error 1
make[2]: Leaving directory `/gccdev/gccbuild/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/gccdev/gccbuild/gcc'
make: *** [all-gcc] Error 2
#   

insn-flags.h
...
struct rtx_def;
extern struct rtx_def * gen_pushdi                          PARAMS ((struct rtx_def *, struct rtx_def *));
extern struct rtx_def * gen_tstsf_fpa                       PARAMS ((struct rtx_def *));
extern struct rtx_def * gen_tstdf_fpa                       PARAMS ((struct rtx_def *));
extern struct rtx_def * gen_cmpdf_fpa                       PARAMS ((struct rtx_def *, struct rtx_def *));
extern struct rtx_def * gen_cmpsf_fpa                       PARAMS ((struct rtx_def *, struct rtx_def *));
extern struct rtx_def * gen_pushexthisi_const               PARAMS ((struct rtx_def *, struct rtx_def *));
...


My reason for trying to build gcc 3.0.4 is that I would like to build a new version of glibc that has more modern facilities, like inttypes, strings, snprintf. Of course, the glibc library with those features requires a version of gcc newer than 2.3.7.2. 

For those wondering why I am not building something newer or a cross-compiler. I don’t have the source for all the system libraries as the OS is a proprietary copy of Unix. I am not completely sure if this is a problem or not. But I have not wanted to go down the path of trying to build a cross compiler and finding that it was a dead end. Right now, I don’t mind it taking a day to build software on the old Unix box, it gives the machine a purpose unto itself. So that leaves me with some rather old and limited facilities to work with. Too new a version of gcc, and the syntax and function calls made in the source won’t be in my current compiler and library. Additionally, I presume newer versions of gcc expect more memory resources to be available and as a result take up more memory. So it’s a balance, what will get me the features I desire without being unwieldy by the computer. 

So, at the moment I’ve settled on glibc 2.1.1. So I'm trying to build gcc 3.0.4 so I can build glibc. Glibc 2.1 appearing to be the first one with inttypes. Gcc 3.0 being the first complete iteration after EGCS including the improvements from gcc 2.8. 

I could compile glibc 2.1.1 with gcc 2.8.1 - though it wasn’t recommended in the documentation. However, I did try to compile 2.8.1 and I immediately ran into problems in assembly syntax. I’ve appeared to have gotten much further with 3.0.4. So I’m hoping I can get through compiling it, and that it will not be too unwieldy for the old machine. 


Hoping for some help.

Thanks for your time and thoughts!

Mack

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