From f19c1a78bda2b8977586f0067eca46fd7656bb9f Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Thu, 18 Feb 1993 17:24:11 -0800 Subject: [PATCH] (CPP_PREDEFINES): Add -D__GCC_NEW_VARARGS__. From-SVN: r3490 --- gcc/config/sparc/pbd.h | 2 +- gcc/config/sparc/sol2.h | 3 ++- gcc/config/sparc/sparc.h | 7 ++++++- gcc/config/sparc/sysv4.h | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/config/sparc/pbd.h b/gcc/config/sparc/pbd.h index 747ebf5f614..8a81b4bec27 100644 --- a/gcc/config/sparc/pbd.h +++ b/gcc/config/sparc/pbd.h @@ -26,7 +26,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Names to predefine in the preprocessor for this target machine. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dsparc -DUnicomPBD -Dunix" +#define CPP_PREDEFINES "-Dsparc -DUnicomPBD -Dunix -D__GCC_NEW_VARARGS__" /* We want DBX format for use with gdb under COFF. */ diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index 90abc4cf6f8..fd78139b059 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -24,7 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef CPP_PREDEFINES #define CPP_PREDEFINES \ - "-Dsun -Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc)" + "-Dsun -Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc)\ + -D__GCC_NEW_VARARGS__" #undef CPP_SPEC #define CPP_SPEC "\ diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 60e7cc28d5a..fa4799caf10 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -81,7 +81,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Names to predefine in the preprocessor for this target machine. */ -#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix" +/* The GCC_NEW_VARARGS macro is so that old versions of gcc can compile + new versions, which have an incompatible va-sparc.h file. This matters + because gcc does "gvarargs.h" instead of , and thus gets the + wrong varargs file when it is compiled with a different version of gcc. */ + +#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -D__GCC_NEW_VARARGS__" /* Print subsidiary information on the compiler version in use. */ diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 960eb5617dc..6759ae32019 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -52,7 +52,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the Sparc running svr4. __svr4__ is our extension. */ #define CPP_PREDEFINES \ - "-Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc)" + "-Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc) \ + -D__GCC_NEW_VARARGS__" /* The specialized code which needs to appear in the .init section prior to the prologue code for `__do_global_ctors' (see crtstuff.c). -- 2.30.2