home *** CD-ROM | disk | FTP | other *** search
/ ftp.mayn.de / ftp.mayn.de-pub.zip / ftp.mayn.de-pub / apple / apple_unix_2 / gcc-2.7.2.aux.diffs.gz / gcc-2.7.2.aux.diffs
Text File  |  1995-12-11  |  32KB  |  938 lines

  1. *** /dev/null    Tue Dec  5 13:52:55 1995
  2. --- ./README.AUX    Tue Dec  5 09:41:49 1995
  3. ***************
  4. *** 0 ****
  5. --- 1,75 ----
  6. + This file details the diffs, patches and new files needed to allow GNU gcc
  7. + to support A/UX. Most of these are required due to the hybrid nature of
  8. + A/UX (UNIX and MacOS) and some are simply to describe A/UX itself. Builds
  9. + of gcc for A/UX require 'gas' (at least 1.38.1) and a previously built
  10. + version of 'gcc'. Check the A/UX FAQ for sites that carry these.
  11. +     * Makefile.in (libgcc2.a): Allow object files in LIB2FUNCS_EXTRA
  12. +     so that objects needing special processing can be added.
  13. +     * c-lex.c (readescape, yylex): Provide support for the pascal
  14. +     strings used by Mac programmers.
  15. +     * c-lex.c (yylex): Conditionally do not produce a warning for
  16. +     multi-character constants under A/UX.
  17. +     * m68k/aux-exit.c: New file.  Provides _exithk() stub for MacOS
  18. +     * m68k/aux-crtfix.c: New file. Provide tool to patch MacOS mcrt files
  19. +     * m68k/aux-mcount.asm: New file.  Hook into A/UX profiling.
  20. +     * m68k/aux.h, m68k/x-aux, m68k/xm-aux.h: New files.
  21. +     * m68k/m68k.c (use_return_insn): A/UX returns pointers in %a0 --
  22. +     don't use return insn when returning a pointer.
  23. +     * gcc.c (process_command): A/UX's 'ld' requires a space
  24. +     between after '-o' but no space after '-L'
  25. +     * libgcc2.c: Add in _exithk() stub to exit() call.
  26. +     * configure, config.guess, config.sub: Recognize A/UX.
  27. +     * fixincludes: Fix A/UX's <sys/param.h>.
  28. +     * aux-fixcrts: New file. Uses aux-crtfix to fix MacOS mcrt files.
  29. + These patches follow the tradition of placing the gcc executable in
  30. + '/usr/local/Gnu' and the support files in '/usr/local/Gnu/lib/gcc/aux'
  31. + To build A/UX the procedure is quite easy and follows the general 'gcc'
  32. + methods. However, the previously built version of 'gas' must be placed
  33. + at the top-level source directory and called 'as'. If you're kinda lazy,
  34. + you do this in the top-level directory of the gcc-2.7.2 source tree:
  35. +     % cp <gas's home>gas as
  36. +     % patch < gcc4aux.diffs
  37. +     % ./configure --prefix=/usr/local/Gnu aux
  38. +     % make CC="<pathname to gcc>"
  39. +     % make stage1
  40. +     % make CC="stage1/xgcc -Bstage1/"
  41. +     % make stage2
  42. +     % make CC="stage2/xgcc -Bstage2/"
  43. +     % make CC="stage2/xgcc -Bstage2/" compare
  44. +     % make CC="stage2/xgcc -Bstage2/" install
  45. +     % make CC="stage2/xgcc -Bstage2/" objc-runtime
  46. +     % make CC="stage2/xgcc -Bstage2/" install-libobjc
  47. + Finally, when built, it is recommended that you run 'aux-fixcrts' to
  48. + patch the MacOS mcrt files to work under 'gcc' if you will be creating
  49. + MacOS-hybrid programs. The command-line is:
  50. +     % sh aux-fixcrts /usr/local/Gnu/lib/gcc/aux/2.7.2
  51. + Enjoy!
  52. + NOTE: These patches are the result of work of a lot of contributors including:
  53. +       David W. Berry (formerly @ Apple)
  54. +       John Coolidge (@ Apple)
  55. +       Richard Henderson
  56. +       Jim Jagielski
  57. + --
  58. + #include <std/disclaimer.h>
  59. +   |     Jim Jagielski      |  jim@jagubox.gsfc.nasa.gov  |  V: 301 286-5964  |
  60. +   | NASA/GSFC, Code 734.4  |     Greenbelt, MD 20771     |  F: 301 286-1719  |
  61. +      << This sig is a figment of your imagination; SEEK MENTAL HELP !! >>
  62. *** /dev/null    Tue Dec  5 13:52:55 1995
  63. --- ./COMPILE.gcc.aux    Mon Nov 20 07:12:34 1995
  64. ***************
  65. *** 0 ****
  66. --- 1,26 ----
  67. + #!/bin/ksh
  68. + #
  69. + # Just compile gcc
  70. + #
  71. + ./configure --prefix=/usr/local/Gnu aux
  72. + make CC=$GNU/gcc
  73. + print " "
  74. + print "======================"
  75. + print "= Doing stage2 build ="
  76. + print "======================"
  77. + make stage1
  78. + ln as stage1/as
  79. + make CC="stage1/xgcc -Bstage1/"
  80. + print " "
  81. + print "======================"
  82. + print "= Doing stage3 build ="
  83. + print "======================"
  84. + make stage2
  85. + ln as stage2/as
  86. + make CC="stage2/xgcc -Bstage2/"
  87. + print " "
  88. + print "======================"
  89. + print "= Doing gcc compare  ="
  90. + print "======================"
  91. + make CC="stage2/xgcc -Bstage2/" compare
  92. + exit
  93. *** /dev/null    Tue Dec  5 13:52:55 1995
  94. --- ./aux-fixcrts    Tue Dec  5 09:41:36 1995
  95. ***************
  96. *** 0 ****
  97. --- 1,18 ----
  98. + #! /bin/sh
  99. + CRTDIR=${1-${CRTDIR-/usr/local/Gnu/lib/gcc/aux/2.7.2}}
  100. + files=`echo /lib/*crt*.o /usr/lib/*crt*.o`
  101. + cp $files $CRTDIR
  102. + for file in $files; do
  103. +     lfile=$CRTDIR/`basename $file`
  104. +     ./aux-crtfix $lfile
  105. +     fixout=`cmp $file $lfile`
  106. +     if [ $? = 0 ]; then
  107. +         rm $lfile
  108. +     else
  109. +         echo Fixed `basename $file`
  110. +     fi
  111. + done
  112. *** /usr2/src/ORIGS/gcc-2.7.2/./Makefile.in    Tue Dec  5 09:35:58 1995
  113. --- ./Makefile.in    Tue Dec  5 09:34:08 1995
  114. ***************
  115. *** 47,54 ****
  116.   # to the stage2 and stage3 compilations
  117.   # XCFLAGS is used for most compilations but not when using the GCC just built.
  118.   XCFLAGS =
  119. ! CFLAGS = -g
  120. ! BOOT_CFLAGS = -O $(CFLAGS)
  121.   # These exists to be overridden by the x-* and t-* files, respectively.
  122.   X_CFLAGS =
  123.   T_CFLAGS =
  124. --- 47,54 ----
  125.   # to the stage2 and stage3 compilations
  126.   # XCFLAGS is used for most compilations but not when using the GCC just built.
  127.   XCFLAGS =
  128. ! CFLAGS = -O2
  129. ! BOOT_CFLAGS = -O2 $(CFLAGS)
  130.   # These exists to be overridden by the x-* and t-* files, respectively.
  131.   X_CFLAGS =
  132.   T_CFLAGS =
  133. ***************
  134. *** 181,187 ****
  135.   srcdir = .
  136.   # Common prefix for installation directories.
  137.   # NOTE: This directory must exist when you start installation.
  138. ! prefix = /usr/local
  139.   # Directory in which to put localized header files. On the systems with
  140.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  141.   # `/usr'.
  142. --- 181,187 ----
  143.   srcdir = .
  144.   # Common prefix for installation directories.
  145.   # NOTE: This directory must exist when you start installation.
  146. ! prefix = /usr/local/Gnu
  147.   # Directory in which to put localized header files. On the systems with
  148.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  149.   # `/usr'.
  150. ***************
  151. *** 190,200 ****
  152.   # Directory in which to put host dependent programs and libraries
  153.   exec_prefix = $(prefix)
  154.   # Directory in which to put the executable for the command `gcc'
  155. ! bindir = $(exec_prefix)/bin
  156.   # Directory in which to put the directories used by the compiler.
  157.   libdir = $(exec_prefix)/lib
  158.   # Directory in which the compiler finds executables, libraries, etc.
  159. ! libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  160.   # Directory in which the compiler finds g++ includes.
  161.   gxx_include_dir= $(libdir)/g++-include
  162.   # Directory to search for site-specific includes.
  163. --- 190,200 ----
  164.   # Directory in which to put host dependent programs and libraries
  165.   exec_prefix = $(prefix)
  166.   # Directory in which to put the executable for the command `gcc'
  167. ! bindir = $(exec_prefix)
  168.   # Directory in which to put the directories used by the compiler.
  169.   libdir = $(exec_prefix)/lib
  170.   # Directory in which the compiler finds executables, libraries, etc.
  171. ! libsubdir = $(libdir)/gcc/$(target)/$(version)
  172.   # Directory in which the compiler finds g++ includes.
  173.   gxx_include_dir= $(libdir)/g++-include
  174.   # Directory to search for site-specific includes.
  175. ***************
  176. *** 887,902 ****
  177.       for file in .. $(LIB2FUNCS_EXTRA); \
  178.       do \
  179.         if [ x$${file} != x.. ]; then \
  180. !         name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//'`; \
  181.           oname=` echo $${name} | sed -e 's,.*/,,'`; \
  182.           echo $${name}; \
  183. !         if [ $${name}.asm = $${file} ]; then \
  184. !           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  185. !         else true; fi; \
  186. !         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  187. !         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  188. !         $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
  189. !         rm -f $${name}.s $${oname}$(objext); \
  190.         else true; \
  191.         fi; \
  192.       done
  193. --- 887,906 ----
  194.       for file in .. $(LIB2FUNCS_EXTRA); \
  195.       do \
  196.         if [ x$${file} != x.. ]; then \
  197. !         name=`echo $${file} | sed -e 's/[.][cS]$$//' -e 's/[.]asm$$//' -e 's/\$(objext)$$//'`; \
  198.           oname=` echo $${name} | sed -e 's,.*/,,'`; \
  199.           echo $${name}; \
  200. !         if [ $${name}$(objext) = $${file} ]; then \
  201. !           $(AR) $(AR_FLAGS) tmplibgcc2.a $${file}; \
  202. !         else \
  203. !           if [ $${name}.asm = $${file} ]; then \
  204. !             cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  205. !           else true; fi; \
  206. !           $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  207. !           if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  208. !           $(AR) $(AR_FLAGS) tmplibgcc2.a $${oname}$(objext); \
  209. !           rm -f $${name}.s $${oname}$(objext); \
  210. !         fi; \
  211.         else true; \
  212.         fi; \
  213.       done
  214. ***************
  215. *** 1135,1141 ****
  216.   gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
  217.       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  218.     -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  219. !   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  220.     -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  221.     -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  222.     -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  223. --- 1139,1145 ----
  224.   gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
  225.       $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  226.     -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  227. !   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
  228.     -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  229.     -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  230.     -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  231. ***************
  232. *** 2048,2059 ****
  233.   # Create the installation directory.
  234.   install-dir:
  235.       -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
  236. !     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
  237.   # This dir isn't currently searched by cpp.
  238. ! #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
  239. !     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
  240. !     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi
  241. !     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  242.       -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
  243.       -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
  244.       -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
  245. --- 2052,2063 ----
  246.   # Create the installation directory.
  247.   install-dir:
  248.       -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
  249. !     -if [ -d $(libdir)/gcc ] ; then true ; else mkdir $(libdir)/gcc ; chmod a+rx $(libdir)/gcc ; fi
  250.   # This dir isn't currently searched by cpp.
  251. ! #    -if [ -d $(libdir)/gcc/include ] ; then true ; else mkdir $(libdir)/gcc/include ; chmod a+rx $(libdir)/gcc/include ; fi
  252. !     -if [ -d $(libdir)/gcc/$(target) ] ; then true ; else mkdir $(libdir)/gcc/$(target) ; chmod a+rx $(libdir)/gcc/$(target) ; fi
  253. !     -if [ -d $(libdir)/gcc/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc/$(target)/$(version) ; chmod a+rx $(libdir)/gcc/$(target)/$(version) ; fi
  254. !     -if [ -d $(libdir)/gcc/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc/$(target)/$(version)/include ; fi
  255.       -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
  256.       -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
  257.       -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
  258. *** /usr2/src/ORIGS/gcc-2.7.2/./c-lex.c    Thu Jun 15 07:11:39 1995
  259. --- ./c-lex.c    Mon Nov 20 07:13:38 1995
  260. ***************
  261. *** 848,853 ****
  262. --- 848,861 ----
  263.         if (pedantic)
  264.       pedwarn ("non-ANSI escape sequence `\\%c'", c);
  265.         return c;
  266. + #ifdef AUX_PASCAL_STRINGS
  267. +     /* Return a special code so that the string constructor can leave a
  268. +        hole and patch in the string length later */
  269. +     case 'p':
  270. +       if (pedantic)
  271. +     pedwarn ("non-ANSI escape sequence `\\p'");
  272. +       return -2;
  273. + #endif
  274.       }
  275.     if (c >= 040 && c < 0177)
  276.       pedwarn ("unknown escape sequence `\\%c'", c);
  277. ***************
  278. *** 1729,1736 ****
  279. --- 1737,1746 ----
  280.           num_chars = max_chars;
  281.           error ("character constant too long");
  282.         }
  283. + #ifndef AUX /* Many Mac programs use multi-character constants */
  284.       else if (num_chars != 1 && ! flag_traditional)
  285.         warning ("multi-character character constant");
  286. + #endif
  287.   
  288.       /* If char type is signed, sign-extend the constant.  */
  289.       if (! wide_flag)
  290. ***************
  291. *** 1781,1786 ****
  292. --- 1791,1799 ----
  293.       case '"':
  294.       string_constant:
  295.         {
  296. + #ifdef AUX_PASCAL_STRINGS
  297. +     int pascalstring = FALSE;
  298. + #endif
  299.       c = getc (finput);
  300.       p = token_buffer + 1;
  301.   
  302. ***************
  303. *** 1792,1797 ****
  304. --- 1805,1823 ----
  305.           c = readescape (&ignore);
  306.           if (ignore)
  307.             goto skipnewline;
  308. + #ifdef AUX_PASCAL_STRINGS
  309. +         /* readescape() returns -2 to indicate "\p" */
  310. +         if (c == -2)
  311. +           {
  312. +             if (p == token_buffer + 1)
  313. +               pascalstring = TRUE, c = '\0';
  314. +             else
  315. +               {
  316. +             warning ("ignoring pascal string flag (`\\p') not at beginning of string");
  317. +             c = 'p';
  318. +               }
  319. +           }
  320. + #endif
  321.           if (!wide_flag
  322.               && TYPE_PRECISION (char_type_node) < HOST_BITS_PER_INT
  323.               && c >= (1 << TYPE_PRECISION (char_type_node)))
  324. ***************
  325. *** 1815,1820 ****
  326. --- 1841,1856 ----
  327.   
  328.       if (c < 0)
  329.         error ("Unterminated string constant");
  330. + #ifdef AUX_PASCAL_STRINGS
  331. +     if (pascalstring)
  332. +       {
  333. +         int len;
  334. +         token_buffer[1] = len = p - token_buffer - 2;
  335. +         if (len >= (1 << BITS_PER_UNIT))
  336. +           warning ("Pascal string too long");
  337. +       }
  338. + #endif
  339.   
  340.       /* We have read the entire constant.
  341.          Construct a STRING_CST for the result.  */
  342. *** /usr2/src/ORIGS/gcc-2.7.2/./config.guess    Thu Nov  9 11:29:05 1995
  343. --- ./config.guess    Mon Nov 20 07:13:38 1995
  344. ***************
  345. *** 424,429 ****
  346. --- 424,432 ----
  347.           echo ns32k-sni-sysv
  348.       fi
  349.       exit 0 ;;
  350. +     mc68*:A/UX:*:*)
  351. +     echo m68k-apple-aux${UNAME_RELEASE}
  352. +     exit 0 ;;
  353.   esac
  354.   
  355.   #echo '(No uname command or uname output not recognized.)' 1>&2
  356. *** /usr2/src/ORIGS/gcc-2.7.2/./config.sub    Thu Jun 15 17:01:49 1995
  357. --- ./config.sub    Mon Nov 20 07:13:39 1995
  358. ***************
  359. *** 81,87 ****
  360.       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  361.       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  362.       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  363. !     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
  364.           os=
  365.           basic_machine=$1
  366.           ;;
  367. --- 81,88 ----
  368.       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  369.       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  370.       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  371. !     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  372. !     -apple)
  373.           os=
  374.           basic_machine=$1
  375.           ;;
  376. ***************
  377. *** 190,195 ****
  378. --- 191,200 ----
  379.           basic_machine=m68k-apollo
  380.           os=-sysv
  381.           ;;
  382. +     apple | aux)
  383. +         basic_machine=m68k-apple
  384. +         os=-aux
  385. +         ;;
  386.       balance)
  387.           basic_machine=ns32k-sequent
  388.           os=-dynix
  389. ***************
  390. *** 641,647 ****
  391.             | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
  392.             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
  393.             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  394. !           | -udi* | -eabi* | -lites* )
  395.       # Remember, each alternative MUST END IN *, to match a version number.
  396.           ;;
  397.       -sunos5*)
  398. --- 646,652 ----
  399.             | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
  400.             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
  401.             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  402. !           | -udi* | -eabi* | -lites* | -aux* )
  403.       # Remember, each alternative MUST END IN *, to match a version number.
  404.           ;;
  405.       -sunos5*)
  406. ***************
  407. *** 721,726 ****
  408. --- 726,734 ----
  409.       *-acorn)
  410.           os=-riscix1.2
  411.           ;;
  412. +     m68*-apple)
  413. +         os=-aux
  414. +         ;;
  415.       arm*-semi)
  416.           os=-aout
  417.           ;;
  418. ***************
  419. *** 858,863 ****
  420. --- 866,874 ----
  421.                   ;;
  422.               -vxworks*)
  423.                   vendor=wrs
  424. +                 ;;
  425. +             -aux*)
  426. +                 vendor=apple
  427.                   ;;
  428.           esac
  429.           basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  430. *** /usr2/src/ORIGS/gcc-2.7.2/./configure    Tue Dec  5 09:36:12 1995
  431. --- ./configure    Tue Dec  5 09:34:23 1995
  432. ***************
  433. *** 1544,1549 ****
  434. --- 1544,1558 ----
  435.           # The real one comes with the Linux C library.
  436.           #extra_parts="crtbegin.o crtend.o"
  437.           ;;
  438. +     m68k-apple-aux*)        # Apple Macintosh running A/UX
  439. +         xm_file=m68k/xm-aux.h
  440. +         tm_file=m68k/aux.h
  441. +         xmake_file=m68k/x-aux
  442. +         broken_install=yes
  443. +         use_collect2=yes
  444. +         install_headers_dir=install-headers-cpio
  445. +         extra_headers=math-68881.h
  446. +         ;;
  447.       m88k-dg-dgux*)
  448.           case $machine in
  449.             m88k-dg-dguxbcs*)
  450. *** /usr2/src/ORIGS/gcc-2.7.2/./fixincludes    Tue Dec  5 09:36:19 1995
  451. --- ./fixincludes    Tue Dec  5 09:34:34 1995
  452. ***************
  453. *** 2465,2470 ****
  454. --- 2465,2488 ----
  455.     fi
  456.   fi
  457.       
  458. + # This file in A/UX 3.0.x/3.1.x contains an __asm directive for c89; gcc
  459. + # doesn't understand it.
  460. + file=sys/param.h
  461. + if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
  462. +   cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
  463. +   chmod +w ${LIB}/$file 2>/dev/null
  464. +   chmod a+r ${LIB}/$file 2>/dev/null
  465. + fi
  466. + if [ -r ${LIB}/$file ]; then
  467. +   echo "Fixing __asm directive in sys/param.h"
  468. +   sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' \
  469. +     ${LIB}/$file > ${LIB}/${file}.sed
  470. +   rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
  471. +   if cmp $file ${LIB}/$file >/dev/null 2>&1; then
  472. +     rm -f ${LIB}/$file
  473. +   fi
  474. + fi
  475.   
  476.   # This loop does not appear to do anything, because it uses file
  477.   # rather than $file when setting target.  It also appears to be
  478. *** /usr2/src/ORIGS/gcc-2.7.2/./gcc.c    Tue Sep 12 17:15:11 1995
  479. --- ./gcc.c    Mon Nov 20 07:13:44 1995
  480. ***************
  481. *** 2878,2888 ****
  482. --- 2878,2896 ----
  483.             /* Null-terminate the vector.  */
  484.             switches[n_switches].args[j] = 0;
  485.           }
  486. + #ifdef AUX
  487. +       else if (c == 'o')
  488. +         {
  489. +           /* On A/UX, ld cannot handle -o without space.
  490. +          So split the -o from its argument.  */
  491. +           switches[n_switches].part1 = "o";
  492. + #else
  493.         else if (*switches_need_spaces != 0 && (c == 'o' || c == 'L'))
  494.           {
  495.             /* On some systems, ld cannot handle -o or -L without space.
  496.            So split the -o or -L from its argument.  */
  497.             switches[n_switches].part1 = (c == 'o' ? "o" : "L");
  498. + #endif
  499.             switches[n_switches].args = (char **) xmalloc (2 * sizeof (char *));
  500.             switches[n_switches].args[0] = xmalloc (strlen (p));
  501.             strcpy (switches[n_switches].args[0], &p[1]);
  502. *** /usr2/src/ORIGS/gcc-2.7.2/./libgcc2.c    Tue Dec  5 09:36:23 1995
  503. --- ./libgcc2.c    Tue Dec  5 09:34:40 1995
  504. ***************
  505. *** 2190,2196 ****
  506. --- 2190,2200 ----
  507.   extern void __do_global_dtors ();
  508.   extern void _cleanup ();
  509.   extern void _exit () __attribute__ ((noreturn));
  510. + #ifdef AUX
  511. + extern void _exithk ();
  512. + #endif
  513.   
  514.   void 
  515.   exit (status)
  516.        int status;
  517. ***************
  518. *** 2202,2207 ****
  519. --- 2206,2214 ----
  520.     EXIT_BODY;
  521.   #else
  522.     _cleanup ();
  523. + #ifdef AUX
  524. +   _exithk();
  525. + #endif
  526.   #endif
  527.     _exit (status);
  528.   }
  529. *** /usr2/src/ORIGS/gcc-2.7.2/./config/m68k/m68k.c    Thu Sep 28 14:00:17 1995
  530. --- ./config/m68k/m68k.c    Mon Nov 20 07:13:50 1995
  531. ***************
  532. *** 256,262 ****
  533.   {
  534.     int regno;
  535.   
  536. !   if (!reload_completed || frame_pointer_needed || get_frame_size () != 0)
  537.       return 0;
  538.     
  539.     /* Copied from output_function_epilogue ().  We should probably create a
  540. --- 256,266 ----
  541.   {
  542.     int regno;
  543.   
  544. !   if (!reload_completed || frame_pointer_needed || get_frame_size () != 0
  545. ! #ifdef AUX
  546. !       || current_function_returns_pointer
  547. ! #endif
  548. !       )
  549.       return 0;
  550.     
  551.     /* Copied from output_function_epilogue ().  We should probably create a
  552. *** /dev/null    Tue Dec  5 13:52:55 1995
  553. --- ./config/m68k/aux-crtfix.c    Mon Nov 20 07:13:48 1995
  554. ***************
  555. *** 0 ****
  556. --- 1,86 ----
  557. + /*
  558. +  Copyright (C) 1995 Free Software Foundation, Inc.
  559. +  This file is free software; you can redistribute it and/or modify it
  560. +  under the terms of the GNU General Public License as published by the
  561. +  Free Software Foundation; either version 2, or (at your option) any
  562. +  later version.
  563. +  
  564. +  In addition to the permissions in the GNU General Public License, the
  565. +  Free Software Foundation gives you unlimited permission to link the
  566. +  compiled version of this file with other programs, and to distribute
  567. +  those programs without any restriction coming from the use of this
  568. +  file.  (The General Public License restrictions do apply in other
  569. +  respects; for example, they cover modification of the file, and
  570. +  distribution when not linked into another program.)
  571. +  This file is distributed in the hope that it will be useful, but
  572. +  WITHOUT ANY WARRANTY; without even the implied warranty of
  573. +  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  574. +  General Public License for more details.
  575. +  You should have received a copy of the GNU General Public License
  576. +  along with this program; see the file COPYING.  If not, write to
  577. +  the Free Software Foundation, 59 Temple Place - Suite 330,
  578. +  Boston, MA 02111-1307, USA.
  579. +  As a special exception, if you link this library with files
  580. +  compiled with GCC to produce an executable, this does not cause
  581. +  the resulting executable to be covered by the GNU General Public License.
  582. +  This exception does not however invalidate any other reasons why
  583. +  the executable file might be covered by the GNU General Public License.
  584. + */
  585. + /*
  586. +  Specifically for A/UX-MacOS Compatibility:
  587. +    Replace exit with _exithk in crt files. The idea is that we want to
  588. +    override exit and do additional things while being able to call the
  589. +    original exit function as well.
  590. + */
  591. + #include <filehdr.h>
  592. + #include <syms.h>
  593. + #include <stdio.h>
  594. + main(int argc, char ** argv)
  595. + {
  596. +     struct filehdr hdr;
  597. +     struct syment cursym;
  598. +     FILE* targetfile;
  599. +     int curpos, symnum;
  600. +     int readb;
  601. +         if( argc != 2 ) {
  602. +                 printf("argc = %d\n", argc);
  603. +                 printf("usage: crtfix [crt file]\n");
  604. +                 exit(1);
  605. +                 }
  606. +     targetfile = fopen(argv[1], "r+");
  607. +     if( !targetfile )
  608. +         perror("opening file");
  609. +     fread(&hdr, sizeof(struct filehdr), 1, targetfile);
  610. +     readb = fseek(targetfile, hdr.f_symptr, SEEK_SET);
  611. +     for(symnum=0; symnum < hdr.f_nsyms; symnum++)
  612. +     {
  613. +         curpos = ftell(targetfile);
  614. +         readb = fread(&cursym, sizeof(struct syment), 1, targetfile);
  615. +         if(cursym.n_zeroes != 0)
  616. +         {
  617. +             if((!strcmp(cursym.n_name, "exit")) &&
  618. +                (cursym.n_scnum == 1))
  619. +             {
  620. +                 fseek(targetfile, curpos, SEEK_SET);
  621. +                 strcpy(cursym.n_name, "_exithk");
  622. +                 fwrite(&cursym, sizeof(struct syment),
  623. +                     1, targetfile);
  624. +                 break;
  625. +             }
  626. +         }
  627. +     }
  628. +     fclose(targetfile);
  629. + }
  630. *** /dev/null    Tue Dec  5 13:52:55 1995
  631. --- ./config/m68k/aux-exit.c    Mon Nov 20 07:13:48 1995
  632. ***************
  633. *** 0 ****
  634. --- 1,4 ----
  635. + /* Used under A/UX to perform cleanup for various programs. This is a
  636. +    dummy version used when the mac libs aren't used */
  637. + void _exithk(){ }
  638. *** /dev/null    Tue Dec  5 13:52:55 1995
  639. --- ./config/m68k/aux-mcount.asm    Mon Nov 20 07:13:49 1995
  640. ***************
  641. *** 0 ****
  642. --- 1,11 ----
  643. + #
  644. + # Simple glue routine that handles the
  645. + # fact that A/UXs profiling routine calls
  646. + # 'mcount%' which gas can't handle, due to
  647. + # the "%" sign...
  648. + #
  649. + # Must be assembled by A/UX's native 'as'
  650. + #
  651. +     global __mcount
  652. + __mcount:
  653. +     jmp mcount%
  654. *** /dev/null    Tue Dec  5 13:52:55 1995
  655. --- ./config/m68k/aux.h    Mon Nov 20 07:13:49 1995
  656. ***************
  657. *** 0 ****
  658. --- 1,199 ----
  659. + /* Definitions for Motorola 680x0 running A/UX and using GAS
  660. +    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
  661. + This file is part of GNU CC.
  662. + GNU CC is free software; you can redistribute it and/or modify
  663. + it under the terms of the GNU General Public License as published by
  664. + the Free Software Foundation; either version 2, or (at your option)
  665. + any later version.
  666. + GNU CC is distributed in the hope that it will be useful,
  667. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  668. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  669. + GNU General Public License for more details.
  670. + You should have received a copy of the GNU General Public License
  671. + along with GNU CC; see the file COPYING.  If not, write to
  672. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  673. + #define TARGET_DEFAULT 7    /* 68020, 68881 */
  674. + #include "m68k/m68k.h"
  675. + #define CPP_PREDEFINES \
  676. + "-Dunix -Dm68k -DAUX -DmacII \
  677. + -Asystem(unix) -Asystem(AUX) \
  678. + -Acpu(m68k) -Acpu(mc68000) \
  679. + -Amachine(m68k) -Amachine(macII)"
  680. + #define CPP_SPEC \
  681. + "%{!msoft-float:%{!ansi:-Dmc68881 }-D__HAVE_68881__ }\
  682. + -D__mc68000__ %{!ansi:-Dmc68000 }\
  683. + %{!mc68000:%{!m68000:-Acpu(mc68020) -D__mc68020__ %{!ansi:-Dmc68020 }}}\
  684. + %{m68030:-Acpu(mc68030) -D__mc68030__ %{!ansi:-Dmc68030 }}\
  685. + %{m68040:-Acpu(mc68040) -D__mc68040__ %{!ansi:-Dmc68040 }}\
  686. + %{!ansi:%{!traditional:-D__STDC__=2 }}\
  687. + %{sbsd:-D_BSD_SOURCE -DBSD }%{ZB:-D_BSD_SOURCE -DBSD }\
  688. + %{ssysv:-D_SYSV_SOURCE -DSYSV -DUSG }%{ZS:-D_SYSV_SOURCE -DSYSV -DUSG }\
  689. + %{sposix:-D_POSIX_SOURCE -DPOSIX }%{ZP:-D_POSIX_SOURCE -DPOSIX }\
  690. + %{saux:-D_AUX_SOURCE }%{ZA:-D_AUX_SOURCE }\
  691. + %{!sbsd:%{!ZB:%{!ssysv:%{!ZS:%{!sposix:%{!ZP:%{!snone:\
  692. + -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE }}}}}}}"
  693. + /* For /bin/ld */
  694. + #define LINK_SPEC \
  695. + "%{p:-L/lib/libp -L/usr/lib/libp }%{pg:-L/lib/libp -L/usr/lib/libp }\
  696. + %{smac:low.ld%s }%{!smac:shlib.ld%s }"
  697. + #define LIB_SPEC \
  698. + "%{sbsd:-lbsd }%{ZB:-lbsd }\
  699. + %{ssysv:-lsvid }%{ZS:-lsvid }\
  700. + %{sposix:-lposix }%{ZP:-lposix }\
  701. + %{static:%{smac:-lmac -lat -lld -lmr }-lc }\
  702. + %{!static:%{smac:-lmac_s -lat -lld -lmr }-lc_s }"
  703. + #undef STARTFILE_SPEC
  704. + #define STARTFILE_SPEC \
  705. + "%{pg:mcrt0.o%s }%{!pg:%{p:mcrt0.o%s }\
  706. + %{!p:%{smac:maccrt0.o%s low.o%s }%{!smac:crt1.o%s }}}\
  707. + crt2.o%s "
  708. + #undef ENDFILE_SPEC
  709. + #define ENDFILE_SPEC "crtn.o%s "
  710. + /*===================================================================*/
  711. + /* No we need to use collect2... gld and A/UX has problems */
  712. + #define NM_FLAGS ""
  713. + #define OBJECT_FORMAT_COFF
  714. + #define MY_ISCOFF(magic)    ((magic) == MC68MAGIC)
  715. + #define NO_SYS_SIGLIST
  716. + /* Provide support for pascal strings */
  717. + #define AUX_PASCAL_STRINGS
  718. + /* Resize standard types */
  719. + #undef SIZE_TYPE
  720. + #define SIZE_TYPE "unsigned int"
  721. + #undef PTRDIFF_TYPE
  722. + #define PTRDIFF_TYPE "int"
  723. + #undef WCHAR_TYPE
  724. + #define WCHAR_TYPE "unsigned int"
  725. + /* Every structure or union's size must be a multiple of 2 bytes.  */
  726. + #define STRUCTURE_SIZE_BOUNDARY 16
  727. + /* Generate calls to memcpy, memcmp and memset, as opposed to bcopy, bcmp,
  728. +    and bzero */
  729. + #define TARGET_MEM_FUNCTIONS
  730. + /* We call a different function for profiling (__mcount, which is actually
  731. +    a glue routine which calls A/UX's mcount%, which gas cannot generate). */
  732. + #undef FUNCTION_PROFILER
  733. + #define FUNCTION_PROFILER(FILE, LABELNO)  \
  734. +   asm_fprintf (FILE, "\tlea %LLP%d,%Ra0\n\tjbsr __mcount\n", (LABELNO))
  735. + /* Define how to generate (in the callee) the output value of a function
  736. +    and how to find (in the caller) the value returned by a function.  VALTYPE
  737. +    is the data type of the value (as a tree).  If the precise function being
  738. +    called is known, FUNC is its FUNCTION_DECL; otherwise, FUNC is 0.
  739. +    For A/UX generate the result in d0, a0, or fp0 as appropriate. */
  740. + #undef FUNCTION_VALUE
  741. + #define FUNCTION_VALUE(VALTYPE, FUNC)                                   \
  742. +   (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881                     \
  743. +    ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16)                             \
  744. +    : (TREE_CODE (VALTYPE) == POINTER_TYPE                               \
  745. +       ? gen_rtx (REG, TYPE_MODE (VALTYPE), 8)                           \
  746. +       : gen_rtx (REG, TYPE_MODE (VALTYPE), 0)))
  747. +                     
  748. + #undef LIBCALL_VALUE
  749. + #define LIBCALL_VALUE(MODE) \
  750. +  gen_rtx (REG, (MODE), ((TARGET_68881 && ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0))
  751. + /* 1 if N is a possible register number for a function value.
  752. +    For A/UX allow d0, a0, or fp0 as return registers, for integral,
  753. +    pointer, or floating types, respectively. Reject fp0 if not using a
  754. +    68881 coprocessor. */
  755. + #undef FUNCTION_VALUE_REGNO_P
  756. + #define FUNCTION_VALUE_REGNO_P(N) \
  757. +   ((N) == 0 || (N) == 8 || (TARGET_68881 && (N) == 16))
  758. + /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
  759. +    more than one register.  */
  760. + #undef NEEDS_UNTYPED_CALL
  761. + #define NEEDS_UNTYPED_CALL 1
  762. + /* For compatibility with the large body of existing code which does not
  763. +    always properly declare external functions returning pointer types, the
  764. +    A/UX convention is to copy the value returned for pointer functions
  765. +    from a0 to d0 in the function epilogue, so that callers that have
  766. +    neglected to properly declare the callee can still find the correct return
  767. +    value. */
  768. + #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE)                \
  769. + { extern int current_function_returns_pointer;                \
  770. +   if ((current_function_returns_pointer) &&                \
  771. +       ! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode))    \
  772. +     asm_fprintf (FILE, "\tmovl %Ra0,%Rd0\n");                \
  773. + }
  774. + #undef ASM_FILE_START
  775. + #define ASM_FILE_START(FILE)                    \
  776. + do { fprintf((FILE), "#NO_APP\n");                \
  777. +      output_file_directive ((FILE), main_input_filename);    \
  778. +    } while (0)
  779. + /*
  780. +  The below are taken from m68k/coff.h. We don't just include
  781. +  the file since we'd need to undefine stuff from there.
  782. +  It's a toss-up
  783. +  */
  784. + #undef DBX_DEBUGGING_INFO
  785. + #define SDB_DEBUGGING_INFO
  786. + #undef PREFERRED_DEBUGGING_TYPE
  787. + #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG
  788. + /* COFF symbols don't start with an underscore.  */
  789. + #undef USER_LABEL_PREFIX
  790. + #define USER_LABEL_PREFIX ""
  791. + /* Use a prefix for local labels, just to be on the save side.  */
  792. + #undef LOCAL_LABEL_PREFIX
  793. + #define LOCAL_LABEL_PREFIX "."
  794. + /* Use a register prefix to avoid clashes with external symbols (classic
  795. +    example: `extern char PC;' in termcap).  */
  796. + #undef REGISTER_PREFIX
  797. + #define REGISTER_PREFIX "%"
  798. + /* In the machine description we can't use %R, because it will not be seen
  799. +    by ASM_FPRINTF.  (Isn't that a design bug?).  */
  800. + #undef REGISTER_PREFIX_MD
  801. + #define REGISTER_PREFIX_MD "%%"
  802. + /* config/m68k.md has an explicit reference to the program counter,
  803. +    prefix this by the register prefix.  */
  804. + #define ASM_RETURN_CASE_JUMP    return "jmp %%pc@(2,%0:w)"
  805. + /* Here are the new register names.  */
  806. + #undef REGISTER_NAMES
  807. + #define REGISTER_NAMES \
  808. + {"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",    \
  809. +  "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp",    \
  810. +  "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7" }
  811. *** /dev/null    Tue Dec  5 13:52:55 1995
  812. --- ./config/m68k/x-aux    Mon Nov 20 07:13:50 1995
  813. ***************
  814. *** 0 ****
  815. --- 1,21 ----
  816. + # Makefile additions for A/UX
  817. + LIB2FUNCS_EXTRA=aux-mcount.o aux-exit.c
  818. + FIXPROTO_DEFINES = -D_POSIX_SOURCE
  819. + EXTRA_PASSES=ld aux-crtfix
  820. + CLIB=-lld    # needed for collect2
  821. + INSTALL=cp
  822. + # needed to support builds for multiple versions of A/UX
  823. + LDFLAGS=-static
  824. + aux-mcount.o: $(srcdir)/config/m68k/aux-mcount.asm $(GCC_PASSES)
  825. +     /bin/as -o aux-mcount.o $(srcdir)/config/m68k/aux-mcount.asm
  826. + aux-exit.c: $(srcdir)/config/m68k/aux-exit.c
  827. +     cp $(srcdir)/config/m68k/aux-exit.c aux-exit.c
  828. + aux-crtfix: $(srcdir)/config/m68k/aux-crtfix.c
  829. +     $(CC) $(ALL_CFLAGS) $(LDFLAGS) $(srcdir)/config/m68k/aux-crtfix.c \
  830. +     $(LIBS) -o aux-crtfix
  831. *** /dev/null    Tue Dec  5 13:52:55 1995
  832. --- ./config/m68k/xm-aux.h    Mon Nov 20 07:13:50 1995
  833. ***************
  834. *** 0 ****
  835. --- 1,9 ----
  836. + #ifndef USG
  837. + #define USG
  838. + #endif
  839. + #ifndef AUX
  840. + #define AUX
  841. + #endif
  842. + #include "m68k/xm-m68k.h"
  843.