home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GCC258_1.LHA / gcc / src-patches / gcc-2.5.8-amiga.diffs
Encoding:
Text File  |  1994-02-10  |  102.6 KB  |  3,243 lines

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