G++ 1.39 patches for SCO UNIX, plus goodies

Chip Salzenberg chip at tct.uucp
Fri Feb 15 03:40:18 AEST 1991


The enclosed patches are a port of G++ 1.39 to SCO UNIX.  They require
GCC 1.39 with my SCO UNIX patches, which were posted separately.

RMS isn't going to add the Microsloth "#pragma pack()" to mainstream
GCC, so it is still a custom add-on.  (GCC 2.0 will have a keyword to
indicate packing, so all is not lost.  :-))

NON-SCO USERS:

    You will be interested in the patch to stmt.c; it is a a VERY
    important bug fix.  Without it, "return" in a function fails to
    call destructors for auto objects in scope. (!)

    You will also want to use the patch to cplus-decl.c that makes
    "static const int i;" generate an "uninitialized const" warning
    only _outside_ a class definition.

    I think that the two patches to stor-layout.c that mention
    PCC_BITFIELD_TYPE_MATTERS fix a G++ bugs (the test for "this field
    is a bitfield" was too lax), but I would expect such a bug to
    make all structures at least sizeof(int) in size, and I haven't
    seen that symptom.  But the fix _is_ necessary for #pragma pack
    to work.

    You may also find a use for the STANDARD_INCLUDE feature, which
    causes all include files under a given directory (typically
    "/usr/include") to be compiled as C, not C++.

NON-SCO USERS OF SYSTEM V:

    You will want to use the patches to cplus-field.c and symout.c to
    use getcwd() instead of getwd().

    You may also want the patch to collect.c that ensures that global
    destructors are called in the reverse order of global
    constructors.

SCO USERS:

    At the end of the patches is a sharchive containing one file
    you'll need to build GCC:

       Makefile-diffs   Diffs for my Makefile.
            (If you use my Makefile, you don't need to link
             the GCC modules into the G++ directory, but you
             must be using GNU Make, for the "vpath" feature.)

Thanks again to Steve Bleazard for the original "#pragma pack"
support, done for a Xenix/386 port: he's a brave man.  And, of course,
thanks to RMS for an excellent compiler.

Index: collect.c
***************
*** 310,314 ****
    struct ctor_dtor_list_elem *p
      = ((is_ctor) ? ctor_chain : dtor_chain);
!   
    exists = 0;
    while (p) {
--- 310,315 ----
    struct ctor_dtor_list_elem *p
      = ((is_ctor) ? ctor_chain : dtor_chain);
!   struct ctor_dtor_list_elem *pp = NULL;
! 
    exists = 0;
    while (p) {
***************
*** 317,320 ****
--- 318,322 ----
        break;
      }
+     pp = p;
      p = p -> next;
    }
***************
*** 335,340 ****
      }
      else {
!       new->next = dtor_chain;
!       dtor_chain = new;
        dtor_chain_length++;
      }
--- 337,345 ----
      }
      else {
!       new -> next = NULL;
!       if ( pp )
! 	pp -> next = new;
!       else
! 	dtor_chain = new;
        dtor_chain_length++;
      }
***************
*** 384,388 ****
      }
    ASM_OUTPUT_INT_CONST (outfile, 0);
-   ASM_OUTPUT_INT_CONST (outfile, 0);
  
    fclose (outfile);
--- 389,392 ----
***************
*** 409,413 ****
  #   define GCC_SYMENT SYMENT
  #ifndef UNUSUAL_COFF_DEFINITION
! #   define GCC_OK_SYMBOL(X) (!(((X).n_type & N_TMASK) != (DT_NON << N_BTSHFT)))
  #else
  #   define GCC_OK_SYMBOL(X) ((X).n_scnum == 1 && (X).n_sclass == C_EXT)
--- 413,419 ----
  #   define GCC_SYMENT SYMENT
  #ifndef UNUSUAL_COFF_DEFINITION
! #   define GCC_OK_SYMBOL(X) \
!  (((X).n_type & N_TMASK) == (DT_NON << N_BTSHFT) || \
!   ((X).n_type & N_TMASK) == (DT_FCN << N_BTSHFT))
  #else
  #   define GCC_OK_SYMBOL(X) ((X).n_scnum == 1 && (X).n_sclass == C_EXT)

Index: cplus-decl.c
***************
*** 2389,2393 ****
  }
  
! static int sigsegv ()
  {
    error ("Segmentation violation");
--- 2389,2399 ----
  }
  
! static
! #if __STDC__ || defined(USG)
! void
! #else
! int
! #endif
! sigsegv ()
  {
    error ("Segmentation violation");
***************
*** 3657,3661 ****
  	}
  
!       if (TREE_CODE (decl) == VAR_DECL
  	  && !TYPE_NEEDS_CONSTRUCTING (type)
  	  && (TREE_READONLY (type) || TREE_READONLY (decl)))
--- 3663,3668 ----
  	}
  
!       if (current_class_type == NULL_TREE
! 	  && TREE_CODE (decl) == VAR_DECL
  	  && !TYPE_NEEDS_CONSTRUCTING (type)
  	  && (TREE_READONLY (type) || TREE_READONLY (decl)))

Index: cplus-field.c
***************
*** 17,24 ****
  #include <stdio.h>
  #include <ctype.h>
  #include <strings.h>
! 
! 
  
  
  /************************************************************************/
--- 17,29 ----
  #include <stdio.h>
  #include <ctype.h>
+ #ifdef USG
+ #include <string.h>
+ #define index strchr
+ #define rindex strrchr
+ #else
  #include <strings.h>
! #endif
  
+ extern char *malloc();
  
  /************************************************************************/
***************
*** 247,251 ****
--- 252,262 ----
  
     if (wd_name == NULL) {
+ #ifdef USG
+       extern char *getcwd();
+       if (getcwd(wdbuf, sizeof wdbuf) == NULL)
+ 	 strcpy(wdbuf, ".");
+ #else
        getwd(wdbuf);
+ #endif
        wd_name = SALLOC(wdbuf);
      };

Index: cplus-lex.c
***************
*** 39,42 ****
--- 39,43 ----
  #include "obstack.h"
  #include "assert.h"
+ #include "getpagesize.h"
  extern int errno;		/* needed for VAX.  */
  extern jmp_buf toplevel;
***************
*** 1299,1303 ****
        finput2->_cnt = t->len-1;
  #else
! #if defined(i386) && !defined(sequent) && !defined(sun386)
        finput2->_ptr = finput2->_base = t->buf;
        _bufend(finput2) = t->buf + t->len;
--- 1300,1304 ----
        finput2->_cnt = t->len-1;
  #else
! #if defined(i386) && !defined(sequent) && !defined(sun386) && !defined(M_UNIX)
        finput2->_ptr = finput2->_base = t->buf;
        _bufend(finput2) = t->buf + t->len;
***************
*** 1989,2035 ****
  	      && getch () == 'g'
  	      && getch () == 'm'
! 	      && getch () == 'a')
! /* Change by Bryan Boreham, Kewill, Sun Jul 23 15:53:24 1989.
!    This whole section added to support dumping of
!    compilations in the middle. */
  	    {
! 	      /* Read first nonwhite char after the `#pragma'.  */
  
! 	      do
! 		c = getch ();
! 	      while (c == ' ' || c == '\t');
  
! #ifndef MERGED
! 	      /* See if it is "dump" */
  
! 	      if (c == 'd'
! 		  && getch () == 'u'
! 		  && getch () == 'm'
! 		  && getch () == 'p'
! 		  && ((c = getch ()) == ' ' || c == '\t' || c == '\n'))
  		{
! #ifdef VMS
! 			;		/* Are you crazy? */
! #else
  		  ungetc (c, finput);
  		  dump_data();
  		  longjmp (toplevel, 1);
! #endif
  		}
  	      else
! #endif
! 		if (c == 'v'
! 		       && getch () == 't'
! 		       && getch () == 'a'
! 		       && getch () == 'b'
! 		       && getch () == 'l'
! 		       && getch () == 'e'
! 		       && ((c = getch ()) == ' ' || c == '\t' || c == '\n'))
  		{
  		  extern tree pending_vtables;
  
! 		  /* More follows: it must be a string constant (class name).  */
  		  token = yylex ();
! 		  if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
  		    {
  		      error ("invalid #pragma vtable");
--- 1990,2065 ----
  	      && getch () == 'g'
  	      && getch () == 'm'
! 	      && getch () == 'a'
! 	      && ((c = getch ()) == ' ' || c == '\t'))
  	    {
! 	      char pragma_name[32]; /* arbitrary pragma directive size */
! 	      int i;
  
! 	      while ((c = getch ()) == ' ' || c == '\t')
! 		;
! 	      if (c != EOF)
! 		ungetc (c, finput);
! 	      for (i = 0; i < sizeof(pragma_name) - 1; ++i) 
! 		{
! 		  if ((c = getch ()) < 'a' || c > 'z')
! 		    {
! 		      if (c != EOF)
! 			ungetc (c, finput);
! 		      break;
! 		    }
! 		  pragma_name[i] = c;
! 		}
! 	      pragma_name[i] = '\0';
  
! #ifdef PRAGMA_PACK
! 	      if (strcmp(pragma_name, "pack") == 0)
! 		{
! 		  if ((c = getch ()) != '(')
! 		    {
! 		      if (c != EOF)
! 			ungetc (c, finput);
! 		      error ("invalid #pragma pack");
! 		      goto skipline;
! 		    }
! 
! 		  if ((c = getch ()) == '1' || c == '2' || c == '4')
! 		    {
! 		      pragma_pack (c - '0');
! 		      c = getch ();
! 		    }
! 		  else
! 		    pragma_pack_default ();
! 
! 		  if (c != ')')
! 		    {
! 		      if (c != EOF)
! 			ungetc (c, finput);
! 		      error ("invalid #pragma pack");
! 		      goto skipline;
! 		    }
! 		}
! 	      else
! #endif /* PRAGMA_PACK */
  
! #ifndef MERGED
! 	      if (strcmp(pragma_name, "dump") == 0)
  		{
! #ifndef VMS			/* Are you crazy? */
  		  ungetc (c, finput);
  		  dump_data();
  		  longjmp (toplevel, 1);
! #endif /* not VMS */
  		}
  	      else
! #endif /* not MERGED */
! 
! 	      if (strcmp(pragma_name, "vtable") == 0)
  		{
  		  extern tree pending_vtables;
  
! 		  /* More follows: it must be a string constant (class name).*/
  		  token = yylex ();
! 		  if (token != STRING
! 		   || TREE_CODE (yylval.ttype) != STRING_CST)
  		    {
  		      error ("invalid #pragma vtable");
***************
*** 2048,2058 ****
  		    warning ("trailing characters ignored");
  		}
! 	      else if (c == 'u'
! 		       && getch () == 'n'
! 		       && getch () == 'i'
! 		       && getch () == 't'
! 		       && ((c = getch ()) == ' ' || c == '\t' || c == '\n'))
  		{
! 		  /* More follows: it must be a string constant (unit name).  */
  		  token = yylex ();
  		  if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
--- 2078,2084 ----
  		    warning ("trailing characters ignored");
  		}
! 	      else if (strcmp(pragma_name, "unit") == 0)
  		{
! 		  /* More follows: it must be a string constant (unit name). */
  		  token = yylex ();
  		  if (token != STRING || TREE_CODE (yylval.ttype) != STRING_CST)
***************
*** 2069,2086 ****
  		    warning ("trailing characters ignored");
  		}
! 	      else if (c == 'i')
  		{
  		  tree fileinfo = IDENTIFIER_CLASS_VALUE (get_time_identifier (input_filename));
! 		  c = getch ();
! 
! 		  if (c == 'n'
! 		      && getch () == 't'
! 		      && getch () == 'e'
! 		      && getch () == 'r'
! 		      && getch () == 'f'
! 		      && getch () == 'a'
! 		      && getch () == 'c'
! 		      && getch () == 'e'
! 		      && ((c = getch ()) == ' ' || c == '\t' || c == '\n'))
  		    {
  		      /* read to newline.  */
--- 2095,2102 ----
  		    warning ("trailing characters ignored");
  		}
! 	      else if (pragma_name[0] == 'i')
  		{
  		  tree fileinfo = IDENTIFIER_CLASS_VALUE (get_time_identifier (input_filename));
! 		  if (strcmp(pragma_name, "interface") == 0)
  		    {
  		      /* read to newline.  */
***************
*** 2118,2135 ****
  		      TREE_INT_CST_HIGH (fileinfo) = interface_unknown;
  		    }
! 		  else if (c == 'm'
! 			   && getch () == 'p'
! 			   && getch () == 'l'
! 			   && getch () == 'e'
! 			   && getch () == 'm'
! 			   && getch () == 'e'
! 			   && getch () == 'n'
! 			   && getch () == 't'
! 			   && getch () == 'a'
! 			   && getch () == 't'
! 			   && getch () == 'i'
! 			   && getch () == 'o'
! 			   && getch () == 'n'
! 			   && ((c = getch ()) == ' ' || c == '\t' || c == '\n'))
  		    {
  		      char *main_filename = main_input_filename ? main_input_filename : input_filename;
--- 2134,2138 ----
  		      TREE_INT_CST_HIGH (fileinfo) = interface_unknown;
  		    }
! 		  else if (strcmp(pragma_name, "implementation") == 0)
  		    {
  		      char *main_filename = main_input_filename ? main_input_filename : input_filename;
***************
*** 2385,2388 ****
--- 2388,2397 ----
  	      if (flag_cadillac)
  		cadillac_push_source ();
+ 
+ #ifdef STANDARD_INCLUDE
+ 	      if (strncmp(p->name, STANDARD_INCLUDE,
+ 			  sizeof(STANDARD_INCLUDE) - 1) == 0)
+ 		push_lang_context(lang_name_c);
+ #endif
  	    }
  	  else if (input_file_stack->next)
***************
*** 2390,2393 ****
--- 2399,2408 ----
  	      struct file_stack *p = input_file_stack;
  
+ #ifdef STANDARD_INCLUDE
+ 	      if (strncmp(p->name, STANDARD_INCLUDE,
+ 			  sizeof(STANDARD_INCLUDE) - 1) == 0)
+ 		pop_lang_context();
+ #endif
+ 
  	      if (flag_cadillac)
  		cadillac_pop_source ();
***************
*** 2739,2743 ****
  	      finput2->_cnt = t->len-1;
  #else
! #if defined(i386) && !defined(sequent) && !defined(sun386)
  	      finput2->_ptr = finput2->_base = t->buf;
  	      _bufend(finput2) = t->buf + t->len;
--- 2754,2758 ----
  	      finput2->_cnt = t->len-1;
  #else
! #if defined(i386) && !defined(sequent) && !defined(sun386) && !defined(M_UNIX)
  	      finput2->_ptr = finput2->_base = t->buf;
  	      _bufend(finput2) = t->buf + t->len;

Index: cplus-typeck.c

Index: gcc.c
***************
*** 304,308 ****
    "%{!c:%{!M*:%{!E:%{!S:collect -o %g.s %g.R\n\
  as %g.s -o %g.O\n\
! ld %{o*} %g.R %g.O\n\
  }}}}";
  
--- 304,308 ----
    "%{!c:%{!M*:%{!E:%{!S:collect -o %g.s %g.R\n\
  as %g.s -o %g.O\n\
! ld %{o*} %g.R %g.O %{!A:%E}\n\
  }}}}";
  
***************
*** 311,315 ****
   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
   %{y*} %{!nostdlib:%S} \
!  %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  #else
  /* Here is the spec for running the linker, after compiling all files.  */
--- 311,315 ----
   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
   %{y*} %{!nostdlib:%S} \
!  %{L*} -L%A %o %{!nostdlib:%{g:-lg} gnulib%s %L gnulib%s}\n }}}}";
  #else
  /* Here is the spec for running the linker, after compiling all files.  */
***************
*** 317,321 ****
   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
   %{y*} %{!nostdlib:%S} \
!  %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  #endif
  
--- 317,321 ----
   %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
   %{y*} %{!nostdlib:%S} \
!  %{L*} -L%A %o %{!nostdlib:%{g:-lg} gnulib%s %L gnulib%s %{!A:%E}}\n }}}}";
  #endif
  
***************
*** 1232,1235 ****
--- 1232,1240 ----
  	    fatal ("Invalid specification!  Bug in cc.");
  
+ 	  case 'A':
+ 	    obstack_grow (&obstack, standard_startfile_prefix,
+ 			  strlen (standard_startfile_prefix));
+ 	    break;
+ 
  	  case 'b':
  	    obstack_grow (&obstack, input_basename, basename_length);
***************
*** 1360,1363 ****
--- 1365,1372 ----
  	  case 'S':
  	    do_spec_1 (STARTFILE_SPEC, 0);
+ 	    break;
+ 
+ 	  case 'E':
+ 	    do_spec_1 (ENDFILE_SPEC, 0);
  	    break;
  

Index: gnulib3.c
***************
*** 16,21 ****
  extern void on_exit(void*, void*);
  
! #if defined(i386) && !defined(sequent)
! #define COFF
  #endif
  
--- 16,21 ----
  extern void on_exit(void*, void*);
  
! #if defined(i386) && !defined(sequent) && !defined(M_UNIX)
! #define COFF 1
  #endif
  
***************
*** 24,30 ****
--- 24,35 ----
  #endif
  
+ #if __STDC__
+ #define ON_EXIT(PROCP, ARG) \
+   do { extern void PROCP (); atexit (PROCP, ARG); } while (0)
+ #else
  #if defined(sun)
  #define ON_EXIT(PROCP, ARG) \
    do { extern void PROCP (); on_exit (PROCP, ARG); } while (0)
+ #endif
  #endif
  

Index: stmt.c
***************
*** 246,253 ****
    int depth;
    rtx exit_label;
!   union
      {
        /* For conds (if-then and if-then-else statements).  */
!       struct
  	{
  	  /* Label on the else-part, if any, else 0.  */
--- 246,253 ----
    int depth;
    rtx exit_label;
!   union nesting_data
      {
        /* For conds (if-then and if-then-else statements).  */
!       struct cond_data
  	{
  	  /* Label on the else-part, if any, else 0.  */
***************
*** 257,261 ****
  	} cond;
        /* For loops.  */
!       struct
  	{
  	  /* Label at the top of the loop; place to loop back to.  */
--- 257,261 ----
  	} cond;
        /* For loops.  */
!       struct loop_data
  	{
  	  /* Label at the top of the loop; place to loop back to.  */
***************
*** 268,272 ****
  	} loop;
        /* For variable binding contours.  */
!       struct
  	{
  	  /* Sequence number of this binding contour within the function,
--- 268,272 ----
  	} loop;
        /* For variable binding contours.  */
!       struct block_data
  	{
  	  /* Sequence number of this binding contour within the function,
***************
*** 300,304 ****
        /* For switch (C) or case (Pascal) statements,
  	 and also for dummies (see `expand_start_case_dummy').  */
!       struct
  	{
  	  /* The insn after which the case dispatch should finally
--- 300,304 ----
        /* For switch (C) or case (Pascal) statements,
  	 and also for dummies (see `expand_start_case_dummy').  */
!       struct switch_data
  	{
  	  /* The insn after which the case dispatch should finally
***************
*** 320,324 ****
  	} case_stmt;
        /* For exception contours.  */
!       struct
  	{
  	  /* List of exceptions raised.  This is a TREE_LIST
--- 320,324 ----
  	} case_stmt;
        /* For exception contours.  */
!       struct except_data
  	{
  	  /* List of exceptions raised.  This is a TREE_LIST
***************
*** 1730,1733 ****
--- 1730,1738 ----
    while (block && block->data.block.cleanups == 0)
      block = block->next;
+ 
+   /* Only use `last_insn' if there are cleanups which must be run.  */
+ 
+   if (block || cleanup_label != 0)
+     last_insn = get_last_insn ();
  
    /* If yes, use a goto to return, since that runs cleanups.  */

Index: stor-layout.c
***************
*** 471,474 ****
--- 471,478 ----
  
        layout_decl (field, var_size ? size_unit : const_size);
+ #ifdef PRAGMA_PACK
+       if (pragma_pack_seen())
+         DECL_ALIGN(field) = MIN(pragma_align_val(), DECL_ALIGN(field));
+ #endif
        desired_align = DECL_ALIGN (field);
  
***************
*** 481,485 ****
        /* In PCC on Vax, Sony, etc., a bit field of declare type `int'
  	 forces the entire structure to have `int' alignment.  */
!       if (DECL_NAME (field) != 0)
  	record_align = MAX (record_align, TYPE_ALIGN (TREE_TYPE (field)));
  #endif
--- 485,490 ----
        /* In PCC on Vax, Sony, etc., a bit field of declare type `int'
  	 forces the entire structure to have `int' alignment.  */
!       if (PCC_BITFIELD_TYPE_MATTERS && TREE_PACKED (field)
! 	  && TREE_TYPE (field) != error_mark_node)
  	record_align = MAX (record_align, TYPE_ALIGN (TREE_TYPE (field)));
  #endif
***************
*** 512,516 ****
  
  #ifdef PCC_BITFIELD_TYPE_MATTERS
!       if (TREE_CODE (field) == FIELD_DECL
  	  && TREE_TYPE (field) != error_mark_node)
  	{
--- 517,521 ----
  
  #ifdef PCC_BITFIELD_TYPE_MATTERS
!       if (PCC_BITFIELD_TYPE_MATTERS && TREE_PACKED (field)
  	  && TREE_TYPE (field) != error_mark_node)
  	{

Index: symout.c
***************
*** 1243,1247 ****
    buffer.filedir = (char *) next_address;
  #ifdef USG
!   strcpy (dir, getcwd (dir, MAXNAMLEN));
  #else
  #ifndef VMS
--- 1243,1251 ----
    buffer.filedir = (char *) next_address;
  #ifdef USG
!   {
!     extern char *getcwd();
!     if (getcwd (dir, MAXNAMLEN) == NULL)
!       strcpy (dir, ".");
!   }
  #else
  #ifndef VMS

Index: toplev.c
***************
*** 41,49 ****
  #endif
  
  #ifdef USG
- #include <sys/fcntl.h>
  #undef FLOAT
- #include <sys/param.h>
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
  #undef FLOAT
  #include <sys/times.h>
--- 41,50 ----
  #endif
  
+ #include "getpagesize.h"
+ 
  #ifdef USG
  #undef FLOAT
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
+ #include <sys/fcntl.h>
  #undef FLOAT
  #include <sys/times.h>
***************
*** 2060,2064 ****
  
    decl_printable_name = decl_name;
!   lang_expand_expr = fancy_abort;
  
    /* Initialize whether `char' is signed.  */
--- 2061,2065 ----
  
    decl_printable_name = decl_name;
!   lang_expand_expr = (struct rtx_def *(*)()) fancy_abort;
  
    /* Initialize whether `char' is signed.  */

Index: version.c
***************
*** 1 ****
! char *version_string = "1.39.0 beta (based on GCC 1.39)";
--- 1,9 ----
! #include "config.h"
! 
! char *version_string =
! #ifdef PRAGMA_PACK
!     "1.39.0 beta (#pragma pack) (based on GCC 1.39)"
! #else
!     "1.39.0 beta (based on GCC 1.39)"
! #endif
!     ;

////////////////////////
//  NEW FILES FOLLOW  //
////////////////////////

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Makefile-diffs
# Wrapped by chip at tct on Thu Feb 14 11:26:49 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile-diffs' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile-diffs'\"
else
echo shar: Extracting \"'Makefile-diffs'\" \(13046 characters\)
sed "s/^X//" >'Makefile-diffs' <<'END_OF_FILE'
XIndex: Makefile
X***************
X*** 33,38 ****
X  
X  # This file depends on -DCADILLAC
X! # cplus-cadillac.c
X! CADILLAC_OBJS = cplus-cadillac.o ../cadillac/code/connection/libconn.a
X  
X  # Defining NDEBUG will cause assertion macros to do nothing.
X--- 33,38 ----
X  
X  # This file depends on -DCADILLAC
X! # cplus-caddy.c
X! CADILLAC_OBJS = cplus-caddy.o ../caddy/code/connection/libconn.a
X  
X  # Defining NDEBUG will cause assertion macros to do nothing.
X***************
X*** 42,47 ****
X  
X  # On COFF systems, use one of the definitions below. (see collect.c)
X- # COFFLAGS = -DUSE_COLLECT -DCOFF
X  # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF
X  
X  # On some BSD systems (like Vax, unlike Sun), there is no file
X--- 42,47 ----
X  
X  # On COFF systems, use one of the definitions below. (see collect.c)
X  # COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF
X+ COFFLAGS = -DUSE_COLLECT -DCOFF
X  
X  # On some BSD systems (like Vax, unlike Sun), there is no file
X***************
X*** 51,55 ****
X  
X  # CFLAGS = -g -DSOS -DESKIT -O
X! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/ -DFIELD_XREF
X  CC = gcc
X  BISON = bison
X--- 51,55 ----
X  
X  # CFLAGS = -g -DSOS -DESKIT -O
X! CFLAGS = -O -DGATHER_STATISTICS $(COFFLAGS) -DFIELD_XREF
X  CC = gcc
X  BISON = bison
X***************
X*** 58,62 ****
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = install -c
X  # on sysV, define this as ln.
X  LINK = ln -s
X--- 58,62 ----
X  SHELL = /bin/sh
X  # on sysV, define this as cp.
X! INSTALL = cp
X  # on sysV, define this as ln.
X  LINK = ln -s
X***************
X*** 64,68 ****
X  # Compiler to use for compiling gnulib.
X  # OLDCC should not be the GNU C compiler.
X! OLDCC = cc
X  
X  # CFLAGS for use with OLDCC, for compiling gnulib.
X--- 64,68 ----
X  # Compiler to use for compiling gnulib.
X  # OLDCC should not be the GNU C compiler.
X! OLDCC = rcc
X  
X  # CFLAGS for use with OLDCC, for compiling gnulib.
X***************
X*** 69,73 ****
X  # NOTE: -O does not work on some Unix systems!
X  # If you use it here, you are asking for trouble.
X! CCLIBFLAGS=
X  
X  # USG_STDIO if for machines which use System V stdio.
X--- 69,73 ----
X  # NOTE: -O does not work on some Unix systems!
X  # If you use it here, you are asking for trouble.
X! CCLIBFLAGS= -O
X  
X  # USG_STDIO if for machines which use System V stdio.
X***************
X*** 76,83 ****
X  # to support System V, but really try to be Berkeley (and thus
X  # break with USG defined), may need to define this.
X! # USG_STDIO = -DUSG_STDIO
X  
X! prefix=/tools/gnu
X  
X  # Directory where sources are, from where we are.
X  srcdir = .
X--- 76,91 ----
X  # to support System V, but really try to be Berkeley (and thus
X  # break with USG defined), may need to define this.
X! USG_STDIO = -DUSG_STDIO
X  
X! # STANDARD_INCLUDE for system include files written in C.
X! # This macro, if defined, puts an implicit 'extern "C" {}'
X! # around all include files that have the given string as
X! # the prefix of their names.
X! STANDARD_INCLUDE = -DSTANDARD_INCLUDE=\"/usr/include/\"
X  
X+ prefix=/u/local
X+ 
X+ # Directory where GCC is, from where we are.
X+ gccdir = ../gcc-1.39
X  # Directory where sources are, from where we are.
X  srcdir = .
X***************
X*** 89,95 ****
X  startdir = $(prefix)/lib
X  # Directory in which to put man pages.
X! mandir = $(prefix)/man/man1
X  # Number to put in man-page filename.
X! manext = 1
X  
X  # Additional system libraries to link with.
X--- 97,110 ----
X  startdir = $(prefix)/lib
X  # Directory in which to put man pages.
X! mandir = $(prefix)/man/man.C
X  # Number to put in man-page filename.
X! manext = C
X! 
X! ##### DANGER WILL ROBINSON
X! # Use the GNU make vpath feature to avoid hard links.
X! vpath %.h $(gccdir)
X! vpath %.c $(gccdir)
X! vpath %.def $(gccdir)
X! MD = $(gccdir)/md
X  
X  # Additional system libraries to link with.
X***************
X*** 154,159 ****
X  # so that tm.h and config.h will be found in the compilation
X  # subdirectory rather than in the source directory.
X! INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
X! SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
X  
X  # Always use -I$(srcdir)/config when compiling.
X--- 169,175 ----
X  # so that tm.h and config.h will be found in the compilation
X  # subdirectory rather than in the source directory.
X! # NOTE LEADING "-I-" -- it turns off "." for #include "x".
X! INCLUDES = -I- -I. -I$(srcdir) -I$(gccdir) -I$(gccdir)/config
X! SUBDIR_INCLUDES = -I- -I.. -I../$(srcdir) -I$(gccdir) -I../$(gccdir)/config
X  
X  # Always use -I$(srcdir)/config when compiling.
X***************
X*** 176,180 ****
X   integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
X   regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
X!  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
X  
X  # Files to be copied away after each stage in building.
X--- 192,197 ----
X   integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
X   regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
X!  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o \
X!  pragma.o
X  
X  # Files to be copied away after each stage in building.
X***************
X*** 185,189 ****
X   stamp-output.c stamp-recog.c stamp-emit.c stamp-extract.c stamp-peep.c \
X   genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
X!  cc1plus
X  
X  # Header files that are made available to programs compiled with gcc.
X--- 202,206 ----
X   stamp-output.c stamp-recog.c stamp-emit.c stamp-extract.c stamp-peep.c \
X   genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
X!  cc1plus collect
X  
X  # Header files that are made available to programs compiled with gcc.
X***************
X*** 210,216 ****
X  # gnulib is not a target because a proper installation of GNU CC
X  # will place it where g++ can find it.  Same with cpp
X! all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o
X  # On COFF systems, use the target below.
X! # all: g++ cc1plus collect # crt0+.o crt1+.o
X  
X  doc: $(srcdir)/cpp.info $(srcdir)/g++.info
X--- 227,234 ----
X  # gnulib is not a target because a proper installation of GNU CC
X  # will place it where g++ can find it.  Same with cpp
X! # all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o
X  # On COFF systems, use the target below.
X! # (and YES we have gnulib3 as a target!)
X! all: g++ cc1plus collect gnulib3 # crt0+.o crt1+.o
X  
X  doc: $(srcdir)/cpp.info $(srcdir)/g++.info
X***************
X*** 218,221 ****
X--- 236,252 ----
X  compilations: ${OBJS} ${CPLUS_OBJS}
X  
X+ gnulib3: stamp-gnulib3
X+ 	@
X+ stamp-gnulib3: $(gccdir)/gnulib gnulib3.c
X+ 	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) gnulib3.c
X+ 	-cp $(gccdir)/gnulib tmpgnulib
X+ 	ar rc tmpgnulib gnulib3.o
X+ 	rm -f gnulib3.o
X+ 	mv tmpgnulib gnulib
X+ 	touch $@
X+ 
X+ $(gccdir)/gnulib:
X+ 	-echo "Where is $(gccdir)/gnulib?!"; exit 1
X+ 
X  g++: gcc.o version.o $(LIBDEPS)
X  	$(CC) $(CFLAGS) $(LDFLAGS) -o g++ gcc.o version.o $(LIBS)
X***************
X*** 335,340 ****
X  	$(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus lastfile.o $(CPLUS_OBJS) cplus-edsel.o $(OBJS) $(LIBS) -lm
X  
X! cadillac-cc1plus: $(CPLUS_OBJS) $(CADILLAC_OBJS) $(OBJS) $(LIBDEPS) lastfile.o
X! 	$(CC) $(CFLAGS) $(LDFLAGS) -o cadillac-cc1plus lastfile.o $(CPLUS_OBJS) $(CADILLAC_OBJS) $(OBJS) $(LIBS)
X  
X  cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
X--- 366,371 ----
X  	$(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus lastfile.o $(CPLUS_OBJS) cplus-edsel.o $(OBJS) $(LIBS) -lm
X  
X! caddy-cc1plus: $(CPLUS_OBJS) $(CADILLAC_OBJS) $(OBJS) $(LIBDEPS) lastfile.o
X! 	$(CC) $(CFLAGS) $(LDFLAGS) -o caddy-cc1plus lastfile.o $(CPLUS_OBJS) $(CADILLAC_OBJS) $(OBJS) $(LIBS)
X  
X  cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
X***************
X*** 355,366 ****
X  cplus-field.o : cplus-field.c $(CONFIG_H) $(TREE_H)
X  
X! cplus-cadillac.o : cplus-cadillac.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
X! 	$(CC) -c -DCADILLAC $(CFLAGS) $(INCLUDES) -I../cadillac/code/comp-dep -I../cadillac/code/connection $<
X! cplus-edsel.o : cplus-cadillac.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) -o cplus-edsel.o cplus-cadillac.c
X  
X  cplus-tab.o : $(srcdir)/cplus-tab.c $(CONFIG_H) $(CPLUS_TREE_H) \
X     cplus-parse.h flags.h input.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) -DPARSE_OUTPUT=\"$(PWD)/cplus-tab.out\" $<
X  
X  $(srcdir)/cplus-tab.c : $(srcdir)/cplus-parse.y
X--- 386,397 ----
X  cplus-field.o : cplus-field.c $(CONFIG_H) $(TREE_H)
X  
X! cplus-caddy.o : cplus-caddy.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
X! 	$(CC) -c -DCADILLAC $(CFLAGS) $(INCLUDES) -I../caddy/code/comp-dep -I../caddy/code/connection $<
X! cplus-edsel.o : cplus-caddy.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) -o cplus-edsel.o cplus-caddy.c
X  
X  cplus-tab.o : $(srcdir)/cplus-tab.c $(CONFIG_H) $(CPLUS_TREE_H) \
X     cplus-parse.h flags.h input.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) -DPARSE_OUTPUT=\"$(libdir)/cplus-tab.out\" $<
X  
X  $(srcdir)/cplus-tab.c : $(srcdir)/cplus-parse.y
X***************
X*** 370,374 ****
X  
X  cplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) $(srcdir)/cplus-tab.h input.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) $(USG_STDIO) $<
X  
X  lastfile.o : lastfile.c
X--- 401,405 ----
X  
X  cplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) $(srcdir)/cplus-tab.h input.h
X! 	$(CC) -c $(CFLAGS) $(INCLUDES) $(USG_STDIO) $(STANDARD_INCLUDE) $<
X  
X  lastfile.o : lastfile.c
X***************
X*** 455,473 ****
X  
X  insn-config.h: stamp-config.h ;
X! stamp-config.h : md genconfig
X! 	./genconfig md > tmp-insn-config.h
X! 	$(srcdir)/move-if-change tmp-insn-config.h insn-config.h
X  	touch stamp-config.h
X  
X  insn-flags.h: stamp-flags.h ;
X! stamp-flags.h : md genflags
X! 	./genflags md > tmp-insn-flags.h
X! 	$(srcdir)/move-if-change tmp-insn-flags.h insn-flags.h
X  	touch stamp-flags.h
X  
X  insn-codes.h: stamp-codes.h ;
X! stamp-codes.h : md gencodes
X! 	./gencodes md > tmp-insn-codes.h
X! 	$(srcdir)/move-if-change tmp-insn-codes.h insn-codes.h
X  	touch stamp-codes.h
X  
X--- 486,504 ----
X  
X  insn-config.h: stamp-config.h ;
X! stamp-config.h : $(MD) genconfig
X! 	./genconfig $(MD) > tmp-insn-config.h
X! 	$(gccdir)/move-if-change tmp-insn-config.h insn-config.h
X  	touch stamp-config.h
X  
X  insn-flags.h: stamp-flags.h ;
X! stamp-flags.h : $(MD) genflags
X! 	./genflags $(MD) > tmp-insn-flags.h
X! 	$(gccdir)/move-if-change tmp-insn-flags.h insn-flags.h
X  	touch stamp-flags.h
X  
X  insn-codes.h: stamp-codes.h ;
X! stamp-codes.h : $(MD) gencodes
X! 	./gencodes $(MD) > tmp-insn-codes.h
X! 	$(gccdir)/move-if-change tmp-insn-codes.h insn-codes.h
X  	touch stamp-codes.h
X  
X***************
X*** 477,483 ****
X  
X  insn-emit.c: stamp-emit.c ;
X! stamp-emit.c : md genemit
X! 	./genemit md > tmp-insn-emit.c
X! 	$(srcdir)/move-if-change tmp-insn-emit.c insn-emit.c
X  	touch stamp-emit.c
X  
X--- 508,514 ----
X  
X  insn-emit.c: stamp-emit.c ;
X! stamp-emit.c : $(MD) genemit
X! 	./genemit $(MD) > tmp-insn-emit.c
X! 	$(gccdir)/move-if-change tmp-insn-emit.c insn-emit.c
X  	touch stamp-emit.c
X  
X***************
X*** 486,492 ****
X  
X  insn-recog.c: stamp-recog.c ;
X! stamp-recog.c : md genrecog
X! 	./genrecog md > tmp-insn-recog.c
X! 	$(srcdir)/move-if-change tmp-insn-recog.c insn-recog.c
X  	touch stamp-recog.c
X  
X--- 517,523 ----
X  
X  insn-recog.c: stamp-recog.c ;
X! stamp-recog.c : $(MD) genrecog
X! 	./genrecog $(MD) > tmp-insn-recog.c
X! 	$(gccdir)/move-if-change tmp-insn-recog.c insn-recog.c
X  	touch stamp-recog.c
X  
X***************
X*** 495,501 ****
X  
X  insn-extract.c: stamp-extract.c ;
X! stamp-extract.c : md genextract
X! 	./genextract md > tmp-insn-extract.c
X! 	$(srcdir)/move-if-change tmp-insn-extract.c insn-extract.c
X  	touch stamp-extract.c
X  
X--- 526,532 ----
X  
X  insn-extract.c: stamp-extract.c ;
X! stamp-extract.c : $(MD) genextract
X! 	./genextract $(MD) > tmp-insn-extract.c
X! 	$(gccdir)/move-if-change tmp-insn-extract.c insn-extract.c
X  	touch stamp-extract.c
X  
X***************
X*** 504,510 ****
X  
X  insn-peep.c: stamp-peep.c ;
X! stamp-peep.c : md genpeep
X! 	./genpeep md > tmp-insn-peep.c
X! 	$(srcdir)/move-if-change tmp-insn-peep.c insn-peep.c
X  	touch stamp-peep.c
X  
X--- 535,541 ----
X  
X  insn-peep.c: stamp-peep.c ;
X! stamp-peep.c : $(MD) genpeep
X! 	./genpeep $(MD) > tmp-insn-peep.c
X! 	$(gccdir)/move-if-change tmp-insn-peep.c insn-peep.c
X  	touch stamp-peep.c
X  
X***************
X*** 514,520 ****
X  
X  insn-output.c: stamp-output.c ;
X! stamp-output.c : md genoutput
X! 	./genoutput md > tmp-insn-output.c
X! 	$(srcdir)/move-if-change tmp-insn-output.c insn-output.c
X  	touch stamp-output.c
X  
X--- 545,551 ----
X  
X  insn-output.c: stamp-output.c ;
X! stamp-output.c : $(MD) genoutput
X! 	./genoutput $(MD) > tmp-insn-output.c
X! 	$(gccdir)/move-if-change tmp-insn-output.c insn-output.c
X  	touch stamp-output.c
X  
X***************
X*** 623,626 ****
X--- 654,659 ----
X  # do make -f Makefile maketest DIR=../gcc TDIR=../gcc-test
X  # in the intended test directory to make it a suitable test directory.
X+ 
X+ ifdef NOTACHANCE
X  maketest:
X  	-rm -f =*
X***************
X*** 651,654 ****
X--- 684,688 ----
X  	-rm tm.h aux-output.c config.h md
X  # You must then run config.g++ to set up for compilation.
X+ endif
X  
X  bootstrap: all force
END_OF_FILE
if test 13046 -ne `wc -c <'Makefile-diffs'`; then
    echo shar: \"'Makefile-diffs'\" unpacked with wrong size!
fi
# end of 'Makefile-diffs'
fi
echo shar: End of shell archive.
exit 0
-- 
Chip Salzenberg at Teltronics/TCT     <chip at tct.uucp>, <uunet!pdn!tct!chip>
 "I want to mention that my opinions whether real or not are MY opinions."
             -- the inevitable William "Billy" Steinmetz



More information about the Comp.unix.sysv386 mailing list