home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / dist / gnu / gcc / gcc-2.3.3 / gcc-2.3.3.diffs next >
Encoding:
Text File  |  1993-11-29  |  114.9 KB  |  3,698 lines

  1. diff -rc --new-file gcc-2.3.3-fsf/Makefile.in gcc-2.3.3-amiga/Makefile.in
  2. *** gcc-2.3.3-fsf/Makefile.in    Fri Dec 25 07:07:58 1992
  3. --- gcc-2.3.3-amiga/Makefile.in    Sat Nov 27 20:39:40 1993
  4. ***************
  5. *** 58,64 ****
  6.   AR_FLAGS = rc
  7.   SHELL = /bin/sh
  8.   # on sysV, define this as cp.
  9. ! INSTALL = install -c
  10.   # These permit overriding just for certain files.
  11.   INSTALL_PROGRAM = $(INSTALL)
  12.   INSTALL_DATA = $(INSTALL)
  13. --- 58,64 ----
  14.   AR_FLAGS = rc
  15.   SHELL = /bin/sh
  16.   # on sysV, define this as cp.
  17. ! INSTALL = cp
  18.   # These permit overriding just for certain files.
  19.   INSTALL_PROGRAM = $(INSTALL)
  20.   INSTALL_DATA = $(INSTALL)
  21. ***************
  22. *** 133,138 ****
  23. --- 133,145 ----
  24.   # Common prefix for installation directories.
  25.   # NOTE: This directory must exist when you start installation.
  26.   prefix = /usr/local
  27. + # Directory in which to put localized header files. On the systems with
  28. + # gcc as the native cc, `local_prefix' may not be `prefix' which is
  29. + # `/usr'.  Similar considerations apply for toolkits located on non-writable
  30. + # storage, such as CD-ROM, where we need a completely separate place to put
  31. + # local include files.
  32. + # NOTE: local_prefix *should not* default from prefix.
  33. + local_prefix = /usr/local
  34.   # Directory in which to put host dependent programs and libraries
  35.   exec_prefix = $(prefix)
  36.   # Directory in which to put the executable for the command `gcc'
  37. ***************
  38. *** 483,489 ****
  39.   
  40.   # Dump a specs file to make -B./ read these specs over installed ones.
  41.   specs: xgcc
  42. !     ./xgcc -dumpspecs > specs
  43.   
  44.   # We do want to create an executable named `xgcc', so we can use it to
  45.   # compile libgcc2.a.
  46. --- 490,496 ----
  47.   
  48.   # Dump a specs file to make -B./ read these specs over installed ones.
  49.   specs: xgcc
  50. !     ./$(XGCC) -dumpspecs > specs
  51.   
  52.   # We do want to create an executable named `xgcc', so we can use it to
  53.   # compile libgcc2.a.
  54. ***************
  55. *** 659,666 ****
  56.       then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  57.       else true;                    \
  58.       fi
  59. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  60. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  61.       rm -rf tmpcopy
  62.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  63.   # Actually build it in tmplibgcc.a, then rename at end,
  64. --- 666,676 ----
  65.       then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  66.       else true;                    \
  67.       fi
  68. ! # the cd .. make sure there's no lock left on tmpcopy (this is actually a
  69. ! # bug in ixemul.library, but I can't get around it currently because it
  70. ! # involves an OS bug which is beyond my capabilities to fix...)
  71. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2) ; cd ..; /c/wait 2)
  72. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o; cd ..; /c/wait 2)
  73.       rm -rf tmpcopy
  74.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  75.   # Actually build it in tmplibgcc.a, then rename at end,
  76. ***************
  77. *** 677,686 ****
  78.       cd objc; \
  79.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  80.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  81. !       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  82.         GCC_CFLAGS="$(GCC_CFLAGS)"
  83.       -rm -f libobjc.a
  84. !     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  85.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  86.   
  87.   # This is used by objc/Makefile if the user runs that directly.
  88. --- 687,696 ----
  89.       cd objc; \
  90.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  91.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  92. !       GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  93.         GCC_CFLAGS="$(GCC_CFLAGS)"
  94.       -rm -f libobjc.a
  95. !     cp objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  96.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  97.   
  98.   # This is used by objc/Makefile if the user runs that directly.
  99. ***************
  100. *** 690,696 ****
  101.       cd objc; \
  102.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  103.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  104. !       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  105.         GCC_CFLAGS="$(GCC_CFLAGS)"
  106.   
  107.   # Compile two additional files that are linked with every program
  108. --- 700,706 ----
  109.       cd objc; \
  110.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  111.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  112. !       GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
  113.         GCC_CFLAGS="$(GCC_CFLAGS)"
  114.   
  115.   # Compile two additional files that are linked with every program
  116. ***************
  117. *** 772,778 ****
  118.   # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  119.   ld: collect2
  120.       rm -f ld
  121. !     ln collect2 ld
  122.   
  123.   collect2 : collect2.o version.o $(LIBDEPS)
  124.   # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  125. --- 782,788 ----
  126.   # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  127.   ld: collect2
  128.       rm -f ld
  129. !     cp collect2 ld
  130.   
  131.   collect2 : collect2.o version.o $(LIBDEPS)
  132.   # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  133. ***************
  134. *** 1157,1163 ****
  135.   # Making the preprocessor
  136.   cpp: cccp
  137.       -rm -f cpp
  138. !     ln cccp cpp
  139.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  140.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  141.   cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  142. --- 1167,1173 ----
  143.   # Making the preprocessor
  144.   cpp: cccp
  145.       -rm -f cpp
  146. !     cp cccp cpp
  147.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  148.       $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  149.   cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  150. ***************
  151. *** 1170,1176 ****
  152.       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  153.         -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  154.         -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  155. !       -DLOCAL_INCLUDE_DIR=\"$(prefix)/include\" \
  156.         -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  157.         -DTOOLDIR=\"$(tooldir)/\" \
  158.         -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  159. --- 1180,1186 ----
  160.       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  161.         -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  162.         -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  163. !       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  164.         -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  165.         -DTOOLDIR=\"$(tooldir)/\" \
  166.         -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  167. ***************
  168. *** 1357,1363 ****
  169.   
  170.   # Copy the files of native compiler into directories where they will be run.
  171.   install-native: install-common install-libgcc $(INSTALL_HEADERS) \
  172. !    install-man
  173.   
  174.   # Copy the files of cross compiler into directories where they will be run.
  175.   install-cross: install-common install-common-headers \
  176. --- 1367,1373 ----
  177.   
  178.   # Copy the files of native compiler into directories where they will be run.
  179.   install-native: install-common install-libgcc $(INSTALL_HEADERS) \
  180. !    install-man $(INSTALL_EXTRA_PARTS)
  181.   
  182.   # Copy the files of cross compiler into directories where they will be run.
  183.   install-cross: install-common install-common-headers \
  184. ***************
  185. *** 1490,1496 ****
  186.         rm -f $(bindir)/gcc; \
  187.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  188.         rm -f $(bindir)/gcc-$(target)-1; \
  189. !       ln $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
  190.         mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
  191.       fi
  192.   # Install protoize if it was compiled.
  193. --- 1500,1506 ----
  194.         rm -f $(bindir)/gcc; \
  195.         $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  196.         rm -f $(bindir)/gcc-$(target)-1; \
  197. !       cp $(bindir)/gcc $(bindir)/gcc-$(target)-1; \
  198.         mv $(bindir)/gcc-$(target)-1 $(bindir)/gcc-$(target); \
  199.       fi
  200.   # Install protoize if it was compiled.
  201. ***************
  202. *** 1707,1723 ****
  203.       mkdir tmp/config
  204.       mkdir tmp/objc
  205.       for file in *[0-9a-zA-Z+]; do \
  206. !       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  207.       done
  208.       cd config; \
  209.       for file in *[0-9a-zA-Z+]; do \
  210. !       ln $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \
  211.       done
  212.       cd objc; \
  213.       for file in *[0-9a-zA-Z+]; do \
  214. !       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  215.       done
  216. !     ln .gdbinit tmp
  217.       mv tmp gcc-$(version)
  218.   # Get rid of everything we don't want in the distribution.
  219.       cd gcc-$(version); make -f Makefile.in extraclean
  220. --- 1717,1733 ----
  221.       mkdir tmp/config
  222.       mkdir tmp/objc
  223.       for file in *[0-9a-zA-Z+]; do \
  224. !       cp $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  225.       done
  226.       cd config; \
  227.       for file in *[0-9a-zA-Z+]; do \
  228. !       cp $$file ../tmp/config >/dev/null 2>&1 || cp $$file ../tmp/config; \
  229.       done
  230.       cd objc; \
  231.       for file in *[0-9a-zA-Z+]; do \
  232. !       cp $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  233.       done
  234. !     cp .gdbinit tmp
  235.       mv tmp gcc-$(version)
  236.   # Get rid of everything we don't want in the distribution.
  237.       cd gcc-$(version); make -f Makefile.in extraclean
  238. ***************
  239. *** 1730,1746 ****
  240.   # in the intended test directory to make it a suitable test directory.
  241.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  242.   maketest:
  243. !     ln -s $(DIR)/*.[chy] .
  244. !     ln -s $(DIR)/configure .
  245. !     ln -s $(DIR)/*.def .
  246.       -rm -f =*
  247. !     ln -s $(DIR)/.gdbinit .
  248. !     ln -s $(DIR)/$(FIXINCLUDES) .
  249. !     -ln -s $(DIR)/bison.simple .
  250. !     ln -s $(DIR)/config .
  251. !     ln -s $(DIR)/move-if-change .
  252.   # The then and else were swapped to avoid a problem on Ultrix.
  253. !     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  254.       -rm tm.h aux-output.c config.h md
  255.       make clean
  256.   # You must then run config to set up for compilation.
  257. --- 1740,1756 ----
  258.   # in the intended test directory to make it a suitable test directory.
  259.   # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  260.   maketest:
  261. !     cp $(DIR)/*.[chy] .
  262. !     cp $(DIR)/configure .
  263. !     cp $(DIR)/*.def .
  264.       -rm -f =*
  265. !     cp $(DIR)/.gdbinit .
  266. !     cp $(DIR)/$(FIXINCLUDES) .
  267. !     -cp $(DIR)/bison.simple .
  268. !     cp $(DIR)/config .
  269. !     cp $(DIR)/move-if-change .
  270.   # The then and else were swapped to avoid a problem on Ultrix.
  271. !     if [ ! -f Makefile ] ; then cp $(DIR)/Makefile .; else false; fi
  272.       -rm tm.h aux-output.c config.h md
  273.       make clean
  274.   # You must then run config to set up for compilation.
  275. ***************
  276. *** 1756,1772 ****
  277.   # To prevent `make install' from compiling alloca.o and then relinking cc1
  278.   # because alloca.o is newer, we permit these recursive makes to compile
  279.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  280. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  281.       $(MAKE) stage2
  282. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  283.   
  284.   bootstrap2: force
  285. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  286.       $(MAKE) stage2
  287. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  288.   
  289.   bootstrap3: force
  290. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  291.   
  292.   # Compare the object files in the current directory with those in the
  293.   # stage2 directory.
  294. --- 1766,1782 ----
  295.   # To prevent `make install' from compiling alloca.o and then relinking cc1
  296.   # because alloca.o is newer, we permit these recursive makes to compile
  297.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  298. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  299.       $(MAKE) stage2
  300. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  301.   
  302.   bootstrap2: force
  303. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  304.       $(MAKE) stage2
  305. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  306.   
  307.   bootstrap3: force
  308. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  309.   
  310.   # Compare the object files in the current directory with those in the
  311.   # stage2 directory.
  312. ***************
  313. *** 1789,1816 ****
  314.       -rm -f tmp-foo*
  315.   
  316.   # Copy the object files from a particular stage into a subdirectory.
  317. ! stage1: force
  318.       -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  319.       -mv $(STAGESTUFF) stage1
  320.       -rm -f stage1/libgcc.a
  321.       -cp libgcc.a stage1
  322.       -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  323.   
  324. ! stage2: force
  325.       -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  326.       -mv $(STAGESTUFF) stage2
  327.       -rm -f stage2/libgcc.a
  328.       -cp libgcc.a stage2
  329.       -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  330.   
  331. ! stage3: force
  332.       -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  333.       -mv $(STAGESTUFF) stage3
  334.       -rm -f stage3/libgcc.a
  335.       -cp libgcc.a stage3
  336.       -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  337.   
  338. ! stage4: force
  339.       -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  340.       -mv $(STAGESTUFF) stage4
  341.       -rm -f stage4/libgcc.a
  342. --- 1799,1826 ----
  343.       -rm -f tmp-foo*
  344.   
  345.   # Copy the object files from a particular stage into a subdirectory.
  346. ! stage1: force $(EXTRA_STAGE1_TARGETS)
  347.       -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  348.       -mv $(STAGESTUFF) stage1
  349.       -rm -f stage1/libgcc.a
  350.       -cp libgcc.a stage1
  351.       -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  352.   
  353. ! stage2: force $(EXTRA_STAGE2_TARGETS)
  354.       -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  355.       -mv $(STAGESTUFF) stage2
  356.       -rm -f stage2/libgcc.a
  357.       -cp libgcc.a stage2
  358.       -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  359.   
  360. ! stage3: force $(EXTRA_STAGE3_TARGETS)
  361.       -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  362.       -mv $(STAGESTUFF) stage3
  363.       -rm -f stage3/libgcc.a
  364.       -cp libgcc.a stage3
  365.       -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  366.   
  367. ! stage4: force $(EXTRA_STAGE4_TARGETS)
  368.       -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  369.       -mv $(STAGESTUFF) stage4
  370.       -rm -f stage4/libgcc.a
  371. diff -rc --new-file gcc-2.3.3-fsf/c-parse.y gcc-2.3.3-amiga/c-parse.y
  372. *** gcc-2.3.3-fsf/c-parse.y    Wed Oct  7 20:19:01 1992
  373. --- gcc-2.3.3-amiga/c-parse.y    Sun Nov 21 21:50:47 1993
  374. ***************
  375. *** 853,859 ****
  376.   
  377.   attrib
  378.       : IDENTIFIER
  379. !     { if (strcmp (IDENTIFIER_POINTER ($1), "packed"))
  380.           warning ("`%s' attribute directive ignored",
  381.                IDENTIFIER_POINTER ($1));
  382.         $$ = $1; }
  383. --- 853,866 ----
  384.   
  385.   attrib
  386.       : IDENTIFIER
  387. !     {
  388. ! #ifdef HANDLE_ATTRIBUTE0
  389. !       /* give the function a chance to validate further attributes */
  390. !       if (HANDLE_ATTRIBUTE0 (IDENTIFIER_POINTER ($1)) ||
  391. !           strcmp (IDENTIFIER_POINTER ($1), "packed"))
  392. ! #else
  393. !       if (strcmp (IDENTIFIER_POINTER ($1), "packed"))
  394. ! #endif
  395.           warning ("`%s' attribute directive ignored",
  396.                IDENTIFIER_POINTER ($1));
  397.         $$ = $1; }
  398. diff -rc --new-file gcc-2.3.3-fsf/cccp.c gcc-2.3.3-amiga/cccp.c
  399. *** gcc-2.3.3-fsf/cccp.c    Wed Dec 16 04:25:36 1992
  400. --- gcc-2.3.3-amiga/cccp.c    Wed Nov 24 21:02:26 1993
  401. ***************
  402. *** 39,44 ****
  403. --- 39,60 ----
  404.   #include "config.h"
  405.   #endif /* not EMACS */
  406.   
  407. + #ifdef amigados
  408. + /* Since cpp uses alloca to store all its read files, this is quite deadly
  409. +    on a system with non-automatic stackgrowth like amigados, so we better
  410. +    turn it off now.  Normally alloca is #defined to __builtin_alloca, so
  411. +    undefining it causes an external alloca to be used.
  412. +    Note that it's not wise to generally inhibit __builtin_alloca, since
  413. +    using the generic emulator entitels a serious (!) speed penalty, and
  414. +    it's bad enough that we have to live with it in cccp, don't make cc1
  415. +    unbearably slow as well... */
  416. + #undef alloca
  417. + static int amigados_abs_filename ();
  418. + #endif
  419.   #ifndef STANDARD_INCLUDE_DIR
  420.   #define STANDARD_INCLUDE_DIR "/usr/include"
  421.   #endif
  422. ***************
  423. *** 180,186 ****
  424. --- 196,206 ----
  425.   extern char *version_string;
  426.   extern struct tm *localtime ();
  427.   extern int sys_nerr;
  428. + #ifndef HAVE_STRERROR
  429.   extern char *sys_errlist[];
  430. + #define strerror(err) sys_errlist[err]
  431. + #endif
  432.   
  433.   #ifndef errno
  434.   extern int errno;
  435. ***************
  436. *** 1672,1682 ****
  437. --- 1692,1706 ----
  438.         char *p = in_fname;
  439.         char *p1 = p;
  440.         /* Discard all directory prefixes from P.  */
  441. + #ifdef FILE_NAME_NONDIRECTORY
  442. +       p = FILE_NAME_NONDIRECTORY (p);
  443. + #else
  444.         while (*p1) {
  445.       if (*p1 == '/')
  446.         p = p1 + 1;
  447.       p1++;
  448.         }
  449. + #endif
  450.         /* Output P, but remove known suffixes.  */
  451.         len = strlen (p);
  452.         if (p[len - 2] == '.' && p[len - 1] == 'c')
  453. ***************
  454. *** 3393,3399 ****
  455.   
  456.         if (!no_output && already_output == 0
  457.         && (kt->pass_thru
  458. !           || (kt->type == T_DEFINE
  459.             && (dump_macros == dump_names
  460.                 || dump_macros == dump_definitions)))) {
  461.           int len;
  462. --- 3417,3423 ----
  463.   
  464.         if (!no_output && already_output == 0
  465.         && (kt->pass_thru
  466. !           || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
  467.             && (dump_macros == dump_names
  468.                 || dump_macros == dump_definitions)))) {
  469.           int len;
  470. ***************
  471. *** 3725,3730 ****
  472. --- 3749,3766 ----
  473.           search_start = dsp;
  474.   #ifndef VMS
  475.           ep = rindex (nam, '/');
  476. + #ifdef amigados
  477. +         /* amigados uses unix-style directory-filename separation, but
  478. +            has VMS-style logicals as well */
  479. +         if (ep == NULL) 
  480. +           {
  481. +         ep = rindex (nam, ':');
  482. +         /* a ':' is part of the directory name, a '/' isn't ! */
  483. +             if (ep != NULL) ep++;
  484. +           }
  485. + #endif /* amigados */
  486.   #else                /* VMS */
  487.           ep = rindex (nam, ']');
  488.           if (ep == NULL) ep = rindex (nam, '>');
  489. ***************
  490. *** 3800,3806 ****
  491. --- 3836,3846 ----
  492.   
  493.     /* If specified file name is absolute, just open it.  */
  494.   
  495. + #ifndef amigados
  496.     if (*fbeg == '/') {
  497. + #else
  498. +   if (amigados_abs_filename (fbeg, flen)) {
  499. + #endif
  500.       strncpy (fname, fbeg, flen);
  501.       fname[flen] = 0;
  502.       if (redundant_include_p (fname))
  503. ***************
  504. *** 3823,3828 ****
  505. --- 3863,3872 ----
  506.       if (searchptr->fname[0] == 0)
  507.         continue;
  508.       strcpy (fname, searchptr->fname);
  509. + #ifdef amigados
  510. +     if (fname[strlen (fname) - 1] != ':')
  511. + #endif
  512.       strcat (fname, "/");
  513.       fname[strlen (fname) + flen] = 0;
  514.         } else {
  515. ***************
  516. *** 7637,7643 ****
  517.       fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
  518.   
  519.     if (errno < sys_nerr)
  520. !     fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]);
  521.     else
  522.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  523.   
  524. --- 7681,7687 ----
  525.       fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
  526.   
  527.     if (errno < sys_nerr)
  528. !     fprintf (stderr, "%s: %s\n", name, strerror (errno));
  529.     else
  530.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  531.   
  532. ***************
  533. *** 8538,8546 ****
  534.   perror_with_name (name)
  535.        char *name;
  536.   {
  537.     fprintf (stderr, "%s: ", progname);
  538. !   if (errno < sys_nerr)
  539. !     fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]);
  540.     else
  541.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  542.     errors++;
  543. --- 8582,8592 ----
  544.   perror_with_name (name)
  545.        char *name;
  546.   {
  547. +   int error = errno;
  548.     fprintf (stderr, "%s: ", progname);
  549. !   if (error < sys_nerr)
  550. !     fprintf (stderr, "%s: %s\n", name, strerror (error));
  551.     else
  552.       fprintf (stderr, "%s: undocumented I/O error\n", name);
  553.     errors++;
  554. ***************
  555. *** 8916,8918 ****
  556. --- 8962,8988 ----
  557.     return dst;
  558.   }
  559.   #endif /* VMS */
  560. + #ifdef amigados
  561. + /* This function returns whether the LEN characters long filename FNAME 
  562. +    is an absolute path specification. */
  563. + static int
  564. + amigados_abs_filename (fname, len)
  565. +      char *fname;
  566. +      int len;
  567. + {
  568. +   /* we're using ixemul.library, which treats `/foo' as `foo:', so 
  569. +      fname[0] is to be considered absolute as well */
  570. +   if (fname[0] == '/')
  571. +     return 1;
  572. +   /* else do an index() on fname, but one which is limited to len characters */
  573. +   while (*fname && *fname != ':' && len) 
  574. +     fname++, len--;
  575. +   return *fname == ':';
  576. + }
  577. + #endif /* amigados */
  578. diff -rc --new-file gcc-2.3.3-fsf/config/amigados.c gcc-2.3.3-amiga/config/amigados.c
  579. *** gcc-2.3.3-fsf/config/amigados.c    Thu Jan  1 00:00:00 1970
  580. --- gcc-2.3.3-amiga/config/amigados.c    Sun Nov 21 21:51:01 1993
  581. ***************
  582. *** 0 ****
  583. --- 1,158 ----
  584. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  585. +    Copyright (C) 1992 Free Software Foundation, Inc.
  586. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  587. + This file is part of GNU CC.
  588. + GNU CC is free software; you can redistribute it and/or modify
  589. + it under the terms of the GNU General Public License as published by
  590. + the Free Software Foundation; either version 2, or (at your option)
  591. + any later version.
  592. + GNU CC is distributed in the hope that it will be useful,
  593. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  594. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  595. + GNU General Public License for more details.
  596. + You should have received a copy of the GNU General Public License
  597. + along with GNU CC; see the file COPYING.  If not, write to
  598. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  599. + #include "m68k.c"
  600. + /* Does operand (which is a symbolic_operand) live in text space? If
  601. +    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
  602. +    This function is used in base relative code generation. */
  603. + int
  604. + read_only_operand (operand)
  605. +      rtx operand;
  606. + {
  607. +   if (GET_CODE (operand) == CONST)
  608. +     operand = XEXP (XEXP (operand, 0), 0);
  609. +   if (GET_CODE (operand) == SYMBOL_REF)
  610. +     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  611. +   return 1;
  612. + }
  613. + /* the rest of the file is to implement AmigaDOS specific keywords some day.
  614. +    The approach used so far used __attribute__ for this, but this required
  615. +    changes to c-parse.y as well as if we'd use the common keywords used
  616. +    on commercial AmigaDOS C-compilers as well. So in the future I'll probably
  617. +    switch to __saveds and __interrupt keywords as well.
  618. +    The rest of this file is currently ignored, because it's no longer
  619. +    working with the current gcc version. */
  620. + #if not_yet_working
  621. + #include "tree.h"
  622. + struct attribute {
  623. +   tree ident;
  624. +   int  saveds : 1,
  625. +        interrupt : 1;
  626. + };
  627. + static struct attribute *a_tab = 0;
  628. + static int a_index, a_size;
  629. + void
  630. + add_attr_entry (attr)
  631. +     struct attribute *attr;
  632. + {
  633. +   if (! a_tab)
  634. +     {
  635. +       a_size = 10;
  636. +       a_index = 0;
  637. +       a_tab  = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
  638. +     }
  639. +   if (a_index == a_size)
  640. +     {
  641. +       a_size <<= 1;
  642. +       a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
  643. +     }
  644. +   a_tab[a_index++] = *attr;
  645. + }
  646. + void
  647. + attr_do_saveds (function_ident)
  648. +       tree function_ident;
  649. + {
  650. +   struct attribute attr, *a;
  651. +   int i;
  652. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  653. +     if (a->ident == function_ident)
  654. +       {
  655. +     a->saveds = 1;
  656. +     return;
  657. +       }
  658. +   /* create a new entry for this function */
  659. +   attr.ident     = function_ident;
  660. +   attr.saveds    = 1;
  661. +   attr.interrupt = 0;
  662. +   add_attr_entry (&attr);
  663. + }
  664. + void
  665. + attr_do_interrupt (function_ident)
  666. +     tree function_ident;
  667. + {
  668. +   struct attribute attr, *a;
  669. +   int i;
  670. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  671. +     if (a->ident == function_ident)
  672. +       {
  673. +     /* __interrupt implies __saveds */
  674. +     a->saveds    = 1;
  675. +     a->interrupt = 1;
  676. +     return;
  677. +       }
  678. +   /* create a new entry for this function */
  679. +   attr.ident     = function_ident;
  680. +   attr.saveds     = 1;
  681. +   attr.interrupt = 1;
  682. +   add_attr_entry (&attr);
  683. + }
  684. + int
  685. + attr_does_saveds (function_name)
  686. +     char *function_name;
  687. + {
  688. +   tree ident = get_identifier (function_name);
  689. +   struct attribute *attr;
  690. +   int i;
  691. +   
  692. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  693. +     if (attr->ident == ident)
  694. +       return attr->saveds;
  695. +   return 0;
  696. + }
  697. + int
  698. + attr_does_interrupt (function_name)
  699. +     char *function_name;
  700. + {
  701. +   tree ident = get_identifier (function_name);
  702. +   struct attribute *attr;
  703. +   int i;
  704. +   
  705. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  706. +     if (attr->ident == ident)
  707. +       return attr->interrupt;
  708. +   return 0;
  709. + }
  710. + #endif
  711. diff -rc --new-file gcc-2.3.3-fsf/config/amigados.h gcc-2.3.3-amiga/config/amigados.h
  712. *** gcc-2.3.3-fsf/config/amigados.h    Thu Jan  1 00:00:00 1970
  713. --- gcc-2.3.3-amiga/config/amigados.h    Fri Nov 26 13:37:36 1993
  714. ***************
  715. *** 0 ****
  716. --- 1,388 ----
  717. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  718. +    Copyright (C) 1992 Free Software Foundation, Inc.
  719. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  720. + This file is part of GNU CC.
  721. + GNU CC is free software; you can redistribute it and/or modify
  722. + it under the terms of the GNU General Public License as published by
  723. + the Free Software Foundation; either version 2, or (at your option)
  724. + any later version.
  725. + GNU CC is distributed in the hope that it will be useful,
  726. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  727. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  728. + GNU General Public License for more details.
  729. + You should have received a copy of the GNU General Public License
  730. + along with GNU CC; see the file COPYING.  If not, write to
  731. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  732. + #include "m68k.h"
  733. + /* See m68k.h for bits in TARGET_DEFAULT.
  734. +    0 means 68000, no hardware fpu (68881/68882/68040).
  735. +    7 means 68020 (or higher) with hardware fpu.  */
  736. + #ifndef TARGET_DEFAULT
  737. + #define TARGET_DEFAULT 0
  738. + #endif
  739. + /* Define __HAVE_68881__ in preprocessor according to the -m flags.
  740. +    This will control the use of inline 68881 insns in certain macros.
  741. +    Also inform the program which CPU this is for.  */
  742. + #if TARGET_DEFAULT & 02
  743. + /* -m68881 is the default */
  744. + #define CPP_SPEC \
  745. + "%{!msoft-float:-D__HAVE_68881__ }\
  746. + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}"
  747. + #else
  748. + /* -msoft-float is the default, assume -mc68000 as well */
  749. + #define CPP_SPEC \
  750. + "%{m68881:-D__HAVE_68881__ }\
  751. + %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{!mc68020:%{!m68020:-Dmc68010}}}"
  752. + #endif
  753. + /* -m68000 requires special flags to the assembler.  */
  754. + #if TARGET_DEFAULT & 01
  755. + #define ASM_SPEC \
  756. +  "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}} %{msmall-code:-l} "
  757. + #else
  758. + #define ASM_SPEC \
  759. +  "%{m68020:-mc68020}%{mc68020:-mc68020}%{!mc68020:%{!m68020:-mc68010}} %{msmall-code:-l} "
  760. + #endif
  761. + /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
  762. +  * was used before and is included for compatibility reasons */
  763. + #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA"
  764. + /* Choose the right startup file, depending on whether we use base relative
  765. +    code, base relative code with automatic relocation (-resident), or plain
  766. +    crt0.o. 
  767. +   
  768. +    Profiling is currently only available for plain startup.
  769. +    mcrt0.o does not (yet) exist. */
  770. + #define STARTFILE_SPEC \
  771. +   "%{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}%{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}"
  772. + /* Automatically search libamiga.a for AmigaDOS specific functions.  Note
  773. +    that we first search the standard C library to resolve as much as
  774. +    possible from there, since it has names that are duplicated in libamiga.a
  775. +    which we *don't* want from there.  Then search the standard C library
  776. +    again to resolve any references that libamiga.a might have generated.
  777. +    This may only be a temporary solution since it might be better to simply
  778. +    remove the things from libamiga.a that should be pulled in from libc.a
  779. +    instead, which would eliminate the first reference to libc.a. */
  780. + #define LIB_SPEC "%{!p:%{!pg:-lc -lamiga -lc}}%{p:-lc_p -lamiga -lc_p}%{pg:-lc_p -lamiga -lc_p}"
  781. + /* if debugging, tell the linker to output amiga-hunk symbols *and* a BSD
  782. +    compatible debug hunk (which will probably change in the future, it's not
  783. +    tremendously useful in its current state). */
  784. + #define LINK_SPEC "%{g:-amiga-debug-hunk} %{fbaserel:-databss-together} %{resident:-databss-together -datadata-reloc -f libb} "
  785. + #define CC1_SPEC "%{resident:-fbaserel} "
  786. + #define CC1PLUS_SPEC "%{resident:-fbaserel} "
  787. + /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
  788. +    GDB doesn't work under AmigaDOS at the moment anyway..) */
  789. +   
  790. + #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
  791. + {                                  \
  792. +   if (OPTIMIZE >= 2)                         \
  793. +     flag_omit_frame_pointer = 1;                \
  794. + }
  795. + /* provide a dummy entry for the small-code switch. This is currently only
  796. +    needed by the assembler (explanations: m68k.h), but will be used by cc1
  797. +    to output 16bit pc-relative code later. */
  798. + #undef TARGET_SWITCHES
  799. + #define TARGET_SWITCHES  \
  800. +   { { "68020", 5},                \
  801. +     { "c68020", 5},                \
  802. +     { "68881", 2},                \
  803. +     { "bitfield", 4},                \
  804. +     { "68000", -5},                \
  805. +     { "c68000", -5},                \
  806. +     { "soft-float", -0102},            \
  807. +     { "nobitfield", -4},            \
  808. +     { "rtd", 8},                \
  809. +     { "nortd", -8},                \
  810. +     { "short", 040},                \
  811. +     { "noshort", -040},                \
  812. +     { "fpa", 0100},                \
  813. +     { "nofpa", -0100},                \
  814. +     { "sky", 0200},                \
  815. +     { "nosky", -0200},                \
  816. +     { "68040", 0407},                \
  817. +     { "68030", -01400},                \
  818. +     { "68030", 7},                \
  819. +     { "68040-only", 01000},            \
  820. +     { "small-code", 0 },            \
  821. +     { "", TARGET_DEFAULT}}
  822. + /* Every structure or union's size must be a multiple of 2 bytes.  */
  823. + #define STRUCTURE_SIZE_BOUNDARY 16
  824. + /* This is (almost;-)) BSD, so it wants DBX format.  */
  825. + #define DBX_DEBUGGING_INFO
  826. + /* Allow folding division by zero.  */
  827. + #define REAL_INFINITY
  828. + /* This is how to output an assembler line defining a `double' constant.  */
  829. + #undef ASM_OUTPUT_DOUBLE
  830. + #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  831. +   {                                    \
  832. +     if (REAL_VALUE_ISINF (VALUE))                    \
  833. +       fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  834. +     else if (isnan (VALUE))                        \
  835. +       {                                    \
  836. +     union { double d; long l[2];} t;                \
  837. +     t.d = (VALUE);                            \
  838. +     fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
  839. +       }                                    \
  840. +     else                                \
  841. +       fprintf (FILE, "\t.double 0r%.17g\n", VALUE);            \
  842. +   }
  843. + /* This is how to output an assembler line defining a `float' constant.  */
  844. + #undef ASM_OUTPUT_FLOAT
  845. + #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  846. +   {                                    \
  847. +     if (REAL_VALUE_ISINF (VALUE))                    \
  848. +       fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  849. +     else if (isnan (VALUE))                        \
  850. +       {                                    \
  851. +     union { float f; long l;} t;                    \
  852. +     t.f = (VALUE);                            \
  853. +     fprintf (FILE, "\t.long 0x%lx\n", t.l);                \
  854. +       }                                    \
  855. +     else                                \
  856. +       fprintf (FILE, "\t.single 0r%.9g\n", VALUE);            \
  857. +   }
  858. + /* This is how to output an assembler lines defining floating operands.
  859. +    There's no way to output a NaN's fraction, so we lose it.  */
  860. +   
  861. + #undef ASM_OUTPUT_FLOAT_OPERAND
  862. + #define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE)                \
  863. +   (REAL_VALUE_ISINF ((VALUE))                        \
  864. +    ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  865. +    : (VALUE) == -0.0                            \
  866. +    ? asm_fprintf (FILE, "%I0r-0.0")                    \
  867. +    : asm_fprintf (FILE, "%I0r%.9g", (VALUE)))
  868. + #undef ASM_OUTPUT_DOUBLE_OPERAND
  869. + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  870. +   (REAL_VALUE_ISINF ((VALUE))                        \
  871. +    ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  872. +    : (VALUE) == -0.0                            \
  873. +    ? asm_fprintf (FILE, "%I0r-0.0")                    \
  874. +    : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
  875. + /* use A5 as framepointer instead of A6, this makes A6 available as a
  876. +    general purpose register, and can thus be used without problems in
  877. +    direct library calls. */
  878. + #undef FRAME_POINTER_REGNUM
  879. + #define FRAME_POINTER_REGNUM 13
  880. + #undef ARG_POINTER_REGNUM
  881. + #define ARG_POINTER_REGNUM 13
  882. + /* we use A4 for this, not A5, which is the framepointer */
  883. + #undef PIC_OFFSET_TABLE_REGNUM
  884. + #define PIC_OFFSET_TABLE_REGNUM 12
  885. + /* setup a default shell return value for those (gazillion..) programs that
  886. +    (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
  887. +    cause the shell to randomly caugh upon executing such programs (contrary
  888. +    to Unix, AmigaDOS scripts are terminated with an error if a program returns
  889. +    with an error code above the `error' or even `failure' level
  890. +    (which is configurable with the FAILAT command) */
  891. + #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
  892. + /* we do have an ansi-compliant c-library ;-) */
  893. + #define HAVE_VPRINTF
  894. + #define HAVE_VFPRINTF
  895. + #define HAVE_PUTENV
  896. + #define HAVE_STRERROR
  897. + #define HAVE_ATEXIT
  898. + /* given that symbolic_operand(X), return TRUE if no special
  899. +    base relative relocation is necessary */
  900. + #define LEGITIMATE_BASEREL_OPERAND_P(X) \
  901. +   (flag_pic >= 3 && read_only_operand (X))
  902. + #undef LEGITIMATE_PIC_OPERAND_P
  903. + #define LEGITIMATE_PIC_OPERAND_P(X) \
  904. +   (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
  905. + /* Define this macro if references to a symbol must be treated
  906. +    differently depending on something about the variable or
  907. +    function named by the symbol (such as what section it is in).
  908. +    The macro definition, if any, is executed immediately after the
  909. +    rtl for DECL or other node is created.
  910. +    The value of the rtl will be a `mem' whose address is a
  911. +    `symbol_ref'.
  912. +    The usual thing for this macro to do is to a flag in the
  913. +    `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
  914. +    name string in the `symbol_ref' (if one bit is not enough
  915. +    information).
  916. +    On the Amiga we use this to indicate if a symbol is in text or
  917. +    data space.  */
  918. + #define ENCODE_SECTION_INFO(DECL)\
  919. + do                                    \
  920. +   {                                    \
  921. +     if (TREE_CODE (DECL) == FUNCTION_DECL)                \
  922. +       SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;            \
  923. +     else                                \
  924. +       {                                    \
  925. +     rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'        \
  926. +            ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));        \
  927. +     if (RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl))        \
  928. +       SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;                \
  929. +       }                                    \
  930. +   }                                    \
  931. + while (0)
  932. + #undef SELECT_RTX_SECTION
  933. + #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
  934. + /* according to varasm.c, RELOC referrs *only* to whether constants (!)
  935. +    are addressed by address. This doesn't matter in baserelative code,
  936. +    so we allow (inspite of flag_pic) readonly_data_section() in that
  937. +    case */
  938. + #undef SELECT_SECTION
  939. + #define SELECT_SECTION(DECL, RELOC)                    \
  940. + {                                    \
  941. +   if (TREE_CODE (DECL) == STRING_CST)                    \
  942. +     {                                    \
  943. +       if (! flag_writable_strings)                    \
  944. +     readonly_data_section ();                    \
  945. +       else                                \
  946. +     data_section ();                        \
  947. +     }                                    \
  948. +   else if (TREE_CODE (DECL) == VAR_DECL)                \
  949. +     {                                    \
  950. +       if ((flag_pic && flag_pic < 3 && RELOC)                \
  951. +       || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL))        \
  952. +     data_section ();                        \
  953. +       else                                \
  954. +     readonly_data_section ();                    \
  955. +     }                                    \
  956. +   else                                    \
  957. +     readonly_data_section ();                        \
  958. + }
  959. + #if not_yet_working
  960. + /* starting support for amiga specific keywords
  961. +  * --------------------------------------------
  962. +  */
  963. + /* validate attributes that don't take a parameter. Currently we support
  964. +  * __attribute__ (saveds) and __attribute__ (interrupt)
  965. +  */
  966. + #define HANDLE_ATTRIBUTE0(attr) \
  967. +   (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
  968. + /* (c-common.c)
  969. +  * install additional attributes
  970. +  */
  971. + #define HANDLE_EXTRA_ATTRIBUTES(a)                         \
  972. +   if (TREE_VALUE (a) != 0                            \
  973. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  974. +       && TREE_VALUE (a) == get_identifier ("saveds"))                \
  975. +     {                                        \
  976. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  977. +         {                                    \
  978. +           warning_with_decl (decl,                        \
  979. +               "saveds attribute specified for non-function `%s'");        \
  980. +       return;                                \
  981. +         }                                    \
  982. +                                               \
  983. +       attr_do_saveds (DECL_NAME (decl));                    \
  984. +     }                                        \
  985. +   else if (TREE_VALUE (a) != 0                            \
  986. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  987. +       && TREE_VALUE (a) == get_identifier ("interrupt"))            \
  988. +     {                                        \
  989. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  990. +         {                                    \
  991. +           warning_with_decl (decl,                        \
  992. +               "saveds attribute specified for non-function `%s'");        \
  993. +       return;                                \
  994. +         }                                    \
  995. +                                               \
  996. +       attr_do_interrupt (DECL_NAME (decl));                    \
  997. +     }                                        \
  998. + #define PROLOGUE_EXTRA_SAVE(mask)                        \
  999. +   { extern char *current_function_name;                        \
  1000. +     /* saveds makes the function preserve d1/a0/a1 as well */            \
  1001. +     if (attr_does_saveds (current_function_name))                \
  1002. +       mask |= 0x40c0; }                                \
  1003. + #define EPILOGUE_EXTRA_RESTORE(mask, nregs)                    \
  1004. +   { extern char *current_function_name;                        \
  1005. +     /* restore those extra registers */                        \
  1006. +     if (attr_does_saveds (current_function_name))                \
  1007. +       {                                        \
  1008. +     mask |= 0x0302;                                \
  1009. +     nregs += 3;                                \
  1010. +       } }                                    \
  1011. + #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream)                    \
  1012. +   { extern char *current_function_name;                        \
  1013. +     /* PLEASE Help! how is this done cleaner?? */                \
  1014. +     if (attr_does_saveds (current_function_name))                \
  1015. +       {                                        \
  1016. +     fprintf (stderr,                             \
  1017. +          "warning: couldn't cleanup `saveds'-stack in `%s'.\n");    \
  1018. +     fprintf (stderr,                            \
  1019. +          "         this is only ok, if the function never returns!\n");    \
  1020. +       }    }                                    \
  1021. +         
  1022. + #define EPILOGUE_EXTRA_TEST(stream)                        \
  1023. +   { extern char *current_function_name;                        \
  1024. +     /* with the interrupt-attribute, we have to set the cc before rts */    \
  1025. +     if (attr_does_interrupt (current_function_name))                \
  1026. +       asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); }            \
  1027. + #endif
  1028. diff -rc --new-file gcc-2.3.3-fsf/config/m68k.c gcc-2.3.3-amiga/config/m68k.c
  1029. *** gcc-2.3.3-fsf/config/m68k.c    Fri Oct 30 01:00:58 1992
  1030. --- gcc-2.3.3-amiga/config/m68k.c    Sun Nov 21 21:51:10 1993
  1031. ***************
  1032. *** 60,66 ****
  1033.      
  1034.   finalize_pic ()
  1035.   {
  1036. !   if (flag_pic && current_function_uses_pic_offset_table)
  1037.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  1038.   }
  1039.   
  1040. --- 60,66 ----
  1041.      
  1042.   finalize_pic ()
  1043.   {
  1044. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1045.       emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
  1046.   }
  1047.   
  1048. ***************
  1049. *** 180,185 ****
  1050. --- 180,188 ----
  1051.         mask &= ~ (1 << (15 - FRAME_POINTER_REGNUM));
  1052.         num_saved_regs--;
  1053.       }
  1054. + #ifdef PROLOGUE_EXTRA_SAVE
  1055. +   PROLOGUE_EXTRA_SAVE (mask);
  1056. + #endif
  1057.   
  1058.   #if NEED_PROBE
  1059.     fprintf (stream, "\ttstl sp@(%d)\n", NEED_PROBE - num_saved_regs * 4);
  1060. ***************
  1061. *** 213,219 ****
  1062.         asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  1063.   #endif
  1064.       }
  1065. !   if (flag_pic && current_function_uses_pic_offset_table)
  1066.       {
  1067.   #ifdef MOTOROLA
  1068.         asm_fprintf (stream, "\t%Omove.l %0I__GLOBAL_OFFSET_TABLE_, %s\n",
  1069. --- 216,222 ----
  1070.         asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
  1071.   #endif
  1072.       }
  1073. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1074.       {
  1075.   #ifdef MOTOROLA
  1076.         asm_fprintf (stream, "\t%Omove.l %0I__GLOBAL_OFFSET_TABLE_, %s\n",
  1077. ***************
  1078. *** 281,286 ****
  1079. --- 284,292 ----
  1080.         /* Output just a no-op so that debuggers don't get confused
  1081.        about which function the pc is in at this address.  */
  1082.         asm_fprintf (stream, "\tnop\n");
  1083. + #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
  1084. +       EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
  1085. + #endif
  1086.         return;
  1087.       }
  1088.   
  1089. ***************
  1090. *** 311,316 ****
  1091. --- 317,325 ----
  1092.           nregs++;
  1093.       mask |= 1 << regno;
  1094.         }
  1095. + #ifdef EPILOGUE_EXTRA_RESTORE
  1096. +   EPILOGUE_EXTRA_RESTORE(mask, nregs);
  1097. + #endif
  1098.     offset = foffset + nregs * 4;
  1099.     if (offset + fsize >= 0x8000
  1100.         && frame_pointer_needed
  1101. ***************
  1102. *** 513,518 ****
  1103. --- 522,530 ----
  1104.   #endif
  1105.       }
  1106.       }
  1107. + #ifdef EPILOGUE_EXTRA_TEST
  1108. +   EPILOGUE_EXTRA_TEST(stream);
  1109. + #endif
  1110.     if (current_function_pops_args)
  1111.       asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
  1112.     else
  1113. ***************
  1114. *** 803,817 ****
  1115.     /* First handle a simple SYMBOL_REF or LABEL_REF */
  1116.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1117.       {
  1118.         if (reg == 0)
  1119.       abort ();
  1120.   
  1121. !       pic_ref = gen_rtx (MEM, Pmode,
  1122. !              gen_rtx (PLUS, Pmode,
  1123. !                   pic_offset_table_rtx, orig));
  1124.         current_function_uses_pic_offset_table = 1;
  1125.         RTX_UNCHANGING_P (pic_ref) = 1;
  1126.         emit_move_insn (reg, pic_ref);
  1127.         return reg;
  1128.       }
  1129.     else if (GET_CODE (orig) == CONST)
  1130. --- 815,839 ----
  1131.     /* First handle a simple SYMBOL_REF or LABEL_REF */
  1132.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1133.       {
  1134. + #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1135. +   if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  1136. +     return orig;
  1137. + #endif
  1138.         if (reg == 0)
  1139.       abort ();
  1140.   
  1141. !       if (flag_pic >= 3)
  1142. !     pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  1143. !       else
  1144. !         pic_ref = gen_rtx (MEM, Pmode,
  1145. !                gen_rtx (PLUS, Pmode,
  1146. !                     pic_offset_table_rtx, orig));
  1147.         current_function_uses_pic_offset_table = 1;
  1148.         RTX_UNCHANGING_P (pic_ref) = 1;
  1149.         emit_move_insn (reg, pic_ref);
  1150.         return reg;
  1151.       }
  1152.     else if (GET_CODE (orig) == CONST)
  1153. ***************
  1154. *** 840,845 ****
  1155. --- 862,868 ----
  1156.         pic_ref = gen_rtx (PLUS, Pmode, base, orig);
  1157.         /* Likewise, should we set special REG_NOTEs here?  */
  1158.       }
  1159.     return pic_ref;
  1160.   }
  1161.   
  1162. ***************
  1163. *** 1887,1892 ****
  1164. --- 1910,1919 ----
  1165.                 fprintf (file, ":w");
  1166.               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  1167.                 fprintf (file, ":l");
  1168. +             if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  1169. +               fprintf (file, ":W");
  1170. +             if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
  1171. +               fprintf (file, ":L");
  1172.             }
  1173.           if (addr != 0 && ireg != 0)
  1174.             {
  1175. diff -rc --new-file gcc-2.3.3-fsf/config/m68k.h gcc-2.3.3-amiga/config/m68k.h
  1176. *** gcc-2.3.3-fsf/config/m68k.h    Tue Nov 24 22:01:03 1992
  1177. --- gcc-2.3.3-amiga/config/m68k.h    Sun Nov 21 21:51:16 1993
  1178. ***************
  1179. *** 327,335 ****
  1180.   #ifndef SUPPORT_SUN_FPA
  1181.   
  1182.   #define CONDITIONAL_REGISTER_USAGE \
  1183. ! {                                               \
  1184. !   if (flag_pic)                                 \
  1185. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  1186.   }
  1187.   
  1188.   #else /* defined SUPPORT_SUN_FPA */
  1189. --- 327,338 ----
  1190.   #ifndef SUPPORT_SUN_FPA
  1191.   
  1192.   #define CONDITIONAL_REGISTER_USAGE \
  1193. ! {                                                \
  1194. !   if (flag_pic)                                  \
  1195. !     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;     \
  1196. !   /* prevent saving/restoring of the base reg */ \
  1197. !   if (flag_pic == 3)                 \
  1198. !     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
  1199.   }
  1200.   
  1201.   #else /* defined SUPPORT_SUN_FPA */
  1202. diff -rc --new-file gcc-2.3.3-fsf/config/m68k.md gcc-2.3.3-amiga/config/m68k.md
  1203. *** gcc-2.3.3-fsf/config/m68k.md    Mon Nov 23 22:47:27 1992
  1204. --- gcc-2.3.3-amiga/config/m68k.md    Sun Nov 21 21:51:23 1993
  1205. ***************
  1206. *** 704,716 ****
  1207.   {
  1208.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1209.       {
  1210. !       /* The source is an address which requires PIC relocation.  
  1211. !          Call legitimize_pic_address with the source, mode, and a relocation
  1212. !          register (a new pseudo, or the final destination if reload_in_progress
  1213. !          is set).   Then fall through normally */
  1214. !       extern rtx legitimize_pic_address();
  1215. !       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1216. !       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1217.       }
  1218.   }")
  1219.   
  1220. --- 704,721 ----
  1221.   {
  1222.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1223.       {
  1224. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1225. !       if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  1226. ! #endif
  1227. !       {
  1228. !         /* The source is an address which requires PIC relocation.  
  1229. !            Call legitimize_pic_address with the source, mode, and a relocation
  1230. !            register (a new pseudo, or the final destination if reload_in_progress
  1231. !            is set).   Then fall through normally */
  1232. !         extern rtx legitimize_pic_address();
  1233. !         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1234. !         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1235. !       }
  1236.       }
  1237.   }")
  1238.   
  1239. ***************
  1240. *** 1711,1718 ****
  1241.   
  1242.         /* These insns can result from reloads to access
  1243.        stack slots over 64k from the frame pointer.  */
  1244. !       if (GET_CODE (operands[2]) == CONST_INT
  1245. !       && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
  1246.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1247.   #ifdef SGS
  1248.         if (GET_CODE (operands[2]) == REG)
  1249. --- 1716,1724 ----
  1250.   
  1251.         /* These insns can result from reloads to access
  1252.        stack slots over 64k from the frame pointer.  */
  1253. !       if (((GET_CODE (operands[2]) == CONST_INT
  1254. !        && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
  1255. !       || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
  1256.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1257.   #ifdef SGS
  1258.         if (GET_CODE (operands[2]) == REG)
  1259. ***************
  1260. *** 4651,4657 ****
  1261.     ""
  1262.     "
  1263.   {
  1264. !   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1265.       operands[0] = gen_rtx (MEM, GET_MODE (operands[0]),
  1266.                  force_reg (Pmode, XEXP (operands[0], 0)));
  1267.   }")
  1268. --- 4657,4663 ----
  1269.     ""
  1270.     "
  1271.   {
  1272. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1273.       operands[0] = gen_rtx (MEM, GET_MODE (operands[0]),
  1274.                  force_reg (Pmode, XEXP (operands[0], 0)));
  1275.   }")
  1276. ***************
  1277. *** 4662,4668 ****
  1278.        (match_operand:SI 1 "general_operand" "g"))]
  1279.     ;; Operand 1 not really used on the m68000.
  1280.   
  1281. !   "! flag_pic"
  1282.     "*
  1283.   #ifdef MOTOROLA
  1284.     return \"jsr %0\";
  1285. --- 4668,4674 ----
  1286.        (match_operand:SI 1 "general_operand" "g"))]
  1287.     ;; Operand 1 not really used on the m68000.
  1288.   
  1289. !   "(! flag_pic || flag_pic >= 3)"
  1290.     "*
  1291.   #ifdef MOTOROLA
  1292.     return \"jsr %0\";
  1293. ***************
  1294. *** 4677,4683 ****
  1295.        (match_operand:SI 1 "general_operand" "g"))]
  1296.     ;; Operand 1 not really used on the m68000.
  1297.   
  1298. !   "flag_pic"
  1299.     "*
  1300.     return \"jsr %0\";
  1301.   ")
  1302. --- 4683,4689 ----
  1303.        (match_operand:SI 1 "general_operand" "g"))]
  1304.     ;; Operand 1 not really used on the m68000.
  1305.   
  1306. !   "(flag_pic && flag_pic < 3)"
  1307.     "*
  1308.     return \"jsr %0\";
  1309.   ")
  1310. ***************
  1311. *** 4693,4699 ****
  1312.     ""
  1313.     "
  1314.   {
  1315. !   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1316.       operands[1] = gen_rtx (MEM, GET_MODE (operands[1]),
  1317.                  force_reg (Pmode, XEXP (operands[1], 0)));
  1318.   }")
  1319. --- 4699,4705 ----
  1320.     ""
  1321.     "
  1322.   {
  1323. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1324.       operands[1] = gen_rtx (MEM, GET_MODE (operands[1]),
  1325.                  force_reg (Pmode, XEXP (operands[1], 0)));
  1326.   }")
  1327. ***************
  1328. *** 4704,4710 ****
  1329.       (call (match_operand:QI 1 "memory_operand" "o")
  1330.             (match_operand:SI 2 "general_operand" "g")))]
  1331.     ;; Operand 2 not really used on the m68000.
  1332. !   "! flag_pic"
  1333.     "*
  1334.   #ifdef MOTOROLA
  1335.     return \"jsr %1\";
  1336. --- 4710,4716 ----
  1337.       (call (match_operand:QI 1 "memory_operand" "o")
  1338.             (match_operand:SI 2 "general_operand" "g")))]
  1339.     ;; Operand 2 not really used on the m68000.
  1340. !   "(! flag_pic || flag_pic >= 3)"
  1341.     "*
  1342.   #ifdef MOTOROLA
  1343.     return \"jsr %1\";
  1344. ***************
  1345. *** 4719,4725 ****
  1346.       (call (match_operand:QI 1 "memory_operand" "o")
  1347.             (match_operand:SI 2 "general_operand" "g")))]
  1348.     ;; Operand 2 not really used on the m68000.
  1349. !   "flag_pic"
  1350.     "*
  1351.     return \"jsr %1\";
  1352.   ")
  1353. --- 4725,4731 ----
  1354.       (call (match_operand:QI 1 "memory_operand" "o")
  1355.             (match_operand:SI 2 "general_operand" "g")))]
  1356.     ;; Operand 2 not really used on the m68000.
  1357. !   "(flag_pic && flag_pic < 3)"
  1358.     "*
  1359.     return \"jsr %1\";
  1360.   ")
  1361. diff -rc --new-file gcc-2.3.3-fsf/config/t-amigados gcc-2.3.3-amiga/config/t-amigados
  1362. *** gcc-2.3.3-fsf/config/t-amigados    Thu Jan  1 00:00:00 1970
  1363. --- gcc-2.3.3-amiga/config/t-amigados    Mon Nov 29 00:35:04 1993
  1364. ***************
  1365. *** 0 ****
  1366. --- 1,172 ----
  1367. + # Makefile fragment for amigados target.
  1368. + # We generate two additional things:
  1369. + #
  1370. + # libb/libgcc.a
  1371. + #    A base relative version of libgcc.a which is used when compiling and
  1372. + #    linking with the '-resident' option.
  1373. + #
  1374. + # xgccv
  1375. + #    A forking gcc instead of one calling ssytem(). This makes it less
  1376. + #    system conformant (can't ^C it when started from make), while providing
  1377. + #    increased functionality (-pipe option).
  1378. + # Use the vfork'ing version of gcc by default, so that the -pipe option can
  1379. + # get tested.  To use the regular version just do "make XGCC=gcc".
  1380. + XGCC = xgccv -pipe
  1381. + GCC_FOR_TARGET = ./$(XGCC) -B./
  1382. + # Build residentable versions of the gcc executables by default.  Use
  1383. + # "make RESIDENT=" to build non-residentable versions.
  1384. + RESIDENT = -resident
  1385. + # The standard additional target flags for the compiler.
  1386. + T_CFLAGS = $(RESIDENT)
  1387. + # Allow the user to override the default target optimizations with gcc, or if the
  1388. + # target compiler is not gcc and doesn't understand -O<N>.
  1389. + T_OPTIMISE = -O2
  1390. + # We don't need a libgcc1, it's all in ixemul.library
  1391. + LIBGCC1 = libgcc1.null
  1392. + # Flags to use when compiling the normal version of libgcc.a.
  1393. + # Don't compile with debugging, as long as there is no debugger.
  1394. + # Explicitly leave out the -resident compilation flag and don't use T_CFLAGS.
  1395. + LIBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1396. +           $(CROSS_GCC_CFLAGS)
  1397. + # Flags to use when compiling the base relative version of libgcc.a.
  1398. + # Don't compile with debugging, as long as there is no debugger.
  1399. + # Explicitly force -resident in the compilation flags and don't use T_CFLAGS.
  1400. + LIBBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1401. +           $(CROSS_GCC_CFLAGS) -resident
  1402. + # Build the base relative library.
  1403. + # It is later copied into gcc:lib/gcc-lib/amigados/<version>/libb/libgcc.a, whereas
  1404. + # libgcc.a is copied into gcc:lib/gcc-lib/amigados/<version>/libgcc.a.
  1405. + # It doesn't work very well to define one of the EXTRA_* macros to contain
  1406. + # libb/libgcc.a, particularly for doing "make stageN" or "make install".
  1407. + GCC_PARTS=$(GCC_PASSES) libgcc.a libb/libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  1408. + INSTALL_EXTRA_PARTS = install-libbgcc install-gccv
  1409. + # This includes the knowledge that target amigados doesn't need libgcc1.a
  1410. + libb/libgcc.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
  1411. +    longlong.h gbl-ctors.h config.status
  1412. + # Actually build it in tmplibbgcc.a, then rename at end,
  1413. + # so that libb/libgcc.a itself remains nonexistent if compilation is aborted.
  1414. +     -rm -f tmplibbgcc.a
  1415. + # -e causes any failing command to make this rule fail.
  1416. + # -e doesn't work in certain shells, so we test $$? as well.
  1417. +     set -e; \
  1418. +     for name in $(LIB2FUNCS); \
  1419. +     do \
  1420. +       echo $${name}; \
  1421. +       $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1422. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1423. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1424. +       $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1425. +       rm -f $${name}.o; \
  1426. +     done
  1427. + # Some shells crash when a loop has no items.
  1428. + # So make sure there is always at least one--`..'.
  1429. + # Then ignore it.
  1430. + # We don't use -e here because there are if statements
  1431. + # that should not make the command give up when the if condition is false.
  1432. + # Instead, we test for failure after each command where it matters.
  1433. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1434. +     do \
  1435. +       if [ x$${file} != x.. ]; then \
  1436. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1437. +         echo $${name}; \
  1438. +         if [ $${name}.asm = $${file} ]; then \
  1439. +           cp $${file} $${name}.s; file=$${name}.s; \
  1440. +           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1441. +         else true; fi; \
  1442. +         $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  1443. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1444. +         $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1445. +         rm -f $${name}.[so]; \
  1446. +       else true; \
  1447. +       fi; \
  1448. +     done
  1449. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbgcc.a; else true; fi
  1450. +     -if [ -d libb ] ; then true ; else mkdir libb ; fi
  1451. +     mv tmplibbgcc.a libb/libgcc.a
  1452. + install-libbgcc: libb/libgcc.a install-dir
  1453. +     -if [ -d $(libsubdir)/libb ] ; then true ; else mkdir $(libsubdir)/libb ; fi
  1454. +     -if [ -f libb/libgcc.a ] ; then \
  1455. +       rm -f $(libsubdir)/libb/libgcc.a; \
  1456. +       $(INSTALL_DATA) libb/libgcc.a $(libsubdir)/libb/libgcc.a; \
  1457. +       if $(RANLIB_TEST) ; then \
  1458. +         (cd $(libsubdir)/libb; $(RANLIB) libgcc.a); else true; fi; \
  1459. +       chmod a-x $(libsubdir)/libb/libgcc.a; \
  1460. +     else true; fi
  1461. +     
  1462. + # The default gcc (xgcc) is built without -DAMIGADOS_FORK_GCC. This gcc (xgccv)
  1463. + # is built with AMIGADOS_FORK_GCC defined, so that it can use '-pipe'.  We
  1464. + # don't want to define EXTRA_PASSES to xgccv because that will cause xgccv
  1465. + # to be installed in $(libsubdir), so instead we use the default GCC_PASSES
  1466. + # and add xgccv to it.
  1467. + GCC_PASSES = xgcc xgccv cc1 cpp $(EXTRA_PASSES)
  1468. + xgccv: xgccv.o version.o $(LIBDEPS)
  1469. +     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgccv xgccv.o version.o $(LIBS)
  1470. + xgccv.o: gcc.c $(CONFIG_H) gvarargs.h obstack.h
  1471. +     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1472. +   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  1473. +   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  1474. +   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  1475. +   -DTOOLDIR=\"$(tooldir)/\" \
  1476. +   -DAMIGADOS_FORK_GCC \
  1477. +   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o xgccv.o
  1478. + install-gccv: xgccv
  1479. +     rm -f $(bindir)/gccv
  1480. +     $(INSTALL_PROGRAM) xgccv $(bindir)/gccv
  1481. + # When making one of the stage<N> dirs, we need to make a libb subdir for
  1482. + # it, and copy libbgcc.a there as libgcc.a.
  1483. + EXTRA_STAGE1_TARGETS = stage1-libb
  1484. + EXTRA_STAGE2_TARGETS = stage2-libb
  1485. + EXTRA_STAGE3_TARGETS = stage3-libb
  1486. + EXTRA_STAGE4_TARGETS = stage4-libb
  1487. + stage1-libb:
  1488. +     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  1489. +     -if [ -d stage1/libb ] ; then true ; else mkdir stage1/libb ; fi
  1490. +     -cp libb/libgcc.a stage1/libb/libgcc.a
  1491. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libgcc.a; else true; fi
  1492. + stage2-libb:
  1493. +     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  1494. +     -if [ -d stage2/libb ] ; then true ; else mkdir stage2/libb ; fi
  1495. +     -cp libb/libgcc.a stage2/libb/libgcc.a
  1496. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libgcc.a; else true; fi
  1497. + stage3-libb:
  1498. +     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  1499. +     -if [ -d stage3/libb ] ; then true ; else mkdir stage3/libb ; fi
  1500. +     -cp libb/libgcc.a stage3/libb/libgcc.a
  1501. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libgcc.a; else true; fi
  1502. + stage4-libb:
  1503. +     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  1504. +     -if [ -d stage4/libb ] ; then true ; else mkdir stage4/libb ; fi
  1505. +     -cp libb/libgcc.a stage4/libb/libgcc.a
  1506. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libgcc.a; else true; fi
  1507. diff -rc --new-file gcc-2.3.3-fsf/config/x-amigados gcc-2.3.3-amiga/config/x-amigados
  1508. *** gcc-2.3.3-fsf/config/x-amigados    Thu Jan  1 00:00:00 1970
  1509. --- gcc-2.3.3-amiga/config/x-amigados    Sat Nov 27 20:21:54 1993
  1510. ***************
  1511. *** 0 ****
  1512. --- 1,36 ----
  1513. + # Note: It doesn't do any good to try to define prefix or local_prefix
  1514. + # in the host overrides because configure will just change them back.
  1515. + # You either have to give an appropriate option to configure or live with
  1516. + # an Amiga specific patch to configure.  See the note in configure.  -fnf
  1517. + # Building under amigados almost certainly requires an already working gcc.
  1518. + # Use gccv, which is a gcc compiled with AMIGADOS_FORK_GCC so "-pipe" will
  1519. + # work and get exercised.  To bootstrap with the regular gcc just do
  1520. + # "make CC=gcc"
  1521. + CC = gccv -pipe
  1522. + # Allow the user to override the default host optimization with gcc, or if the
  1523. + # host compiler is not gcc and doesn't understand -O<N>.
  1524. + X_OPTIMIZE = -O2
  1525. + # The standard additional host flags for the compiler.
  1526. + X_CFLAGS = $(X_OPTIMIZE)
  1527. + # Man pages get a wierd suffix...
  1528. + manext = .0
  1529. + # We really shouldn't specify CFLAGS from here, but there's no other way
  1530. + # to get rid of the `-g' indoctrinated by Makefile.in.  Note this becomes
  1531. + # part of both the host compilation CFLAGS and the target compilation
  1532. + # CFLAGS.
  1533. + CFLAGS =
  1534. + # Ranlib does exist, but may not be in a path where the default RANLIB_TEST
  1535. + # expects it, so just force it to true.
  1536. + RANLIB_TEST = true
  1537. diff -rc --new-file gcc-2.3.3-fsf/config/xm-amigados.h gcc-2.3.3-amiga/config/xm-amigados.h
  1538. *** gcc-2.3.3-fsf/config/xm-amigados.h    Thu Jan  1 00:00:00 1970
  1539. --- gcc-2.3.3-amiga/config/xm-amigados.h    Sat Nov 27 08:47:23 1993
  1540. ***************
  1541. *** 0 ****
  1542. --- 1,215 ----
  1543. + /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
  1544. +    Copyright (C) 1992 Free Software Foundation, Inc.
  1545. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  1546. + This file is part of GNU CC.
  1547. + GNU CC is free software; you can redistribute it and/or modify
  1548. + it under the terms of the GNU General Public License as published by
  1549. + the Free Software Foundation; either version 2, or (at your option)
  1550. + any later version.
  1551. + GNU CC is distributed in the hope that it will be useful,
  1552. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1553. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1554. + GNU General Public License for more details.
  1555. + You should have received a copy of the GNU General Public License
  1556. + along with GNU CC; see the file COPYING.  If not, write to
  1557. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1558. + /* first include the generic header, then modify some parts.. */
  1559. + #include "xm-m68k.h"
  1560. + /* Amiga specific headers, such as from the Native Developer Update kits,
  1561. +    go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
  1562. +    Unix "/usr/include".  All other include paths are set in Makefile. */
  1563. + #define SYSTEM_INCLUDE_DIR    "/gcc/os-include"
  1564. + #define STANDARD_INCLUDE_DIR    "/gcc/include"
  1565. + /* Fork one piped subcommand.  SEARCH_FLAG is the system call to use
  1566. +    (either execv or execvp).  ARGV is the arg vector to use.
  1567. +    NOT_LAST is nonzero if this is not the last subcommand
  1568. +    (i.e. its output should be piped to the next one.)  */
  1569. + #ifndef AMIGADOS_FORK_GCC
  1570. + /* This version uses a more or less amigados-conformant way of running a
  1571. +    program (in the context of the parent). If you want to use -pipe however,
  1572. +    you'll have to use the vfork() version afterwards. */
  1573. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1574. + ({char *_argline;                        \
  1575. +   int _arglinelength, _i;                    \
  1576. +                                 \
  1577. +   for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i)        \
  1578. +     _arglinelength += strlen(ARGV[_i]) + 1;            \
  1579. +                                 \
  1580. +   _arglinelength += strlen(PROGRAM) + 1;            \
  1581. +                                 \
  1582. +   if (!(_argline = (char *)alloca(_arglinelength)))         \
  1583. +     pfatal_with_name ("alloca");                \
  1584. +                                 \
  1585. +   strcpy(_argline, PROGRAM);                    \
  1586. +   for (_i = 1; ARGV[_i]; ++_i)                     \
  1587. +     {                                \
  1588. +       strcat(_argline, " ");                    \
  1589. +       strcat(_argline, ARGV[_i]);                \
  1590. +     }                                \
  1591. +                                 \
  1592. +   ssystem(_argline); })                        \
  1593. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1594. +   ({ STATUS = COMMAND.pid; })
  1595. + #else
  1596. + /* the vfork() version. This one has the drawback, that gcc is not 
  1597. +    interruptible when started from make, since ixemul.library doesn't yet
  1598. +    propagate ^C to subprocesses. */
  1599. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  1600. + ({int (*_func)() = (SEARCH_FLAG ? execv : execvp);            \
  1601. +   int _pid;                                \
  1602. +   int _pdes[2];                                \
  1603. +   int _input_desc = last_pipe_input;                    \
  1604. +   int _output_desc = STDOUT_FILE_NO;                    \
  1605. +   int _retries, _sleep_interval, _result;                \
  1606. +                                     \
  1607. +   /* If this isn't the last process, make a pipe for its output,    \
  1608. +      and record it as waiting to be the input to the next process.  */    \
  1609. +                                     \
  1610. +   if (NOT_LAST)                                \
  1611. +     {                                    \
  1612. +       if (pipe (_pdes) < 0)                        \
  1613. +     pfatal_with_name ("pipe");                    \
  1614. +       _output_desc = _pdes[WRITE_PORT];                    \
  1615. +       last_pipe_input = _pdes[READ_PORT];                \
  1616. +     }                                    \
  1617. +   else                                    \
  1618. +     last_pipe_input = STDIN_FILE_NO;                    \
  1619. +                                     \
  1620. +   /* Fork a subprocess; wait and retry if it fails.  */            \
  1621. +   _sleep_interval = 1;                            \
  1622. +   for (_retries = 0; _retries < 4; _retries++)                \
  1623. +     {                                    \
  1624. +       _pid = vfork ();                            \
  1625. +       if (_pid >= 0)                            \
  1626. +     break;                                \
  1627. +       sleep (_sleep_interval);                        \
  1628. +       _sleep_interval *= 2;                        \
  1629. +     }                                    \
  1630. +                                     \
  1631. +   switch (_pid)                                \
  1632. +     {                                    \
  1633. +     case -1:                                \
  1634. +       pfatal_with_name ("vfork");                    \
  1635. +       /* NOTREACHED */                            \
  1636. +       _result = 0;                            \
  1637. +       break;                                \
  1638. +                                     \
  1639. +     case 0: /* child */                            \
  1640. +       /* Move the input and output pipes into place, if nec.  */    \
  1641. +       if (_input_desc != STDIN_FILE_NO)                    \
  1642. +     {                                \
  1643. +       close (STDIN_FILE_NO);                    \
  1644. +       dup (_input_desc);                        \
  1645. +       close (_input_desc);                        \
  1646. +     }                                \
  1647. +       if (_output_desc != STDOUT_FILE_NO)                \
  1648. +     {                                \
  1649. +       close (STDOUT_FILE_NO);                    \
  1650. +       dup (_output_desc);                        \
  1651. +       close (_output_desc);                        \
  1652. +     }                                \
  1653. +                                     \
  1654. +       /* Close the parent's descs that aren't wanted here.  */        \
  1655. +       if (last_pipe_input != STDIN_FILE_NO)                \
  1656. +     close (last_pipe_input);                    \
  1657. +                                     \
  1658. +       /* Exec the program.  */                        \
  1659. +       (*_func) (PROGRAM, ARGV);                        \
  1660. +       perror_exec (PROGRAM);                        \
  1661. +       exit (-1);                            \
  1662. +       /* NOTREACHED */                            \
  1663. +       _result = 0;                            \
  1664. +       break;                                \
  1665. +                                     \
  1666. +     default:                                \
  1667. +       /* In the parent, after forking.                    \
  1668. +      Close the descriptors that we made for this child.  */        \
  1669. +       if (_input_desc != STDIN_FILE_NO)                    \
  1670. +     close (_input_desc);                        \
  1671. +       if (_output_desc != STDOUT_FILE_NO)                \
  1672. +     close (_output_desc);                        \
  1673. +                                     \
  1674. +       /* Return child's process number.  */                \
  1675. +       _result = _pid;                            \
  1676. +       break;                                \
  1677. +     }                                     \
  1678. + _result; })                                \
  1679. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  1680. +   ({ wait (& STATUS); })
  1681. + #endif /* AMIGADOS_FORK_GCC */
  1682. + /* the following macros are stolen more or less from xm-vms.h ... */
  1683. + /* This macro is used to help compare filenames in cp-lex.c.
  1684. +    We also need to make sure that the names are all lower case, because
  1685. +    we must be able to compare filenames to determine if a file implements
  1686. +    a class.  */
  1687. + #define FILE_NAME_NONDIRECTORY(C)                \
  1688. + ({                                \
  1689. +    extern char *rindex();                    \
  1690. +    char * pnt_ = (C), * pnt1_;                    \
  1691. +    pnt1_ = pnt_ - 1;                        \
  1692. +    while (*++pnt1_)                        \
  1693. +      if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;    \
  1694. +    pnt1_ = rindex (pnt_, '/');                     \
  1695. +    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);        \
  1696. +    (pnt1_ == 0 ? pnt_ : pnt1_ + 1);                \
  1697. +  })
  1698. + /* Macro to generate the name of the cross reference file.  The standard
  1699. +    one does not work, since it was written assuming that the conventions
  1700. +    of a unix style filesystem will work on the host system.
  1701. +  
  1702. +    Contrary to VMS, I'm using the original unix filename, there's no reason
  1703. +    not to use this under AmigaDOS. */
  1704. + #define XREF_FILE_NAME(BUFF, NAME)    \
  1705. +   s = FILE_NAME_NONDIRECTORY (NAME);            \
  1706. +   if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME);    \
  1707. +   else {                        \
  1708. +     unsigned char ch = *s; /* could be Latin1 char.. */    \
  1709. +     /* temporary: cut the filename from the directory */\
  1710. +     *s = 0;                        \
  1711. +     sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1);    \
  1712. +     /* and restore the filename */            \
  1713. +     *s = ch;                        \
  1714. +   }                            \
  1715. + /* Macro that is used in cp-xref.c to determine whether a file name is
  1716. +    absolute or not.
  1717. +    This checks for both, '/' as first character, since we're running under
  1718. +    ixemul.library which provides for this unix'ism, and for the usual 
  1719. +    logical-terminator, ':', somewhere in the filename. */
  1720. + #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
  1721. + /* the colon conflicts with the name space of logicals */
  1722. + #define PATH_SEPARATOR ','
  1723. + /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
  1724. +    hacks. It's actually the inverse case as on Unix. rename(2) was always
  1725. +    there, link(2) is new with OS 2.0 */
  1726. + #define HAVE_rename 1
  1727. diff -rc --new-file gcc-2.3.3-fsf/configure gcc-2.3.3-amiga/configure
  1728. *** gcc-2.3.3-fsf/configure    Mon Dec 21 07:58:23 1992
  1729. --- gcc-2.3.3-amiga/configure    Mon Nov 22 15:41:01 1993
  1730. ***************
  1731. *** 28,33 ****
  1732. --- 28,34 ----
  1733.   #       --build=TARGET    specifies configuration of machine you are
  1734.   #                using to compile GCC.
  1735.   #       --prefix=DIR        specifies directory to install in.
  1736. + #       --local-prefix=DIR    specifies directory to put local ./include in.
  1737.   #       --exec-prefix=DIR    specifies directory to install executables in.
  1738.   #       --with-gnu-ld    arrange to work with GNU ld.
  1739.   #       --with-gnu-as    arrange to work with GAS.
  1740. ***************
  1741. *** 52,65 ****
  1742.   
  1743.   host=
  1744.   
  1745. ! # Default prefix to /usr/local.
  1746. ! prefix=/usr/local
  1747.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1748.   exec_prefix='$(prefix)'
  1749.   
  1750.   remove=rm
  1751. ! hard_link=ln
  1752. ! symbolic_link='ln -s'
  1753.   copy=cp
  1754.   
  1755.   # Record all the arguments, to write them in config.status.
  1756. --- 53,79 ----
  1757.   
  1758.   host=
  1759.   
  1760. ! # Note:  For AmigaDOS we want this to default to /gcc unless we specify
  1761. ! # otherwise to configure.  Changing it in Makefile.in or config/m68k/x-amigados
  1762. ! # is ineffective since configure will always change them back in the final
  1763. ! # generated Makefile, so we have to go to the root of the problem, which is
  1764. ! # here.  -fnf
  1765. ! # Default prefix to /gcc.
  1766. ! prefix=/gcc
  1767. ! # local_prefix specifies where to find the directory /usr/local/include
  1768. ! # We don't use $(prefix) for this
  1769. ! # because we always want GCC to search /usr/local/include
  1770. ! # even if GCC is installed somewhere other than /usr/local.
  1771. ! # Think THREE TIMES before specifying any other value for this!
  1772. ! # DO NOT make this use $prefix!
  1773. ! # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  1774. ! local_prefix=/local
  1775.   # Default is to let the Makefile set exec_prefix from $(prefix)
  1776.   exec_prefix='$(prefix)'
  1777.   
  1778.   remove=rm
  1779. ! hard_link=cp
  1780. ! symbolic_link=cp
  1781.   copy=cp
  1782.   
  1783.   # Record all the arguments, to write them in config.status.
  1784. ***************
  1785. *** 97,102 ****
  1786. --- 111,120 ----
  1787.       prefix=$arg
  1788.       next_arg=
  1789.       ;;
  1790. +   --local-prefix)
  1791. +     local_prefix=$arg
  1792. +     next_arg=
  1793. +     ;;
  1794.     --exec-prefix)
  1795.       exec_prefix=$arg
  1796.       next_arg=
  1797. ***************
  1798. *** 133,138 ****
  1799. --- 151,165 ----
  1800.        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  1801.       prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
  1802.       ;;
  1803. +      -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  1804. +     | --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
  1805. +     next_arg=--local-prefix
  1806. +     ;;
  1807. +      -local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
  1808. +     | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  1809. +     | --loc=* | --lo=* | --l=*)
  1810. +     local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
  1811. +     ;;
  1812.        -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  1813.       | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  1814.       next_arg=--exec-prefix
  1815. ***************
  1816. *** 185,191 ****
  1817.           srcdir=..
  1818.       fi
  1819.   fi
  1820.   if [ ! -r ${srcdir}/tree.c ]
  1821.   then
  1822.       if [ x$srcdirdefaulted = x ]
  1823. --- 212,218 ----
  1824.           srcdir=..
  1825.       fi
  1826.   fi
  1827. ! srcdir=../gcc-2.3.3-amiga    #Hack
  1828.   if [ ! -r ${srcdir}/tree.c ]
  1829.   then
  1830.       if [ x$srcdirdefaulted = x ]
  1831. ***************
  1832. *** 210,216 ****
  1833.   
  1834.       echo "\
  1835.   Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  1836. !        [--prefix=DIR] [--exec-pref=DIR]
  1837.          [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--nfp] TARGET" 1>&2
  1838.       echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  1839.       if [ -r config.status ]
  1840. --- 237,243 ----
  1841.   
  1842.       echo "\
  1843.   Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  1844. !        [--prefix=DIR] [--local-pref=DIR] [--exec-pref=DIR]
  1845.          [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--nfp] TARGET" 1>&2
  1846.       echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  1847.       if [ -r config.status ]
  1848. ***************
  1849. *** 476,481 ****
  1850. --- 503,515 ----
  1851.           fixincludes=fixinc.svr4
  1852.           broken_install=yes
  1853.           ;;
  1854. +     m68k-*-amigados)
  1855. +         xm_file=xm-amigados.h
  1856. +         out_file=amigados.c
  1857. +         tm_file=amigados.h
  1858. +         tmake_file=t-amigados
  1859. +         xmake_file=x-amigados
  1860. +         ;;
  1861.       m68k-cbm-sysv4*)        # Commodore variant of V.4.
  1862.           tm_file=amix.h
  1863.           xm_file=xm-amix.h
  1864. ***************
  1865. *** 1272,1284 ****
  1866.   
  1867.   # Remove all formfeeds, since some Makes get confused by them.
  1868.   # Also arrange to give the variables `target', `host_xmake_file',
  1869. ! # `tmake_file', `prefix', `exec_prefix' and `FIXINCLUDES'
  1870.   # values in the Makefile from the values they have in this script.
  1871.   rm -f Makefile.xx
  1872.   sed -e "s/ //" -e "s/^target=.*$/target=${target}/" \
  1873.       -e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
  1874.       -e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
  1875.       -e "s|^prefix[     ]*=.*|prefix = $prefix|" \
  1876.       -e "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" \
  1877.       -e "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" \
  1878.       Makefile.tem > Makefile.xx
  1879. --- 1306,1319 ----
  1880.   
  1881.   # Remove all formfeeds, since some Makes get confused by them.
  1882.   # Also arrange to give the variables `target', `host_xmake_file',
  1883. ! # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
  1884.   # values in the Makefile from the values they have in this script.
  1885.   rm -f Makefile.xx
  1886.   sed -e "s/ //" -e "s/^target=.*$/target=${target}/" \
  1887.       -e "s|^xmake_file=.*$|xmake_file=${host_xmake_file}|" \
  1888.       -e "s|^tmake_file=.*$|tmake_file=${tmake_file}|" \
  1889.       -e "s|^prefix[     ]*=.*|prefix = $prefix|" \
  1890. +     -e "s|^local_prefix[     ]*=.*|local_prefix = $local_prefix|" \
  1891.       -e "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" \
  1892.       -e "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" \
  1893.       Makefile.tem > Makefile.xx
  1894. diff -rc --new-file gcc-2.3.3-fsf/expr.c gcc-2.3.3-amiga/expr.c
  1895. *** gcc-2.3.3-fsf/expr.c    Sun Dec 20 07:16:15 1992
  1896. --- gcc-2.3.3-amiga/expr.c    Sun Nov 21 21:51:47 1993
  1897. ***************
  1898. *** 1977,1982 ****
  1899. --- 1977,1988 ----
  1900.   
  1901.     argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  1902.   
  1903. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  1904. + #ifdef ENCODE_SECTION_INFO
  1905. +   /* mark it as a function (to be in the text section that is) */
  1906. +   SYMBOL_REF_FLAG (fun) = 1;
  1907. + #endif
  1908.     INIT_CUMULATIVE_ARGS (args_so_far, (tree)0, fun);
  1909.   
  1910.     args_size.constant = 0;
  1911. diff -rc --new-file gcc-2.3.3-fsf/gcc.c gcc-2.3.3-amiga/gcc.c
  1912. *** gcc-2.3.3-fsf/gcc.c    Tue Dec  8 13:32:53 1992
  1913. --- gcc-2.3.3-amiga/gcc.c    Fri Nov 26 11:40:55 1993
  1914. ***************
  1915. *** 104,110 ****
  1916. --- 104,114 ----
  1917.   extern char *getenv ();
  1918.   
  1919.   extern int errno, sys_nerr;
  1920. + #ifndef HAVE_STRERROR
  1921. + /* provide a cheap strerror() emulator for those that don't have it */
  1922.   extern char *sys_errlist[];
  1923. + #define strerror(err) sys_errlist[err]
  1924. + #endif
  1925.   
  1926.   extern int execv (), execvp ();
  1927.   
  1928. ***************
  1929. *** 1126,1142 ****
  1930.   #endif
  1931.         if (base == (char *)0)
  1932.       {
  1933.         if (access ("/usr/tmp", R_OK | W_OK) == 0)
  1934.           base = "/usr/tmp/";
  1935.         else
  1936.           base = "/tmp/";
  1937.       }
  1938.       }
  1939.   
  1940.     len = strlen (base);
  1941. !   temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
  1942.     strcpy (temp_filename, base);
  1943. !   if (len > 0 && temp_filename[len-1] != '/')
  1944.       temp_filename[len++] = '/';
  1945.     strcpy (temp_filename + len, "ccXXXXXX");
  1946.   
  1947. --- 1130,1154 ----
  1948.   #endif
  1949.         if (base == (char *)0)
  1950.       {
  1951. + #ifdef amigados
  1952. +       base = "ram:";
  1953. + #else
  1954.         if (access ("/usr/tmp", R_OK | W_OK) == 0)
  1955.           base = "/usr/tmp/";
  1956.         else
  1957.           base = "/tmp/";
  1958. + #endif
  1959.       }
  1960.       }
  1961.   
  1962.     len = strlen (base);
  1963. !   temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
  1964.     strcpy (temp_filename, base);
  1965. !   if (len > 0 && temp_filename[len-1] != '/'
  1966. ! #ifdef amigados
  1967. !                         && temp_filename[len-1] != ':'
  1968. ! #endif
  1969. !                                     )
  1970.       temp_filename[len++] = '/';
  1971.     strcpy (temp_filename + len, "ccXXXXXX");
  1972.   
  1973. ***************
  1974. *** 1210,1215 ****
  1975. --- 1222,1228 ----
  1976.     int suffix_len = (machine_suffix) ? strlen (machine_suffix) : 0;
  1977.     int first_time = TRUE;
  1978.     struct prefix_list *pprefix;
  1979. +   char path_sep[] = { PATH_SEPARATOR, 0 };
  1980.   
  1981.     obstack_grow (&collect_obstack, env_var, strlen (env_var));
  1982.   
  1983. ***************
  1984. *** 1220,1226 ****
  1985.         if (machine_suffix)
  1986.       {
  1987.         if (!first_time)
  1988. !         obstack_grow (&collect_obstack, ":", 1);
  1989.           
  1990.         first_time = FALSE;
  1991.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  1992. --- 1233,1239 ----
  1993.         if (machine_suffix)
  1994.       {
  1995.         if (!first_time)
  1996. !         obstack_grow (&collect_obstack, path_sep, 1);
  1997.           
  1998.         first_time = FALSE;
  1999.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  2000. ***************
  2001. *** 1230,1236 ****
  2002.         if (just_machine_suffix && pprefix->require_machine_suffix == 2)
  2003.       {
  2004.         if (!first_time)
  2005. !         obstack_grow (&collect_obstack, ":", 1);
  2006.           
  2007.         first_time = FALSE;
  2008.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  2009. --- 1243,1249 ----
  2010.         if (just_machine_suffix && pprefix->require_machine_suffix == 2)
  2011.       {
  2012.         if (!first_time)
  2013. !         obstack_grow (&collect_obstack, path_sep, 1);
  2014.           
  2015.         first_time = FALSE;
  2016.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  2017. ***************
  2018. *** 1240,1246 ****
  2019.         if (!pprefix->require_machine_suffix)
  2020.       {
  2021.         if (!first_time)
  2022. !         obstack_grow (&collect_obstack, ":", 1);
  2023.   
  2024.         first_time = FALSE;
  2025.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  2026. --- 1253,1259 ----
  2027.         if (!pprefix->require_machine_suffix)
  2028.       {
  2029.         if (!first_time)
  2030. !         obstack_grow (&collect_obstack, path_sep, 1);
  2031.   
  2032.         first_time = FALSE;
  2033.         obstack_grow (&collect_obstack, pprefix->prefix, len);
  2034. ***************
  2035. *** 1273,1279 ****
  2036.   
  2037.     /* Determine the filename to execute (special case for absolute paths).  */
  2038.   
  2039. !   if (*name == '/')
  2040.       {
  2041.         if (access (name, mode))
  2042.       {
  2043. --- 1286,1296 ----
  2044.   
  2045.     /* Determine the filename to execute (special case for absolute paths).  */
  2046.   
  2047. !   if (*name == '/'
  2048. ! #ifdef amigados
  2049. !           || index (name, ':')
  2050. ! #endif
  2051. !                     )
  2052.       {
  2053.         if (access (name, mode))
  2054.       {
  2055. ***************
  2056. *** 1479,1484 ****
  2057. --- 1496,1502 ----
  2058.      NOT_LAST is nonzero if this is not the last subcommand
  2059.      (i.e. its output should be piped to the next one.)  */
  2060.   
  2061. + #ifndef PEXECUTE
  2062.   #ifndef OS2
  2063.   #ifdef __MSDOS__
  2064.   
  2065. ***************
  2066. *** 1625,1630 ****
  2067. --- 1643,1649 ----
  2068.     return (search_flag ? spawnv : spawnvp) (1, program, argv);
  2069.   }
  2070.   #endif /* not OS2 */
  2071. + #endif /* !defined (PEXECUTE) */
  2072.   
  2073.   /* Execute the command specified by the arguments on the current line of spec.
  2074.      When using pipes, this includes several piped-together commands
  2075. ***************
  2076. *** 1719,1727 ****
  2077. --- 1738,1752 ----
  2078.       {
  2079.         char *string = commands[i].argv[0];
  2080.   
  2081. + #ifdef PEXECUTE
  2082. +       commands[i].pid = PEXECUTE (string != commands[i].prog,
  2083. +                   string, commands[i].argv,
  2084. +                   i + 1 < n_commands);
  2085. + #else
  2086.         commands[i].pid = pexecute (string != commands[i].prog,
  2087.                     string, commands[i].argv,
  2088.                     i + 1 < n_commands);
  2089. + #endif
  2090.   
  2091.         if (string != commands[i].prog)
  2092.       free (string);
  2093. ***************
  2094. *** 1742,1752 ****
  2095. --- 1767,1781 ----
  2096.       int pid;
  2097.       char *prog;
  2098.   
  2099. + #ifdef PEXECUTE_RESULT
  2100. +     pid = PEXECUTE_RESULT (status, commands[i]);
  2101. + #else /* PEXECUTE_RESULT */
  2102.   #ifdef __MSDOS__
  2103.           status = pid = commands[i].pid;
  2104.   #else
  2105.       pid = wait (&status);
  2106.   #endif
  2107. + #endif /* PEXECUTE_RESULT */
  2108.       if (pid < 0)
  2109.         abort ();
  2110.   
  2111. ***************
  2112. *** 1853,1858 ****
  2113. --- 1882,1888 ----
  2114.         if (*endp == PATH_SEPARATOR || *endp == 0)
  2115.           {
  2116.             strncpy (nstore, startp, endp-startp);
  2117. + #ifndef amigados
  2118.             if (endp == startp)
  2119.           {
  2120.             strcpy (nstore, "./");
  2121. ***************
  2122. *** 1864,1869 ****
  2123. --- 1894,1908 ----
  2124.           }
  2125.             else
  2126.           nstore[endp-startp] = 0;
  2127. + #else
  2128. +           if (endp[-1] != '/' && endp[-1] != ':')
  2129. +         {
  2130. +           nstore[endp-startp] = '/';
  2131. +           nstore[endp-startp+1] = 0;
  2132. +         }
  2133. +           else
  2134. +         nstore[endp-startp] = 0;
  2135. + #endif
  2136.             add_prefix (&exec_prefix, nstore, 0, 0, NULL_PTR);
  2137.             if (*endp == 0)
  2138.           break;
  2139. ***************
  2140. *** 1886,1891 ****
  2141. --- 1925,1931 ----
  2142.         if (*endp == PATH_SEPARATOR || *endp == 0)
  2143.           {
  2144.             strncpy (nstore, startp, endp-startp);
  2145. + #ifndef amigados
  2146.             if (endp == startp)
  2147.           {
  2148.             strcpy (nstore, "./");
  2149. ***************
  2150. *** 1897,1902 ****
  2151. --- 1937,1951 ----
  2152.           }
  2153.             else
  2154.           nstore[endp-startp] = 0;
  2155. + #else
  2156. +           if (endp[-1] != '/' && endp[-1] != ':')
  2157. +         {
  2158. +           nstore[endp-startp] = '/';
  2159. +           nstore[endp-startp+1] = 0;
  2160. +         }
  2161. +           else
  2162. +         nstore[endp-startp] = 0;
  2163. + #endif
  2164.             add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
  2165.             /* Make separate list of dirs that came from LIBRARY_PATH.  */
  2166.             add_prefix (&library_prefix, nstore, 0, 0, NULL_PTR);
  2167. ***************
  2168. *** 1922,1927 ****
  2169. --- 1971,1977 ----
  2170.         if (*endp == PATH_SEPARATOR || *endp == 0)
  2171.           {
  2172.             strncpy (nstore, startp, endp-startp);
  2173. + #ifndef amigados
  2174.             if (endp == startp)
  2175.           {
  2176.             strcpy (nstore, "./");
  2177. ***************
  2178. *** 1933,1938 ****
  2179. --- 1983,1997 ----
  2180.           }
  2181.             else
  2182.           nstore[endp-startp] = 0;
  2183. + #else
  2184. +           if (endp[-1] != '/' && endp[-1] != ':')
  2185. +         {
  2186. +           nstore[endp-startp] = '/';
  2187. +           nstore[endp-startp+1] = 0;
  2188. +         }
  2189. +           else
  2190. +         nstore[endp-startp] = 0;
  2191. + #endif
  2192.             add_prefix (&startfile_prefix, nstore, 0, 0, NULL_PTR);
  2193.             /* Make separate list of dirs that came from LIBRARY_PATH.  */
  2194.             add_prefix (&library_prefix, nstore, 0, 0, NULL_PTR);
  2195. ***************
  2196. *** 3433,3442 ****
  2197. --- 3492,3505 ----
  2198.         register char *p;
  2199.         int len;
  2200.   
  2201. + #ifdef FILE_NAME_NONDIRECTORY
  2202. +       input_basename = FILE_NAME_NONDIRECTORY (input_filename);
  2203. + #else
  2204.         input_basename = input_filename;
  2205.         for (p = input_filename; *p; p++)
  2206.           if (*p == '/')
  2207.             input_basename = p + 1;
  2208. + #endif
  2209.   
  2210.         /* Find a suffix starting with the last period,
  2211.            and set basename_length to exclude that suffix.  */
  2212. ***************
  2213. *** 3675,3681 ****
  2214.     char *s;
  2215.   
  2216.     if (errno < sys_nerr)
  2217. !     s = concat ("%s: ", sys_errlist[errno], "");
  2218.     else
  2219.       s = "cannot open %s";
  2220.     fatal (s, name);
  2221. --- 3738,3744 ----
  2222.     char *s;
  2223.   
  2224.     if (errno < sys_nerr)
  2225. !     s = concat ("%s: ", strerror (errno), "");
  2226.     else
  2227.       s = "cannot open %s";
  2228.     fatal (s, name);
  2229. ***************
  2230. *** 3688,3694 ****
  2231.     char *s;
  2232.   
  2233.     if (errno < sys_nerr)
  2234. !     s = concat ("%s: ", sys_errlist[errno], "");
  2235.     else
  2236.       s = "cannot open %s";
  2237.     error (s, name);
  2238. --- 3751,3757 ----
  2239.     char *s;
  2240.   
  2241.     if (errno < sys_nerr)
  2242. !     s = concat ("%s: ", strerror (errno), "");
  2243.     else
  2244.       s = "cannot open %s";
  2245.     error (s, name);
  2246. ***************
  2247. *** 3702,3708 ****
  2248.   
  2249.     if (errno < sys_nerr)
  2250.       s = concat ("installation problem, cannot exec %s: ",
  2251. !         sys_errlist[errno], "");
  2252.     else
  2253.       s = "installation problem, cannot exec %s";
  2254.     error (s, name);
  2255. --- 3765,3771 ----
  2256.   
  2257.     if (errno < sys_nerr)
  2258.       s = concat ("installation problem, cannot exec %s: ",
  2259. !         strerror (errno), "");
  2260.     else
  2261.       s = "installation problem, cannot exec %s";
  2262.     error (s, name);
  2263. diff -rc --new-file gcc-2.3.3-fsf/genconfig.c gcc-2.3.3-amiga/genconfig.c
  2264. *** gcc-2.3.3-fsf/genconfig.c    Tue Oct 13 04:11:48 1992
  2265. --- gcc-2.3.3-amiga/genconfig.c    Sun Nov 21 21:52:00 1993
  2266. ***************
  2267. *** 303,310 ****
  2268. --- 303,318 ----
  2269.     printf ("/* Generated automatically by the program `genconfig'\n\
  2270.   from the machine description file `md'.  */\n\n");
  2271.   
  2272. + #ifdef amigados
  2273. +   /* this constant probably better be 14 in general, or a cross compiling
  2274. +      host might choke on some amigados header files... */
  2275. +   /* Allow at least 14 operands for the sake of asm constructs.  */
  2276. +   max_recog_operands = 14;
  2277. + #else
  2278.     /* Allow at least 10 operands for the sake of asm constructs.  */
  2279.     max_recog_operands = 9;  /* We will add 1 later.  */
  2280. + #endif
  2281.     max_dup_operands = 1;
  2282.   
  2283.     /* Read the machine description.  */
  2284. diff -rc --new-file gcc-2.3.3-fsf/gstdarg.h gcc-2.3.3-amiga/gstdarg.h
  2285. *** gcc-2.3.3-fsf/gstdarg.h    Mon Nov 30 23:06:24 1992
  2286. --- gcc-2.3.3-amiga/gstdarg.h    Mon Nov 22 07:35:50 1993
  2287. ***************
  2288. *** 138,141 ****
  2289. --- 138,147 ----
  2290.   
  2291.   #endif /* __GNUC__ */
  2292.   #endif /* not _ANSI_STDARG_H_ */
  2293. + #ifdef amigados
  2294. + # ifndef _VA_LIST
  2295. + #  define _VA_LIST
  2296. +    typedef __gnuc_va_list va_list;
  2297. + # endif
  2298. + #endif /* amigados */
  2299.   #endif /* not _STDARG_H */
  2300. diff -rc --new-file gcc-2.3.3-fsf/gstddef.h gcc-2.3.3-amiga/gstddef.h
  2301. *** gcc-2.3.3-fsf/gstddef.h    Sun Nov 22 22:03:34 1992
  2302. --- gcc-2.3.3-amiga/gstddef.h    Mon Nov 22 21:16:59 1993
  2303. ***************
  2304. *** 2,7 ****
  2305. --- 2,47 ----
  2306.   #ifndef _STDDEF_H_
  2307.   #ifndef _ANSI_STDDEF_H
  2308.   
  2309. + #ifdef amigados
  2310. + /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
  2311. +    just as well. The system headers are ANSI compliant, the used compiler IS
  2312. +    gcc, so it's really ok to use the system header, no reason to hassle
  2313. +    with a jungle of ifdefs. Besides, amigados is only defined if compiling
  2314. +    with host=amigados, it doesn't apply if compiling with target=amigados
  2315. +    on a different host with possibly different system headers. Same thing
  2316. +    would apply to gstdarg.h and gvarargs.h, but those headers are more
  2317. +    easily fixable than this one and I'm sick of writing the same comment
  2318. +    there as well. MW
  2319. +    Include the contents of <stddef.h> inline rather than with a #include,
  2320. +    to avoid infinite include recursion when this file is installed in
  2321. +    gcc's include directory as stddef.h.  (fnf)  */
  2322. + #define _STDDEF_H_
  2323. + #include <machine/ansi.h>
  2324. + typedef    _PTRDIFF_T_    ptrdiff_t;
  2325. + #ifdef    _SIZE_T_
  2326. + typedef    _SIZE_T_    size_t;
  2327. + #undef    _SIZE_T_
  2328. + #endif
  2329. + #ifdef    _WCHAR_T_
  2330. + typedef    _WCHAR_T_    wchar_t;
  2331. + #undef    _WCHAR_T_
  2332. + #endif
  2333. + #ifndef    NULL
  2334. + #define    NULL    0
  2335. + #endif
  2336. + #define    offsetof(type, member)    ((size_t)(&((type *)0)->member))
  2337. + #else /* not amigados */
  2338.   /* Any one of these symbols __need_* means that GNU libc
  2339.      wants us just to define one data type.  So don't define
  2340.      the symbols that indicate this file's entire job has been done.  */
  2341. ***************
  2342. *** 146,151 ****
  2343. --- 186,193 ----
  2344.   #ifndef __WCHAR_TYPE__
  2345.   #define __WCHAR_TYPE__ int
  2346.   #endif
  2347. + #endif /* not amigados */
  2348.   #ifdef __GNUG__
  2349.   /* In C++, wchar_t is a distinct basic type,
  2350.      and we can expect __wchar_t to be defined by cc1plus.  */
  2351. diff -rc --new-file gcc-2.3.3-fsf/gvarargs.h gcc-2.3.3-amiga/gvarargs.h
  2352. *** gcc-2.3.3-fsf/gvarargs.h    Mon Nov 30 23:07:12 1992
  2353. --- gcc-2.3.3-amiga/gvarargs.h    Mon Nov 22 22:16:04 1993
  2354. ***************
  2355. *** 136,142 ****
  2356.   #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____)
  2357.   /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  2358.   #ifndef _VA_LIST
  2359. ! #if !(defined (__BSD_NET2__) || defined (____386BSD____))
  2360.   #define _VA_LIST_
  2361.   #endif
  2362.   #define _VA_LIST
  2363. --- 136,142 ----
  2364.   #if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____)
  2365.   /* The macro _VA_LIST is used in SCO Unix 3.2.  */
  2366.   #ifndef _VA_LIST
  2367. ! #if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__amigados__))
  2368.   #define _VA_LIST_
  2369.   #endif
  2370.   #define _VA_LIST
  2371. ***************
  2372. *** 151,155 ****
  2373. --- 151,162 ----
  2374.   #ifdef _BSD_VA_LIST
  2375.   #undef _BSD_VA_LIST
  2376.   #endif
  2377. + #ifdef amigados
  2378. + # ifndef _VA_LIST
  2379. + #  define _VA_LIST
  2380. +    typedef __gnuc_va_list va_list;
  2381. + # endif
  2382. + #endif /* amigados */
  2383.   
  2384.   #endif /* __GNUC__ */
  2385. diff -rc --new-file gcc-2.3.3-fsf/machmode.h gcc-2.3.3-amiga/machmode.h
  2386. *** gcc-2.3.3-fsf/machmode.h    Sun Aug  2 02:59:22 1992
  2387. --- gcc-2.3.3-amiga/machmode.h    Sun Nov 21 21:52:16 1993
  2388. ***************
  2389. *** 83,89 ****
  2390.   
  2391.   /* Get the name of mode MODE as a string.  */
  2392.   
  2393. ! extern char *mode_name[];
  2394.   #define GET_MODE_NAME(MODE)        (mode_name[(int)(MODE)])
  2395.   
  2396.   enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
  2397. --- 83,89 ----
  2398.   
  2399.   /* Get the name of mode MODE as a string.  */
  2400.   
  2401. ! extern char * const mode_name[];
  2402.   #define GET_MODE_NAME(MODE)        (mode_name[(int)(MODE)])
  2403.   
  2404.   enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT, MODE_PARTIAL_INT, MODE_CC,
  2405. ***************
  2406. *** 92,108 ****
  2407.   /* Get the general kind of object that mode MODE represents
  2408.      (integer, floating, complex, etc.)  */
  2409.   
  2410. ! extern enum mode_class mode_class[];
  2411.   #define GET_MODE_CLASS(MODE)        (mode_class[(int)(MODE)])
  2412.   
  2413.   /* Get the size in bytes of an object of mode MODE.  */
  2414.   
  2415. ! extern int mode_size[];
  2416.   #define GET_MODE_SIZE(MODE)        (mode_size[(int)(MODE)])
  2417.   
  2418.   /* Get the size in bytes of the basic parts of an object of mode MODE.  */
  2419.   
  2420. ! extern int mode_unit_size[];
  2421.   #define GET_MODE_UNIT_SIZE(MODE)    (mode_unit_size[(int)(MODE)])
  2422.   
  2423.   /* Get the number of units in the object.  */
  2424. --- 92,108 ----
  2425.   /* Get the general kind of object that mode MODE represents
  2426.      (integer, floating, complex, etc.)  */
  2427.   
  2428. ! extern const enum mode_class mode_class[];
  2429.   #define GET_MODE_CLASS(MODE)        (mode_class[(int)(MODE)])
  2430.   
  2431.   /* Get the size in bytes of an object of mode MODE.  */
  2432.   
  2433. ! extern const int mode_size[];
  2434.   #define GET_MODE_SIZE(MODE)        (mode_size[(int)(MODE)])
  2435.   
  2436.   /* Get the size in bytes of the basic parts of an object of mode MODE.  */
  2437.   
  2438. ! extern const int mode_unit_size[];
  2439.   #define GET_MODE_UNIT_SIZE(MODE)    (mode_unit_size[(int)(MODE)])
  2440.   
  2441.   /* Get the number of units in the object.  */
  2442. ***************
  2443. *** 124,130 ****
  2444.   
  2445.   /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).  */
  2446.   
  2447. ! extern enum machine_mode mode_wider_mode[];
  2448.   #define GET_MODE_WIDER_MODE(MODE)    (mode_wider_mode[(int)(MODE)])
  2449.   
  2450.   /* Return the mode for data of a given size SIZE and mode class CLASS.
  2451. --- 124,130 ----
  2452.   
  2453.   /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).  */
  2454.   
  2455. ! extern const enum machine_mode mode_wider_mode[];
  2456.   #define GET_MODE_WIDER_MODE(MODE)    (mode_wider_mode[(int)(MODE)])
  2457.   
  2458.   /* Return the mode for data of a given size SIZE and mode class CLASS.
  2459. diff -rc --new-file gcc-2.3.3-fsf/objc/Makefile gcc-2.3.3-amiga/objc/Makefile
  2460. *** gcc-2.3.3-fsf/objc/Makefile    Tue Nov  3 10:32:47 1992
  2461. --- gcc-2.3.3-amiga/objc/Makefile    Mon Nov 22 08:05:11 1993
  2462. ***************
  2463. *** 40,46 ****
  2464.   
  2465.   core.o: core.c $(OBJC_H) $(HASH_H) $(srcdir)/gstddef.h
  2466.   hash.o: hash.c $(OBJC_H) $(HASH_H) $(srcdir)/gstddef.h
  2467. ! object.o: object.m object.h $(OBJC_H)
  2468.       $(GCC_FOR_TARGET) -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
  2469.   
  2470.   mostlyclean:
  2471. --- 40,46 ----
  2472.   
  2473.   core.o: core.c $(OBJC_H) $(HASH_H) $(srcdir)/gstddef.h
  2474.   hash.o: hash.c $(OBJC_H) $(HASH_H) $(srcdir)/gstddef.h
  2475. ! object.o: $(srcdir)/objc/object.m $(srcdir)/objc/object.h $(OBJC_H)
  2476.       $(GCC_FOR_TARGET) -c $(GCC_CFLAGS) $(SUBDIR_INCLUDES) $<
  2477.   
  2478.   mostlyclean:
  2479. diff -rc --new-file gcc-2.3.3-fsf/print-tree.c gcc-2.3.3-amiga/print-tree.c
  2480. *** gcc-2.3.3-fsf/print-tree.c    Sat Oct 24 00:09:26 1992
  2481. --- gcc-2.3.3-amiga/print-tree.c    Sun Nov 21 21:52:21 1993
  2482. ***************
  2483. *** 24,30 ****
  2484.   
  2485.   extern char **tree_code_name;
  2486.   
  2487. ! extern char *mode_name[];
  2488.   
  2489.   void print_node ();
  2490.   void indent_to ();
  2491. --- 24,30 ----
  2492.   
  2493.   extern char **tree_code_name;
  2494.   
  2495. ! extern char *const mode_name[];
  2496.   
  2497.   void print_node ();
  2498.   void indent_to ();
  2499. diff -rc --new-file gcc-2.3.3-fsf/protoize.c gcc-2.3.3-amiga/protoize.c
  2500. *** gcc-2.3.3-fsf/protoize.c    Tue Dec 22 07:21:04 1992
  2501. --- gcc-2.3.3-amiga/protoize.c    Sun Nov 21 21:52:30 1993
  2502. ***************
  2503. *** 78,84 ****
  2504. --- 78,87 ----
  2505.   #undef getopt
  2506.   
  2507.   extern int errno;
  2508. + #ifndef HAVE_STRERROR
  2509.   extern char *sys_errlist[];
  2510. + #define strerror(err) sys_errlist[err]
  2511. + #endif
  2512.   extern char *version_string;
  2513.   
  2514.   /* Systems which are compatible only with POSIX 1003.1-1988 (but *not*
  2515. ***************
  2516. *** 776,783 ****
  2517. --- 779,791 ----
  2518.   {
  2519.     struct default_include *p;
  2520.   
  2521. + #ifdef FILE_NAME_ABSOLUTE_P
  2522. +   if (! FILE_NAME_ABSOLUTE_P (path))
  2523. +     abort ();
  2524. + #else
  2525.     if (path[0] != '/')
  2526.       abort ();        /* Must be an absolutized filename.  */
  2527. + #endif
  2528.   
  2529.     for (p = include_defaults; p->fname; p++)
  2530.       if (!strncmp (path, p->fname, strlen (p->fname))
  2531. ***************
  2532. *** 1204,1210 ****
  2533. --- 1212,1222 ----
  2534.     {
  2535.       const char *src_p;
  2536.   
  2537. + #ifdef FILE_NAME_ABSOLUTE_P
  2538. +     if (! FILE_NAME_ABSOLUTE_P (rel_filename))
  2539. + #else
  2540.       if (rel_filename[0] != '/')
  2541. + #endif
  2542.         {
  2543.           src_p = cwd2;
  2544.           while (*endp++ = *src_p++)
  2545. ***************
  2546. *** 1406,1412 ****
  2547.             if (my_stat (filename, &stat_buf) == -1)
  2548.               {
  2549.                 fprintf (stderr, "%s: %s: can't get status: %s\n",
  2550. !                pname, shortpath (NULL, filename), sys_errlist[errno]);
  2551.                 stat_buf.st_mtime = (time_t) -1;
  2552.               }
  2553.           }
  2554. --- 1418,1424 ----
  2555.             if (my_stat (filename, &stat_buf) == -1)
  2556.               {
  2557.                 fprintf (stderr, "%s: %s: can't get status: %s\n",
  2558. !                pname, shortpath (NULL, filename), strerror (errno));
  2559.                 stat_buf.st_mtime = (time_t) -1;
  2560.               }
  2561.           }
  2562. ***************
  2563. *** 1467,1472 ****
  2564. --- 1479,1503 ----
  2565.     return ++q;
  2566.   }
  2567.   
  2568. + /* Use this macro to advance a char * over the filename part in a line
  2569. +    read from an aux-info file. */
  2570. + #ifndef amigados
  2571. + /* Version for file systems where the colon has no special meaning */
  2572. + #define ADVANCE_PAST_FILENAME(CP) \
  2573. +   while (* (CP) != ':') (CP)++
  2574. + #else
  2575. + /* Have to heuristically decide whether the colon is part of the filename
  2576. +    or whether it serves to delimit the filename from the line number. If
  2577. +    it's the latter case, then the character following the colon *must*
  2578. +    be a digit. Note that this heuristic fails if the filename starts
  2579. +    with a digit. */
  2580. + #define ADVANCE_PAST_FILENAME(CP) \
  2581. +     while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
  2582. +       (CP)++;
  2583. + #endif
  2584.   /* Given a line from  an aux info file, and a time at which the aux info
  2585.      file it came from was created, check to see if the item described in
  2586.      the line comes from a file which has been modified since the aux info
  2587. ***************
  2588. *** 1488,1495 ****
  2589.     {
  2590.       const char *filename_start = p = l + 3;
  2591.   
  2592. !     while (*p != ':')
  2593. !       p++;
  2594.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2595.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2596.       filename[p-filename_start] = '\0';
  2597. --- 1519,1525 ----
  2598.     {
  2599.       const char *filename_start = p = l + 3;
  2600.   
  2601. !     ADVANCE_PAST_FILENAME (p);
  2602.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2603.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2604.       filename[p-filename_start] = '\0';
  2605. ***************
  2606. *** 1546,1553 ****
  2607.       const char *filename_start = p = l + 3;
  2608.       char *filename;
  2609.   
  2610. !     while (*p != ':')
  2611. !       p++;
  2612.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2613.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2614.       filename[p-filename_start] = '\0';
  2615. --- 1576,1582 ----
  2616.       const char *filename_start = p = l + 3;
  2617.       char *filename;
  2618.   
  2619. !     ADVANCE_PAST_FILENAME (p);
  2620.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  2621.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  2622.       filename[p-filename_start] = '\0';
  2623. ***************
  2624. *** 2000,2006 ****
  2625.         if (child_pid == -1)
  2626.           {
  2627.             fprintf (stderr, "%s: could not fork process: %s\n",
  2628. !            pname, sys_errlist[errno]);
  2629.             return 0;
  2630.           }
  2631.   
  2632. --- 2029,2035 ----
  2633.         if (child_pid == -1)
  2634.           {
  2635.             fprintf (stderr, "%s: could not fork process: %s\n",
  2636. !            pname, strerror (errno));
  2637.             return 0;
  2638.           }
  2639.   
  2640. ***************
  2641. *** 2028,2034 ****
  2642.           if (wait (&wait_status) == -1)
  2643.             {
  2644.               fprintf (stderr, "%s: wait failed: %s\n",
  2645. !              pname, sys_errlist[errno]);
  2646.               return 0;
  2647.             }
  2648.       if ((wait_status & 0x7F) != 0)
  2649. --- 2057,2063 ----
  2650.           if (wait (&wait_status) == -1)
  2651.             {
  2652.               fprintf (stderr, "%s: wait failed: %s\n",
  2653. !              pname, strerror (errno));
  2654.               return 0;
  2655.             }
  2656.       if ((wait_status & 0x7F) != 0)
  2657. ***************
  2658. *** 2055,2061 ****
  2659.         write (f, ": ", 2);
  2660.         write (f, compile_params[0], strlen (compile_params[0]));
  2661.         write (f, ": ", 2);
  2662. !       write (f, sys_errlist[e], strlen (sys_errlist[e]));
  2663.         write (f, "\n", 1);
  2664.             _exit (1);
  2665.           }
  2666. --- 2084,2090 ----
  2667.         write (f, ": ", 2);
  2668.         write (f, compile_params[0], strlen (compile_params[0]));
  2669.         write (f, ": ", 2);
  2670. !       write (f, strerror (e), strlen (strerror (e)));
  2671.         write (f, "\n", 1);
  2672.             _exit (1);
  2673.           }
  2674. ***************
  2675. *** 2115,2121 ****
  2676.       {
  2677.         fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
  2678.              pname, shortpath (NULL, aux_info_filename),
  2679. !            sys_errlist[errno]);
  2680.         errors++;
  2681.         return;
  2682.       }
  2683. --- 2144,2150 ----
  2684.       {
  2685.         fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
  2686.              pname, shortpath (NULL, aux_info_filename),
  2687. !            strerror (errno));
  2688.         errors++;
  2689.         return;
  2690.       }
  2691. ***************
  2692. *** 2143,2149 ****
  2693.       {
  2694.         fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
  2695.              pname, shortpath (NULL, aux_info_filename),
  2696. !            sys_errlist[errno]);
  2697.         errors++;
  2698.         return;
  2699.       }
  2700. --- 2172,2178 ----
  2701.       {
  2702.         fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
  2703.              pname, shortpath (NULL, aux_info_filename),
  2704. !            strerror (errno));
  2705.         errors++;
  2706.         return;
  2707.       }
  2708. ***************
  2709. *** 2158,2164 ****
  2710.         {
  2711.           fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
  2712.            pname, shortpath (NULL, aux_info_filename),
  2713. !          sys_errlist[errno]);
  2714.           errors++;
  2715.           return;
  2716.         }
  2717. --- 2187,2193 ----
  2718.         {
  2719.           fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
  2720.            pname, shortpath (NULL, aux_info_filename),
  2721. !          strerror (errno));
  2722.           errors++;
  2723.           return;
  2724.         }
  2725. ***************
  2726. *** 2185,2191 ****
  2727.         {
  2728.           fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
  2729.                pname, shortpath (NULL, base_source_filename),
  2730. !              sys_errlist[errno]);
  2731.           errors++;
  2732.           return;
  2733.         }
  2734. --- 2214,2220 ----
  2735.         {
  2736.           fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
  2737.                pname, shortpath (NULL, base_source_filename),
  2738. !              strerror (errno));
  2739.           errors++;
  2740.           return;
  2741.         }
  2742. ***************
  2743. *** 2206,2212 ****
  2744.         {
  2745.           fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n",
  2746.            pname, shortpath (NULL, aux_info_filename),
  2747. !          sys_errlist[errno]);
  2748.           return;
  2749.         }
  2750.     
  2751. --- 2235,2241 ----
  2752.         {
  2753.           fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n",
  2754.            pname, shortpath (NULL, aux_info_filename),
  2755. !          strerror (errno));
  2756.           return;
  2757.         }
  2758.     
  2759. ***************
  2760. *** 2222,2228 ****
  2761.         {
  2762.           fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
  2763.            pname, shortpath (NULL, aux_info_filename),
  2764. !          sys_errlist[errno]);
  2765.           free (aux_info_base);
  2766.           close (aux_info_file);
  2767.           return;
  2768. --- 2251,2257 ----
  2769.         {
  2770.           fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
  2771.            pname, shortpath (NULL, aux_info_filename),
  2772. !          strerror (errno));
  2773.           free (aux_info_base);
  2774.           close (aux_info_file);
  2775.           return;
  2776. ***************
  2777. *** 2234,2240 ****
  2778.         {
  2779.           fprintf (stderr, "%s: error closing aux info file `%s': %s\n",
  2780.            pname, shortpath (NULL, aux_info_filename),
  2781. !          sys_errlist[errno]);
  2782.           free (aux_info_base);
  2783.           close (aux_info_file);
  2784.           return;
  2785. --- 2263,2269 ----
  2786.         {
  2787.           fprintf (stderr, "%s: error closing aux info file `%s': %s\n",
  2788.            pname, shortpath (NULL, aux_info_filename),
  2789. !          strerror (errno));
  2790.           free (aux_info_base);
  2791.           close (aux_info_file);
  2792.           return;
  2793. ***************
  2794. *** 2248,2254 ****
  2795.       if (my_unlink (aux_info_filename) == -1)
  2796.         fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
  2797.              pname, shortpath (NULL, aux_info_filename),
  2798. !            sys_errlist[errno]);
  2799.   
  2800.     /* Save a pointer into the first line of the aux_info file which
  2801.        contains the filename of the directory from which the compiler
  2802. --- 2277,2283 ----
  2803.       if (my_unlink (aux_info_filename) == -1)
  2804.         fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
  2805.              pname, shortpath (NULL, aux_info_filename),
  2806. !            strerror (errno));
  2807.   
  2808.     /* Save a pointer into the first line of the aux_info file which
  2809.        contains the filename of the directory from which the compiler
  2810. ***************
  2811. *** 2260,2266 ****
  2812.     {
  2813.       char *p = aux_info_base;
  2814.   
  2815. !     while (*p != ':')
  2816.         p++;
  2817.       p++;
  2818.       while (*p == ' ')
  2819. --- 2289,2297 ----
  2820.     {
  2821.       char *p = aux_info_base;
  2822.   
  2823. !     /* have to make sure at least one space is following the colon to make
  2824. !        sure the colon is not part of the filename */
  2825. !     while (*p != ':' && p[1] != ' ')
  2826.         p++;
  2827.       p++;
  2828.       while (*p == ' ')
  2829. ***************
  2830. *** 2274,2280 ****
  2831. --- 2305,2315 ----
  2832.         continue;
  2833.       aux_info_second_line = p;
  2834.       aux_info_relocated_name = 0;
  2835. + #ifdef FILE_NAME_ABSOLUTE_P
  2836. +     if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
  2837. + #else
  2838.       if (invocation_filename[0] != '/')
  2839. + #endif
  2840.         {
  2841.       /* INVOCATION_FILENAME is relative;
  2842.          append it to BASE_SOURCE_FILENAME's dir.  */
  2843. ***************
  2844. *** 2314,2320 ****
  2845.                     {
  2846.                       fprintf (stderr, "%s: can't delete file `%s': %s\n",
  2847.                    pname, shortpath (NULL, aux_info_filename),
  2848. !                  sys_errlist[errno]);
  2849.                       return;
  2850.                     }
  2851.                   goto start_over;
  2852. --- 2349,2355 ----
  2853.                     {
  2854.                       fprintf (stderr, "%s: can't delete file `%s': %s\n",
  2855.                    pname, shortpath (NULL, aux_info_filename),
  2856. !                  strerror (errno));
  2857.                       return;
  2858.                     }
  2859.                   goto start_over;
  2860. ***************
  2861. *** 2362,2368 ****
  2862.   #ifndef UNPROTOIZE
  2863.   
  2864.   /* Check an individual filename for a .c suffix.  If the filename has this
  2865. !    suffix, rename the file such that its suffix is changed to .C.  This
  2866.      function implements the -C option.  */
  2867.   
  2868.   static void
  2869. --- 2397,2403 ----
  2870.   #ifndef UNPROTOIZE
  2871.   
  2872.   /* Check an individual filename for a .c suffix.  If the filename has this
  2873. !    suffix, rename the file such that its suffix is changed to .cc.  This
  2874.      function implements the -C option.  */
  2875.   
  2876.   static void
  2877. ***************
  2878. *** 2371,2377 ****
  2879.   {
  2880.     const char *filename = hp->symbol;
  2881.     int last_char_index = strlen (filename) - 1;
  2882. !   char *const new_filename = (char *) alloca (strlen (filename) + 1);
  2883.   
  2884.     /* Note that we don't care here if the given file was converted or not.  It
  2885.        is possible that the given file was *not* converted, simply because there
  2886. --- 2406,2412 ----
  2887.   {
  2888.     const char *filename = hp->symbol;
  2889.     int last_char_index = strlen (filename) - 1;
  2890. !   char *const new_filename = (char *) alloca (strlen (filename) + 2);
  2891.   
  2892.     /* Note that we don't care here if the given file was converted or not.  It
  2893.        is possible that the given file was *not* converted, simply because there
  2894. ***************
  2895. *** 2383,2395 ****
  2896.       return;
  2897.   
  2898.     strcpy (new_filename, filename);
  2899. !   new_filename[last_char_index] = 'C';
  2900.   
  2901.     if (my_link (filename, new_filename) == -1)
  2902.       {
  2903.         fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n",
  2904.              pname, shortpath (NULL, filename),
  2905. !            shortpath (NULL, new_filename), sys_errlist[errno]);
  2906.         errors++;
  2907.         return;
  2908.       }
  2909. --- 2418,2447 ----
  2910.       return;
  2911.   
  2912.     strcpy (new_filename, filename);
  2913. !   strcat (new_filename + last_char_index, "cc");
  2914.   
  2915. +   /* use rename(2) if available !! Update config files to include HAVE_rename
  2916. +      if the used OS provides it. Advantages are: it's atomic, it's one
  2917. +      system call compared to two. */
  2918. + #ifdef HAVE_rename
  2919. +   /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
  2920. +      to be changed to `my_rename' as well. */
  2921. +   if (rename (filename, new_filename) == -1)
  2922. +     {
  2923. +       fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
  2924. +            pname, shortpath (NULL, filename),
  2925. +            shortpath (NULL, new_filename), strerror (errno));
  2926. +       errors++;
  2927. +       return;
  2928. +     }
  2929. + #else
  2930.     if (my_link (filename, new_filename) == -1)
  2931.       {
  2932.         fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n",
  2933.              pname, shortpath (NULL, filename),
  2934. !            shortpath (NULL, new_filename), strerror (errno));
  2935.         errors++;
  2936.         return;
  2937.       }
  2938. ***************
  2939. *** 2397,2406 ****
  2940.     if (my_unlink (filename) == -1)
  2941.       {
  2942.         fprintf (stderr, "%s: warning: can't delete file `%s': %s\n",
  2943. !            pname, shortpath (NULL, filename), sys_errlist[errno]);
  2944.         errors++;
  2945.         return;
  2946.       }
  2947.   }
  2948.   
  2949.   #endif /* !defined (UNPROTOIZE) */
  2950. --- 2449,2459 ----
  2951.     if (my_unlink (filename) == -1)
  2952.       {
  2953.         fprintf (stderr, "%s: warning: can't delete file `%s': %s\n",
  2954. !            pname, shortpath (NULL, filename), strerror (errno));
  2955.         errors++;
  2956.         return;
  2957.       }
  2958. + #endif
  2959.   }
  2960.   
  2961.   #endif /* !defined (UNPROTOIZE) */
  2962. ***************
  2963. *** 4093,4099 ****
  2964.     if (my_stat ((char *)convert_filename, &stat_buf) == -1)
  2965.       {
  2966.         fprintf (stderr, "%s: can't get status for file `%s': %s\n",
  2967. !            pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
  2968.         return;
  2969.       }
  2970.     orig_size = stat_buf.st_size;
  2971. --- 4146,4152 ----
  2972.     if (my_stat ((char *)convert_filename, &stat_buf) == -1)
  2973.       {
  2974.         fprintf (stderr, "%s: can't get status for file `%s': %s\n",
  2975. !            pname, shortpath (NULL, convert_filename), strerror (errno));
  2976.         return;
  2977.       }
  2978.     orig_size = stat_buf.st_size;
  2979. ***************
  2980. *** 4128,4134 ****
  2981.         {
  2982.           fprintf (stderr, "%s: can't open file `%s' for reading: %s\n",
  2983.            pname, shortpath (NULL, convert_filename),
  2984. !          sys_errlist[errno]);
  2985.           return;
  2986.         }
  2987.   
  2988. --- 4181,4187 ----
  2989.         {
  2990.           fprintf (stderr, "%s: can't open file `%s' for reading: %s\n",
  2991.            pname, shortpath (NULL, convert_filename),
  2992. !          strerror (errno));
  2993.           return;
  2994.         }
  2995.   
  2996. ***************
  2997. *** 4141,4147 ****
  2998.           close (input_file);
  2999.           fprintf (stderr, "\n%s: error reading input file `%s': %s\n",
  3000.            pname, shortpath (NULL, convert_filename),
  3001. !          sys_errlist[errno]);
  3002.           return;
  3003.         }
  3004.   
  3005. --- 4194,4200 ----
  3006.           close (input_file);
  3007.           fprintf (stderr, "\n%s: error reading input file `%s': %s\n",
  3008.            pname, shortpath (NULL, convert_filename),
  3009. !          strerror (errno));
  3010.           return;
  3011.         }
  3012.   
  3013. ***************
  3014. *** 4174,4180 ****
  3015.         {
  3016.           fprintf (stderr, "%s: can't create/open clean file `%s': %s\n",
  3017.            pname, shortpath (NULL, clean_filename),
  3018. !          sys_errlist[errno]);
  3019.           return;
  3020.         }
  3021.     
  3022. --- 4227,4233 ----
  3023.         {
  3024.           fprintf (stderr, "%s: can't create/open clean file `%s': %s\n",
  3025.            pname, shortpath (NULL, clean_filename),
  3026. !          strerror (errno));
  3027.           return;
  3028.         }
  3029.     
  3030. ***************
  3031. *** 4182,4188 ****
  3032.     
  3033.       if (write (clean_file, new_clean_text_base, clean_size) != clean_size)
  3034.         fprintf (stderr, "%s: error writing file `%s': %s\n",
  3035. !            pname, shortpath (NULL, clean_filename), sys_errlist[errno]);
  3036.     
  3037.       close (clean_file);
  3038.     }
  3039. --- 4235,4241 ----
  3040.     
  3041.       if (write (clean_file, new_clean_text_base, clean_size) != clean_size)
  3042.         fprintf (stderr, "%s: error writing file `%s': %s\n",
  3043. !            pname, shortpath (NULL, clean_filename), strerror (errno));
  3044.     
  3045.       close (clean_file);
  3046.     }
  3047. ***************
  3048. *** 4285,4291 ****
  3049.                  pname,
  3050.                  shortpath (NULL, convert_filename),
  3051.                  shortpath (NULL, new_filename),
  3052. !                sys_errlist[errno]);
  3053.                 return;
  3054.               }
  3055.           }
  3056. --- 4338,4344 ----
  3057.                  pname,
  3058.                  shortpath (NULL, convert_filename),
  3059.                  shortpath (NULL, new_filename),
  3060. !                strerror (errno));
  3061.                 return;
  3062.               }
  3063.           }
  3064. ***************
  3065. *** 4294,4300 ****
  3066.     if (my_unlink (convert_filename) == -1)
  3067.       {
  3068.         fprintf (stderr, "%s: can't delete file `%s': %s\n",
  3069. !            pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
  3070.         return;
  3071.       }
  3072.   
  3073. --- 4347,4353 ----
  3074.     if (my_unlink (convert_filename) == -1)
  3075.       {
  3076.         fprintf (stderr, "%s: can't delete file `%s': %s\n",
  3077. !            pname, shortpath (NULL, convert_filename), strerror (errno));
  3078.         return;
  3079.       }
  3080.   
  3081. ***************
  3082. *** 4307,4313 ****
  3083.         {
  3084.           fprintf (stderr, "%s: can't create/open output file `%s': %s\n",
  3085.            pname, shortpath (NULL, convert_filename),
  3086. !          sys_errlist[errno]);
  3087.           return;
  3088.         }
  3089.     
  3090. --- 4360,4366 ----
  3091.         {
  3092.           fprintf (stderr, "%s: can't create/open output file `%s': %s\n",
  3093.            pname, shortpath (NULL, convert_filename),
  3094. !          strerror (errno));
  3095.           return;
  3096.         }
  3097.     
  3098. ***************
  3099. *** 4319,4325 ****
  3100.         if (write (output_file, repl_text_base, out_size) != out_size)
  3101.           fprintf (stderr, "%s: error writing file `%s': %s\n",
  3102.            pname, shortpath (NULL, convert_filename),
  3103. !          sys_errlist[errno]);
  3104.       }
  3105.     
  3106.       close (output_file);
  3107. --- 4372,4378 ----
  3108.         if (write (output_file, repl_text_base, out_size) != out_size)
  3109.           fprintf (stderr, "%s: error writing file `%s': %s\n",
  3110.            pname, shortpath (NULL, convert_filename),
  3111. !          strerror (errno));
  3112.       }
  3113.     
  3114.       close (output_file);
  3115. ***************
  3116. *** 4336,4342 ****
  3117.     /* The cast avoids an erroneous warning on AIX.  */
  3118.     if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1)
  3119.       fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
  3120. !          pname, shortpath (NULL, convert_filename), sys_errlist[errno]);
  3121.   
  3122.     /* Note:  We would try to change the owner and group of the output file
  3123.        to match those of the input file here, except that may not be a good
  3124. --- 4389,4395 ----
  3125.     /* The cast avoids an erroneous warning on AIX.  */
  3126.     if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1)
  3127.       fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
  3128. !          pname, shortpath (NULL, convert_filename), strerror (errno));
  3129.   
  3130.     /* Note:  We would try to change the owner and group of the output file
  3131.        to match those of the input file here, except that may not be a good
  3132. ***************
  3133. *** 4479,4485 ****
  3134.     if (!cwd_buffer)
  3135.       {
  3136.         fprintf (stderr, "%s: cannot get working directory: %s\n",
  3137. !            pname, sys_errlist[errno]);
  3138.         exit (1);
  3139.       }
  3140.   
  3141. --- 4532,4538 ----
  3142.     if (!cwd_buffer)
  3143.       {
  3144.         fprintf (stderr, "%s: cannot get working directory: %s\n",
  3145. !            pname, strerror (errno));
  3146.         exit (1);
  3147.       }
  3148.   
  3149. diff -rc --new-file gcc-2.3.3-fsf/rtl.c gcc-2.3.3-amiga/rtl.c
  3150. *** gcc-2.3.3-fsf/rtl.c    Sat Sep 19 19:33:11 1992
  3151. --- gcc-2.3.3-amiga/rtl.c    Sun Nov 21 21:52:35 1993
  3152. ***************
  3153. *** 49,55 ****
  3154.   
  3155.   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   NAME ,
  3156.   
  3157. ! char *rtx_name[] = {
  3158.   #include "rtl.def"        /* rtl expressions are documented here */
  3159.   };
  3160.   
  3161. --- 49,55 ----
  3162.   
  3163.   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   NAME ,
  3164.   
  3165. ! char * const rtx_name[] = {
  3166.   #include "rtl.def"        /* rtl expressions are documented here */
  3167.   };
  3168.   
  3169. ***************
  3170. *** 60,66 ****
  3171.   
  3172.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  NAME,
  3173.   
  3174. ! char *mode_name[(int) MAX_MACHINE_MODE] = {
  3175.   #include "machmode.def"
  3176.   
  3177.   #ifdef EXTRA_CC_MODES
  3178. --- 60,66 ----
  3179.   
  3180.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  NAME,
  3181.   
  3182. ! char * const mode_name[(int) MAX_MACHINE_MODE] = {
  3183.   #include "machmode.def"
  3184.   
  3185.   #ifdef EXTRA_CC_MODES
  3186. ***************
  3187. *** 76,82 ****
  3188.   
  3189.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  CLASS,
  3190.   
  3191. ! enum mode_class mode_class[(int) MAX_MACHINE_MODE] = {
  3192.   #include "machmode.def"
  3193.   };
  3194.   
  3195. --- 76,82 ----
  3196.   
  3197.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  CLASS,
  3198.   
  3199. ! const enum mode_class mode_class[(int) MAX_MACHINE_MODE] = {
  3200.   #include "machmode.def"
  3201.   };
  3202.   
  3203. ***************
  3204. *** 87,93 ****
  3205.   
  3206.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  SIZE,
  3207.   
  3208. ! int mode_size[(int) MAX_MACHINE_MODE] = {
  3209.   #include "machmode.def"
  3210.   };
  3211.   
  3212. --- 87,93 ----
  3213.   
  3214.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  SIZE,
  3215.   
  3216. ! const int mode_size[(int) MAX_MACHINE_MODE] = {
  3217.   #include "machmode.def"
  3218.   };
  3219.   
  3220. ***************
  3221. *** 98,104 ****
  3222.   
  3223.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  UNIT,
  3224.   
  3225. ! int mode_unit_size[(int) MAX_MACHINE_MODE] = {
  3226.   #include "machmode.def"        /* machine modes are documented here */
  3227.   };
  3228.   
  3229. --- 98,104 ----
  3230.   
  3231.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  UNIT,
  3232.   
  3233. ! const int mode_unit_size[(int) MAX_MACHINE_MODE] = {
  3234.   #include "machmode.def"        /* machine modes are documented here */
  3235.   };
  3236.   
  3237. ***************
  3238. *** 111,117 ****
  3239.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  \
  3240.     (enum machine_mode) WIDER,
  3241.   
  3242. ! enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = {
  3243.   #include "machmode.def"        /* machine modes are documented here */
  3244.   };
  3245.   
  3246. --- 111,117 ----
  3247.   #define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER)  \
  3248.     (enum machine_mode) WIDER,
  3249.   
  3250. ! const enum machine_mode mode_wider_mode[(int) MAX_MACHINE_MODE] = {
  3251.   #include "machmode.def"        /* machine modes are documented here */
  3252.   };
  3253.   
  3254. ***************
  3255. *** 130,136 ****
  3256.      rtx's of that code.  The sequence is a C string in which
  3257.      each character describes one operand.  */
  3258.   
  3259. ! char *rtx_format[] = {
  3260.     /* "*" undefined.
  3261.            can cause a warning message
  3262.        "0" field is unused (or used in a phase-dependent manner)
  3263. --- 130,136 ----
  3264.      rtx's of that code.  The sequence is a C string in which
  3265.      each character describes one operand.  */
  3266.   
  3267. ! char *const rtx_format[] = {
  3268.     /* "*" undefined.
  3269.            can cause a warning message
  3270.        "0" field is unused (or used in a phase-dependent manner)
  3271. ***************
  3272. *** 161,167 ****
  3273.   /* Indexed by rtx code, gives a character representing the "class" of
  3274.      that rtx code.  See rtl.def for documentation on the defined classes.  */
  3275.   
  3276. ! char rtx_class[] = {
  3277.   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   CLASS, 
  3278.   #include "rtl.def"        /* rtl expressions are defined here */
  3279.   #undef DEF_RTL_EXPR
  3280. --- 161,167 ----
  3281.   /* Indexed by rtx code, gives a character representing the "class" of
  3282.      that rtx code.  See rtl.def for documentation on the defined classes.  */
  3283.   
  3284. ! const char rtx_class[] = {
  3285.   #define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   CLASS, 
  3286.   #include "rtl.def"        /* rtl expressions are defined here */
  3287.   #undef DEF_RTL_EXPR
  3288. ***************
  3289. *** 169,175 ****
  3290.   
  3291.   /* Names for kinds of NOTEs and REG_NOTEs.  */
  3292.   
  3293. ! char *note_insn_name[] = { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED",
  3294.                  "NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
  3295.                  "NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
  3296.                  "NOTE_INSN_FUNCTION_END", "NOTE_INSN_SETJMP",
  3297. --- 169,176 ----
  3298.   
  3299.   /* Names for kinds of NOTEs and REG_NOTEs.  */
  3300.   
  3301. ! char * const note_insn_name[] = 
  3302. !              { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED",
  3303.                  "NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END",
  3304.                  "NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END",
  3305.                  "NOTE_INSN_FUNCTION_END", "NOTE_INSN_SETJMP",
  3306. ***************
  3307. *** 177,183 ****
  3308.                  "NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
  3309.                  "NOTE_INSN_DELETED_LABEL"};
  3310.   
  3311. ! char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
  3312.                 "REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
  3313.                 "REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
  3314.                 "REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
  3315. --- 178,185 ----
  3316.                  "NOTE_INSN_PROLOGUE_END", "NOTE_INSN_EPILOGUE_BEG",
  3317.                  "NOTE_INSN_DELETED_LABEL"};
  3318.   
  3319. ! char * const reg_note_name[] = 
  3320. !             { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0",
  3321.                 "REG_EQUAL", "REG_RETVAL", "REG_LIBCALL",
  3322.                 "REG_NONNEG", "REG_NO_CONFLICT", "REG_UNUSED",
  3323.                 "REG_CC_SETTER", "REG_CC_USER", "REG_LABEL",
  3324. diff -rc --new-file gcc-2.3.3-fsf/rtl.h gcc-2.3.3-amiga/rtl.h
  3325. *** gcc-2.3.3-fsf/rtl.h    Sun Dec 13 01:42:19 1992
  3326. --- gcc-2.3.3-amiga/rtl.h    Sun Nov 21 21:52:40 1993
  3327. ***************
  3328. *** 42,54 ****
  3329.   extern int rtx_length[];
  3330.   #define GET_RTX_LENGTH(CODE)        (rtx_length[(int)(CODE)])
  3331.   
  3332. ! extern char *rtx_name[];
  3333.   #define GET_RTX_NAME(CODE)        (rtx_name[(int)(CODE)])
  3334.   
  3335. ! extern char *rtx_format[];
  3336.   #define GET_RTX_FORMAT(CODE)        (rtx_format[(int)(CODE)])
  3337.   
  3338. ! extern char rtx_class[];
  3339.   #define GET_RTX_CLASS(CODE)        (rtx_class[(int)(CODE)])
  3340.   
  3341.   /* Common union for an element of an rtx.  */
  3342. --- 42,54 ----
  3343.   extern int rtx_length[];
  3344.   #define GET_RTX_LENGTH(CODE)        (rtx_length[(int)(CODE)])
  3345.   
  3346. ! extern char * const rtx_name[];
  3347.   #define GET_RTX_NAME(CODE)        (rtx_name[(int)(CODE)])
  3348.   
  3349. ! extern char * const rtx_format[];
  3350.   #define GET_RTX_FORMAT(CODE)        (rtx_format[(int)(CODE)])
  3351.   
  3352. ! extern const char rtx_class[];
  3353.   #define GET_RTX_CLASS(CODE)        (rtx_class[(int)(CODE)])
  3354.   
  3355.   /* Common union for an element of an rtx.  */
  3356. ***************
  3357. *** 328,334 ****
  3358.   
  3359.   /* Names for REG_NOTE's in EXPR_LIST insn's.  */
  3360.   
  3361. ! extern char *reg_note_name[];
  3362.   #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
  3363.   
  3364.   /* The label-number of a code-label.  The assembler label
  3365. --- 328,334 ----
  3366.   
  3367.   /* Names for REG_NOTE's in EXPR_LIST insn's.  */
  3368.   
  3369. ! extern char *const reg_note_name[];
  3370.   #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
  3371.   
  3372.   /* The label-number of a code-label.  The assembler label
  3373. ***************
  3374. *** 396,402 ****
  3375.   
  3376.   /* Names for NOTE insn's other than line numbers.  */
  3377.   
  3378. ! extern char *note_insn_name[];
  3379.   #define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
  3380.   
  3381.   /* The name of a label, in case it corresponds to an explicit label
  3382. --- 396,402 ----
  3383.   
  3384.   /* Names for NOTE insn's other than line numbers.  */
  3385.   
  3386. ! extern char *const note_insn_name[];
  3387.   #define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
  3388.   
  3389.   /* The name of a label, in case it corresponds to an explicit label
  3390. diff -rc --new-file gcc-2.3.3-fsf/toplev.c gcc-2.3.3-amiga/toplev.c
  3391. *** gcc-2.3.3-fsf/toplev.c    Sun Nov 22 21:20:25 1992
  3392. --- gcc-2.3.3-amiga/toplev.c    Sun Nov 21 21:52:47 1993
  3393. ***************
  3394. *** 472,477 ****
  3395. --- 472,478 ----
  3396.     {"unroll-all-loops", &flag_unroll_all_loops, 1},
  3397.     {"writable-strings", &flag_writable_strings, 1},
  3398.     {"peephole", &flag_no_peephole, 0},
  3399. +   {"large-baserel", &flag_pic, 4},
  3400.     {"force-mem", &flag_force_mem, 1},
  3401.     {"force-addr", &flag_force_addr, 1},
  3402.     {"function-cse", &flag_no_function_cse, 0},
  3403. ***************
  3404. *** 489,494 ****
  3405. --- 490,496 ----
  3406.     {"schedule-insns2", &flag_schedule_insns_after_reload, 1},
  3407.     {"pic", &flag_pic, 1},
  3408.     {"PIC", &flag_pic, 2},
  3409. +   {"baserel", &flag_pic, 3},
  3410.     {"fast-math", &flag_fast_math, 1},
  3411.     {"common", &flag_no_common, 0},
  3412.     {"inhibit-size-directive", &flag_inhibit_size_directive, 1},
  3413. ***************
  3414. *** 1453,1458 ****
  3415. --- 1455,1463 ----
  3416.        FILE *asm_file;
  3417.        char *input_name;
  3418.   {
  3419. + #ifdef FILE_NAME_NONDIRECTORY
  3420. +   char *na = FILE_NAME_NONDIRECTORY (input_name);
  3421. + #else
  3422.     int len = strlen (input_name);
  3423.     char *na = input_name + len;
  3424.   
  3425. ***************
  3426. *** 1463,1468 ****
  3427. --- 1468,1474 ----
  3428.       break;
  3429.         na--;
  3430.       }
  3431. + #endif
  3432.   
  3433.   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
  3434.     ASM_OUTPUT_MAIN_SOURCE_FILENAME (asm_file, na);
  3435. ***************
  3436. *** 3286,3291 ****
  3437. --- 3292,3298 ----
  3438.   
  3439.   #ifndef OS2
  3440.   #ifndef VMS
  3441. + #ifndef amigados
  3442.     if (flag_print_mem)
  3443.       {
  3444.         char *lim = (char *) sbrk (0);
  3445. ***************
  3446. *** 3300,3305 ****
  3447. --- 3307,3313 ----
  3448.         system ("ps v");
  3449.   #endif /* not USG */
  3450.       }
  3451. + #endif /* not amigados */
  3452.   #endif /* not VMS */
  3453.   #endif /* not OS2 */
  3454.   
  3455. diff -rc --new-file gcc-2.3.3-fsf/tree.c gcc-2.3.3-amiga/tree.c
  3456. *** gcc-2.3.3-fsf/tree.c    Thu Oct 22 12:00:22 1992
  3457. --- gcc-2.3.3-amiga/tree.c    Sun Nov 21 21:52:53 1993
  3458. ***************
  3459. *** 246,252 ****
  3460.   /* Unique id for next decl created.  */
  3461.   static int next_decl_uid;
  3462.   
  3463. ! extern char *mode_name[];
  3464.   
  3465.   void gcc_obstack_init ();
  3466.   static tree stabilize_reference_1 ();
  3467. --- 246,252 ----
  3468.   /* Unique id for next decl created.  */
  3469.   static int next_decl_uid;
  3470.   
  3471. ! extern char *const mode_name[];
  3472.   
  3473.   void gcc_obstack_init ();
  3474.   static tree stabilize_reference_1 ();
  3475.