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


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

%[spec] and x86 cpp option problems


The x86 ports have 2 minor bugs in the the cpp option support.
1) When -ansi is used, they define macros in user namespace, e.g. -Di386.
2) Some macros defined by gcc-2.7.2.3 aren't defined anymore, e.g. -D__i386.

The x86 port tries to handle cpp options by using %(cpp_cpu) %[cpp_cpu].
The intent is that %() will behave like %p, and %[] like %P, but this has two
flaws.  First, the code for %[] does not do all of the things that %P does.
Second, %p can't be used when -ansi.  Fixing this means we would have to
rewrite the %[] support code a bit, and we would have to change the x86 specs
to be instead %{!ansi:%(cpp_cpu)} %[cpp_cpu].  I think this is a bit cryptic,
and likely to result in errors.  Given that we have to explicitly mention ansi
in the specs anyways, it seems cleaner to mention it where we define the -D
options.  This is what all other ports that use %() specs do, e.g. they say
	%{!ansi:-Dfoo} -D__foo -D__foo__
Also, given that ports that need non-ansi macros defined by default are getting
rarer and rarer, I don't think we should complicate the %() support to make
it easy to define non-ansi macros.

The following patch deletes the %[] support, and rewrites the x86 specs to
explicitly handle -ansi, fixing the above problems.

One problem with this is that it means specs aren't backward compatible,
which means that people using -b or -V may get errors.  These options have
have never been safe, and I have always recommended against their use, but we
may need to keep them working.  I could perhaps just give a warning instead
of an error when %[] is used.

Thu Jul  9 15:24:18 1998  Jim Wilson  <wilson@cygnus.com>

	* i386/i386.h (CPP_486_SPEC, CPP_586_SPEC, CPP_686_SPEC): New specs.
	(CPP_CPU_DEFAULT_SPEC, CPP_CPU_SPEC): Use them.
	(EXTRA_SPECS): Support them.
	* gcc.c: Delete %[spec] support.
	(do_spec_1, case '('): Likewise.
	(do_spec_1, case '['): Call error.
	* i386/aix386ng.h, cygwin32.h, freebsd-elf.h, gas.h, isc.h,
	linux-aout.h, linux-oldld.h, linux.h, osfelf.h, osfrose.h, sco.h,
	sco4.h, sco4dbx.h, sco5.h, sol2.h, sysv3.h (CPP_SPEC): Delete
	%[cpp_cpu].
	
Index: gcc.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gcc.c,v
retrieving revision 1.44
diff -p -r1.44 gcc.c
*** gcc.c	1998/06/30 01:41:44	1.44
--- gcc.c	1998/07/09 22:23:32
*************** or with constant text in a single argume
*** 359,365 ****
   %{S|P:X} substitutes X if either -S or -P was given to CC.  This may be
  	  combined with ! and . as above binding stronger than the OR.
   %(Spec) processes a specification defined in a specs file as *Spec:
-  %[Spec] as above, but put __ around -D arguments
  
  The conditional text X in a %{S:X} or %{!S:X} construct may contain
  other nested % constructs or spaces, or even newlines.  They are
--- 359,364 ----
*************** skip_whitespace (p)
*** 1103,1110 ****
  }
  
  /* Structure to keep track of the specs that have been defined so far.
!    These are accessed using %(specname) or %[specname] in a compiler
!    or link spec.  */
  
  struct spec_list
  {
--- 1102,1108 ----
  }
  
  /* Structure to keep track of the specs that have been defined so far.
!    These are accessed using %(specname) in a compiler or link spec.  */
  
  struct spec_list
  {
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 3912,3922 ****
  
  	    /* Process a string found as the value of a spec given by name.
  	       This feature allows individual machine descriptions
! 	       to add and use their own specs.
! 	       %[...] modifies -D options the way %P does;
! 	       %(...) uses the spec unmodified.  */
  	  case '(':
- 	  case '[':
  	    {
  	      char *name = p;
  	      struct spec_list *sl;
--- 3910,3917 ----
  
  	    /* Process a string found as the value of a spec given by name.
  	       This feature allows individual machine descriptions
! 	       to add and use their own specs.  */
  	  case '(':
  	    {
  	      char *name = p;
  	      struct spec_list *sl;
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 3924,3930 ****
  
  	      /* The string after the S/P is the name of a spec that is to be
  		 processed.  */
! 	      while (*p && *p != ')' && *p != ']')
  		p++;
  
  	      /* See if it's in the list */
--- 3919,3925 ----
  
  	      /* The string after the S/P is the name of a spec that is to be
  		 processed.  */
! 	      while (*p && *p != ')')
  		p++;
  
  	      /* See if it's in the list */
*************** do_spec_1 (spec, inswitch, soft_matched_
*** 3933,3998 ****
  		  {
  		    name = *(sl->ptr_spec);
  #ifdef DEBUG_SPECS
! 		    fprintf (stderr, "Processing spec %c%s%c, which is '%s'\n",
! 			     c, sl->name, (c == '(') ? ')' : ']', name);
  #endif
  		    break;
  		  }
  
  	      if (sl)
  		{
! 		  if (c == '(')
! 		    {
! 		      value = do_spec_1 (name, 0, NULL_PTR);
! 		      if (value != 0)
! 			return value;
! 		    }
! 		  else
! 		    {
! 		      char *x = (char *) alloca (strlen (name) * 2 + 1);
! 		      char *buf = x;
! 		      char *y = name;
! 		      int flag = 0;
! 
! 		      /* Copy all of NAME into BUF, but put __ after
! 			 every -D and at the end of each arg,  */
! 		      while (1)
! 			{
! 			  if (! strncmp (y, "-D", 2))
! 			    {
! 			      *x++ = '-';
! 			      *x++ = 'D';
! 			      *x++ = '_';
! 			      *x++ = '_';
! 			      y += 2;
! 			      flag = 1;
! 			      continue;
! 			    }
!                           else if (flag && (*y == ' ' || *y == '\t' || *y == '='
!                                             || *y == '}' || *y == 0))
! 			    {
! 			      *x++ = '_';
! 			      *x++ = '_';
! 			      flag = 0;
! 			    }
!                           if (*y == 0)
! 			    break;
! 			  else
! 			    *x++ = *y++;
! 			}
! 		      *x = 0;
! 
! 		      value = do_spec_1 (buf, 0, NULL_PTR);
! 		      if (value != 0)
! 			return value;
! 		    }
  		}
  
! 	      /* Discard the closing paren or bracket.  */
  	      if (*p)
  		p++;
  	    }
  	    break;
  
  	  case 'v':
  	    {
--- 3928,3958 ----
  		  {
  		    name = *(sl->ptr_spec);
  #ifdef DEBUG_SPECS
! 		    fprintf (stderr, "Processing spec %s, which is '%s'\n",
! 			     sl->name, name);
  #endif
  		    break;
  		  }
  
  	      if (sl)
  		{
! 		  value = do_spec_1 (name, 0, NULL_PTR);
! 		  if (value != 0)
! 		    return value;
  		}
  
! 	      /* Discard the closing paren.  */
  	      if (*p)
  		p++;
  	    }
  	    break;
+ 
+ 	    /* This used to be like %(, except that it modified -D options
+ 	       the same way as %P.  This has been obsoleted, as it was not
+ 	       useful for obtaining correct ISO C semantics for defines.  */
+ 	  case '[':
+ 	    error ("use of obsolete %[ operator in specs");
+ 	    return -1;
  
  	  case 'v':
  	    {
Index: config/i386/aix386ng.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/aix386ng.h,v
retrieving revision 1.2
diff -p -r1.2 aix386ng.h
*** aix386ng.h	1998/06/11 15:22:41	1.2
--- aix386ng.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 46,52 ****
  
  #define CPP_PREDEFINES "-Dps2 -Dunix -Asystem(aix)"
  
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
    %{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
  
  /* special flags for the aix assembler to generate the short form for all
--- 46,52 ----
  
  #define CPP_PREDEFINES "-Dps2 -Dunix -Asystem(aix)"
  
! #define CPP_SPEC "%(cpp_cpu) \
    %{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
  
  /* special flags for the aix assembler to generate the short form for all
Index: config/i386/cygwin32.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/cygwin32.h,v
retrieving revision 1.10
diff -p -r1.10 cygwin32.h
*** cygwin32.h	1998/07/07 23:31:03	1.10
--- cygwin32.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA. */
*** 50,56 ****
    -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "-remap %(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
  
  /* We have to dynamic link to get to the system DLLs.  All of libc, libm and
     the Unix stuff is in cygwin.dll.  The import library is called
--- 50,56 ----
    -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
  
  /* We have to dynamic link to get to the system DLLs.  All of libc, libm and
     the Unix stuff is in cygwin.dll.  The import library is called
Index: config/i386/freebsd-elf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/freebsd-elf.h,v
retrieving revision 1.7
diff -p -r1.7 freebsd-elf.h
*** freebsd-elf.h	1998/07/05 23:02:02	1.7
--- freebsd-elf.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 143,149 ****
  #define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef	LIB_SPEC
  #if 1
--- 143,149 ----
  #define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef	LIB_SPEC
  #if 1
Index: config/i386/gas.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/gas.h,v
retrieving revision 1.3
diff -p -r1.3 gas.h
*** gas.h	1998/05/21 19:12:18	1.3
--- gas.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 57,63 ****
  /* Specify predefined symbols in preprocessor.  */
  
  #define CPP_PREDEFINES "-Dunix"
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
  
  /* Allow #sccs in preprocessor.  */
  
--- 57,63 ----
  /* Specify predefined symbols in preprocessor.  */
  
  #define CPP_PREDEFINES "-Dunix"
! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
  
  /* Allow #sccs in preprocessor.  */
  
Index: config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.26
diff -p -r1.26 i386.h
*** i386.h	1998/07/01 23:07:35	1.26
--- i386.h	1998/07/09 22:23:32
*************** extern int ix86_arch;
*** 304,318 ****
  %{mpentiumpro:-mcpu=pentiumpro}}"
  #endif
  
  #ifndef CPP_CPU_DEFAULT_SPEC
  #if TARGET_CPU_DEFAULT == 1
! #define CPP_CPU_DEFAULT_SPEC "-Di486"
  #else
  #if TARGET_CPU_DEFAULT == 2
! #define CPP_CPU_DEFAULT_SPEC "-Dpentium -Di586"
  #else
  #if TARGET_CPU_DEFAULT == 3
! #define CPP_CPU_DEFAULT_SPEC "-Dpentiumpro -Di686"
  #else
  #define CPP_CPU_DEFAULT_SPEC ""
  #endif
--- 304,324 ----
  %{mpentiumpro:-mcpu=pentiumpro}}"
  #endif
  
+ #define CPP_486_SPEC "%{!ansi:-Di486} -D__i486 -D__i486__"
+ #define CPP_586_SPEC "%{!ansi:-Di586 -Dpentium} \
+ 	-D__i586 -D__i586__ -D__pentium -D__pentium__"
+ #define CPP_686_SPEC "%{!ansi:-Di686 -Dpentiumpro} \
+ 	-D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__"
+ 
  #ifndef CPP_CPU_DEFAULT_SPEC
  #if TARGET_CPU_DEFAULT == 1
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_486)"
  #else
  #if TARGET_CPU_DEFAULT == 2
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_586)"
  #else
  #if TARGET_CPU_DEFAULT == 3
! #define CPP_CPU_DEFAULT_SPEC "%(cpp_686)"
  #else
  #define CPP_CPU_DEFAULT_SPEC ""
  #endif
*************** extern int ix86_arch;
*** 322,332 ****
  
  #ifndef CPP_CPU_SPEC
  #define CPP_CPU_SPEC "\
! -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) \
! %{mcpu=i486:-Di486} %{m486:-Di486} \
! %{mpentium:-Dpentium -Di586} %{mcpu=pentium:-Dpentium -Di586} \
! %{mpentiumpro:-Dpentiumpro -Di686} %{mcpu=pentiumpro:-Dpentiumpro -Di686} \
! %{!mcpu*:%{!m486:%{!mpentium*: %[cpp_cpu_default]}}}"
  #endif
  
  #ifndef CC1_SPEC
--- 328,339 ----
  
  #ifndef CPP_CPU_SPEC
  #define CPP_CPU_SPEC "\
! -Asystem(unix) -Acpu(i386) -Amachine(i386) \
! %{!ansi:-Di386} -D__i386 -D__i386__ \
! %{mcpu=i486:%(cpp_486)} %{m486:%(cpp_486)} \
! %{mpentium:%(cpp_586)} %{mcpu=pentium:%(cpp_586)} \
! %{mpentiumpro:%(cpp_686)} %{mcpu=pentiumpro:%(cpp_686)} \
! %{!mcpu*:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}"
  #endif
  
  #ifndef CC1_SPEC
*************** extern int ix86_arch;
*** 348,353 ****
--- 355,363 ----
  #endif
  
  #define EXTRA_SPECS							\
+   { "cpp_486", CPP_486_SPEC},						\
+   { "cpp_586", CPP_586_SPEC},						\
+   { "cpp_686", CPP_686_SPEC},						\
    { "cpp_cpu_default",	CPP_CPU_DEFAULT_SPEC },				\
    { "cpp_cpu",	CPP_CPU_SPEC },						\
    { "cc1_cpu",  CC1_CPU_SPEC },						\
Index: config/i386/isc.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/isc.h,v
retrieving revision 1.1.1.2
diff -p -r1.1.1.2 isc.h
*** isc.h	1997/12/06 17:25:23	1.1.1.2
--- isc.h	1998/07/09 22:23:32
***************
*** 19,25 ****
  #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
  
  /* ISC 2.2 uses `char' for `wchar_t'.  */
  #undef WCHAR_TYPE
--- 19,25 ----
  #define LIB_SPEC "%{shlib:-lc_s} %{posix:-lcposix} %{Xp:-lcposix} -lc -lg"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{Xp:-D_POSIX_SOURCE}"
  
  /* ISC 2.2 uses `char' for `wchar_t'.  */
  #undef WCHAR_TYPE
Index: config/i386/linux-aout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/linux-aout.h,v
retrieving revision 1.3
diff -p -r1.3 linux-aout.h
*** linux-aout.h	1998/06/29 21:40:32	1.3
--- linux-aout.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 34,40 ****
  #define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
--- 34,40 ----
  #define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
Index: config/i386/linux-oldld.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/linux-oldld.h,v
retrieving revision 1.3
diff -p -r1.3 linux-oldld.h
*** linux-oldld.h	1998/06/29 21:40:33	1.3
--- linux-oldld.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 35,41 ****
  #define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
--- 35,41 ----
  #define CPP_PREDEFINES "-Dunix -Dlinux -Asystem(posix)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
Index: config/i386/linux.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/linux.h,v
retrieving revision 1.9
diff -p -r1.9 linux.h
*** linux.h	1998/07/05 23:02:03	1.9
--- linux.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 155,163 ****
  
  #undef CPP_SPEC
  #ifdef USE_GNULIBC_1
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  #else
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  #endif
  
  #undef CC1_SPEC
--- 155,163 ----
  
  #undef CPP_SPEC
  #ifdef USE_GNULIBC_1
! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
  #else
! #define CPP_SPEC "%(cpp_cpu) %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
  #endif
  
  #undef CC1_SPEC
Index: config/i386/osfelf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/osfelf.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 osfelf.h
*** osfelf.h	1997/08/11 15:57:17	1.1.1.1
--- osfelf.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 25,31 ****
  #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
  
  #undef  CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
  %{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
  %{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
  %{mno-underscores: -D__NO_UNDERSCORES__} \
--- 25,31 ----
  #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
  
  #undef  CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
  %{mrose: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
  %{!mrose: -D__ELF__ %{fpic: -D__SHARED__}} \
  %{mno-underscores: -D__NO_UNDERSCORES__} \
Index: config/i386/osfrose.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/osfrose.h,v
retrieving revision 1.3
diff -p -r1.3 osfrose.h
*** osfrose.h	1998/03/06 14:44:50	1.3
--- osfrose.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 93,99 ****
  #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
  
  #undef  CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
  %{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
  %{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
  %{mno-underscores: -D__NO_UNDERSCORES__} \
--- 93,99 ----
  #define CPP_PREDEFINES "-DOSF -DOSF1 -Dunix -Asystem(xpg4)"
  
  #undef  CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
  %{!melf: -D__ROSE__ %{!pic-none: -D__SHARED__}} \
  %{melf: -D__ELF__ %{fpic: -D__SHARED__}} \
  %{mno-underscores: -D__NO_UNDERSCORES__} \
Index: config/i386/sco.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 sco.h
*** sco.h	1997/08/11 15:57:17	1.1.1.1
--- sco.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 58,64 ****
  #define CPP_PREDEFINES "-Dunix -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{scointl:-DM_INTERNAT}"
  
  /* This spec is used for telling cpp whether char is signed or not.  */
  
--- 58,64 ----
  #define CPP_PREDEFINES "-Dunix -DM_UNIX -DM_I386 -DM_COFF -DM_WORDSWAP -Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %{scointl:-DM_INTERNAT}"
  
  /* This spec is used for telling cpp whether char is signed or not.  */
  
Index: config/i386/sco4.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco4.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 sco4.h
*** sco4.h	1997/08/11 15:57:17	1.1.1.1
--- sco4.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 66,72 ****
   "-Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
    -D_i386 -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
    -D_unix -D_M_UNIX -D_M_XENIX \
    -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
--- 66,72 ----
   "-Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
    -D_i386 -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
    -D_unix -D_M_UNIX -D_M_XENIX \
    -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
Index: config/i386/sco4dbx.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco4dbx.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 sco4dbx.h
*** sco4dbx.h	1997/08/11 15:57:17	1.1.1.1
--- sco4dbx.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 64,70 ****
  #define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
    -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
    -D_M_UNIX -D_M_XENIX \
    -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
--- 64,70 ----
  #define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
    -D_M_I386 -D_M_I86 -D_M_I86SM -D_M_SDATA -D_M_STEXT \
    -D_M_UNIX -D_M_XENIX \
    -D_M_SYS5 -D_M_SYSV -D_M_SYS3 -D_M_SYSIII \
Index: config/i386/sco5.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sco5.h,v
retrieving revision 1.15
diff -p -r1.15 sco5.h
*** sco5.h	1998/07/02 08:13:43	1.15
--- sco5.h	1998/07/09 22:23:32
*************** dtors_section ()							\
*** 832,838 ****
  /* You are in a maze of GCC specs ... all alike */
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
    %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \
    %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \
    -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \
--- 832,838 ----
  /* You are in a maze of GCC specs ... all alike */
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
    %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \
    %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \
    -D__i386 -D__unix -D_SCO_DS=1 -D_M_I386 -D_M_XENIX -D_M_UNIX \
Index: config/i386/sol2.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sol2.h,v
retrieving revision 1.1.1.4
diff -p -r1.1.1.4 sol2.h
*** sol2.h	1998/04/04 05:27:40	1.1.1.4
--- sol2.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 39,45 ****
    "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] \
     %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
  
  #undef LIB_SPEC
--- 39,45 ----
    "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)"
  
  #undef CPP_SPEC
! #define CPP_SPEC "%(cpp_cpu) \
     %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
  
  #undef LIB_SPEC
Index: config/i386/sysv3.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/sysv3.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 sysv3.h
*** sysv3.h	1997/08/11 15:57:17	1.1.1.1
--- sysv3.h	1998/07/09 22:23:32
*************** Boston, MA 02111-1307, USA.  */
*** 44,50 ****
  
  #define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
  
! #define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{posix:-D_POSIX_SOURCE}"
  
  /* Writing `int' for a bitfield forces int alignment for the structure.  */
  
--- 44,50 ----
  
  #define CPP_PREDEFINES "-Dunix -Asystem(svr3)"
  
! #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
  
  /* Writing `int' for a bitfield forces int alignment for the structure.  */
  


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