]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alpha.h (CPP_SPEC): Tidy.
authorRichard Henderson <rth@cygnus.com>
Mon, 20 Jul 1998 22:47:31 +0000 (15:47 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 20 Jul 1998 22:47:31 +0000 (15:47 -0700)
        * alpha.h (CPP_SPEC): Tidy.  Hook to cpp_cpu and cpp_subtarget.
        (CPP_SUBTARGET_SPEC): Default to empty string.
        (CPP_AM_*, CPP_IM_*, CPP_CPU_*, CPP_CPU_SPEC): New.
        (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): New.
        * alpha/elf.h (LD_SPEC): Use %(elf_dynamic_linker).
        * alpha/linux-elf.h (SUBTARGET_EXTRA_SPECS): New.
        (LIB_SPEC): Tidy.
        * alpha/linux.h (CPP_PREDEFINES): Tidy.
        * alpha/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): New.
        * alpha/netbsd.h (CPP_PREDEFINES): Tidy.
        * alpha/osf.h (CPP_PREDEFINES): Remove bits subsumed by CPP_CPU_SPEC.
        * alpha/win-nt.h (CPP_PREDEFINES): Likewise.
        * alpha/vsf.h (CPP_PREDEFINES): Likewise.
        (CPP_SUBTARGET_SPEC): New.  Do this instead of overriding CPP_SPEC.
        * alpha/vxworks.h: Likewise.

From-SVN: r21310

gcc/ChangeLog
gcc/config/alpha/alpha.h
gcc/config/alpha/elf.h
gcc/config/alpha/linux-elf.h
gcc/config/alpha/linux.h
gcc/config/alpha/netbsd-elf.h
gcc/config/alpha/netbsd.h
gcc/config/alpha/osf.h
gcc/config/alpha/vms.h
gcc/config/alpha/vxworks.h
gcc/config/alpha/win-nt.h

index 80122bb775866b6a9c333fe7be1b59fbb54e5bbf..8bbd5ba090be12fc8f888452c38e334b1dd8df86 100644 (file)
@@ -1,3 +1,21 @@
+Mon Jul 20 22:34:17 1998  Richard Henderson  <rth@cygnus.com>
+
+       * alpha.h (CPP_SPEC): Tidy.  Hook to cpp_cpu and cpp_subtarget.
+       (CPP_SUBTARGET_SPEC): Default to empty string.
+       (CPP_AM_*, CPP_IM_*, CPP_CPU_*, CPP_CPU_SPEC): New.
+       (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): New.
+       * alpha/elf.h (LD_SPEC): Use %(elf_dynamic_linker).
+       * alpha/linux-elf.h (SUBTARGET_EXTRA_SPECS): New.
+       (LIB_SPEC): Tidy.
+       * alpha/linux.h (CPP_PREDEFINES): Tidy.
+       * alpha/netbsd-elf.h (SUBTARGET_EXTRA_SPECS): New.
+       * alpha/netbsd.h (CPP_PREDEFINES): Tidy.
+       * alpha/osf.h (CPP_PREDEFINES): Remove bits subsumed by CPP_CPU_SPEC.
+       * alpha/win-nt.h (CPP_PREDEFINES): Likewise.
+       * alpha/vsf.h (CPP_PREDEFINES): Likewise.
+       (CPP_SUBTARGET_SPEC): New.  Do this instead of overriding CPP_SPEC.
+       * alpha/vxworks.h: Likewise.
+
 Mon Jul 20 22:51:57 1998  Ken Raeburn  <raeburn@cygnus.com>
 
        * mips.md (reload_outsi): Added missing REGNO call.
index 2bd93c3bb3bd4a0465c02b8fe3dacce5b059254e..6e612afc5748daf254742a3e7dc9cea0c78da409 100644 (file)
@@ -23,14 +23,18 @@ Boston, MA 02111-1307, USA.  */
 /* Write out the correct language type definition for the header files.  
    Unless we have assembler language, write out the symbols for C.  */
 #define CPP_SPEC "\
-%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}  \
-%{.S:  -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
-%{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.cxx:        -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.C:  -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.m:  -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C} \
-%{mieee:-D_IEEE_FP} \
-%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT}"
+%{!undef:\
+%{.S:-D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY }}\
+%{.cc|.cxx|.C:-D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus }\
+%{.m:-D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C }\
+%{!.S:%{!.cc:%{!.cxx:%{!.C:%{!.m:-D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C }}}}}}\
+%{mieee:-D_IEEE_FP }\
+%{mieee-with-inexact:-D_IEEE_FP -D_IEEE_FP_INEXACT }}\
+%(cpp_cpu) %(cpp_subtarget)"
+
+#ifndef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
+#endif
 
 /* Set the spec to use for signed char.  The default tests the above macro
    but DEC's compiler can't handle the conditional in a "constant"
@@ -240,6 +244,88 @@ extern char *alpha_mlat_string;    /* For -mmemory-latency= */
   {"memory-latency=",  &alpha_mlat_string},    \
 }
 
+/* Attempt to describe CPU characteristics to the preprocessor.  */
+
+/* Corresponding to amask... */
+#define CPP_AM_BWX_SPEC        "-D__alpha_bwx__ -Acpu(bwx)"
+#define CPP_AM_MAX_SPEC        "-D__alpha_max__ -Acpu(max)"
+#define CPP_AM_CIX_SPEC        "-D__alpha_cix__ -Acpu(cix)"
+
+/* Corresponding to implver... */
+#define CPP_IM_EV4_SPEC        "-D__alpha_ev4__ -Acpu(ev4)"
+#define CPP_IM_EV5_SPEC        "-D__alpha_ev5__ -Acpu(ev5)"
+#define CPP_IM_EV6_SPEC        "-D__alpha_ev6__ -Acpu(ev6)"
+
+/* Common combinations.  */
+#define CPP_CPU_EV4_SPEC       "%(cpp_im_ev4)"
+#define CPP_CPU_EV5_SPEC       "%(cpp_im_ev5)"
+#define CPP_CPU_EV56_SPEC      "%(cpp_im_ev5) %(cpp_am_bwx)"
+#define CPP_CPU_PCA56_SPEC     "%(cpp_im_ev5) %(cpp_am_bwx) %(cpp_am_max)"
+#define CPP_CPU_EV6_SPEC       "%(cpp_im_ev6) %(cpp_am_bwx) %(cpp_am_max) %(cpp_am_cix)"
+
+#ifndef CPP_CPU_DEFAULT_SPEC
+# if TARGET_CPU_DEFAULT & MASK_CPU_EV6
+#  define CPP_CPU_DEFAULT_SPEC         CPP_CPU_EV6_SPEC
+# else
+#  if TARGET_CPU_DEFAULT & MASK_CPU_EV5
+#   if TARGET_CPU_DEFAULT & MASK_MAX
+#    define CPP_CPU_DEFAULT_SPEC       CPP_CPU_PCA56_SPEC
+#   else
+#    if TARGET_CPU_DEFAULT & MASK_BWX
+#     define CPP_CPU_DEFAULT_SPEC      CPP_CPU_EV56_SPEC
+#    else
+#     define CPP_CPU_DEFAULT_SPEC      CPP_CPU_EV5_SPEC
+#    endif
+#   endif
+#  else
+#   define CPP_CPU_DEFAULT_SPEC                CPP_CPU_EV4_SPEC
+#  endif
+# endif
+#endif /* CPP_CPU_DEFAULT_SPEC */
+
+#ifndef CPP_CPU_SPEC
+#define CPP_CPU_SPEC "\
+%{!undef:-Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ \
+%{mcpu=ev4|mcpu=21064:%(cpp_cpu_ev4) }\
+%{mcpu=ev5|mcpu=21164:%(cpp_cpu_ev5) }\
+%{mcpu=ev56|mcpu=21164a:%(cpp_cpu_ev56) }\
+%{mcpu=pca56|mcpu=21164pc|mcpu=21164PC:%(cpp_cpu_pca56) }\
+%{mcpu=ev6|mcpu=21264:%(cpp_cpu_ev6) }\
+%{!mcpu*:%(cpp_cpu_default) }}"
+#endif
+
+/* This macro defines names of additional specifications to put in the
+   specs that can be used in various specifications like CC1_SPEC.  Its
+   definition is an initializer with a subgrouping for each command option.
+
+   Each subgrouping contains a string constant, that defines the
+   specification name, and a string constant that used by the GNU CC driver
+   program.
+
+   Do not define this macro if it does not need to do anything.  */
+
+#ifndef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS
+#endif
+
+#define EXTRA_SPECS                            \
+  { "cpp_am_bwx", CPP_AM_BWX_SPEC },           \
+  { "cpp_am_max", CPP_AM_MAX_SPEC },           \
+  { "cpp_am_cix", CPP_AM_CIX_SPEC },           \
+  { "cpp_im_ev4", CPP_IM_EV4_SPEC },           \
+  { "cpp_im_ev5", CPP_IM_EV5_SPEC },           \
+  { "cpp_im_ev6", CPP_IM_EV6_SPEC },           \
+  { "cpp_cpu_ev4", CPP_CPU_EV4_SPEC },         \
+  { "cpp_cpu_ev5", CPP_CPU_EV5_SPEC },         \
+  { "cpp_cpu_ev56", CPP_CPU_EV56_SPEC },       \
+  { "cpp_cpu_pca56", CPP_CPU_PCA56_SPEC },     \
+  { "cpp_cpu_ev6", CPP_CPU_EV6_SPEC },         \
+  { "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
+  { "cpp_cpu", CPP_CPU_SPEC },                 \
+  { "cpp_subtarget", CPP_SUBTARGET_SPEC },     \
+  SUBTARGET_EXTRA_SPECS
+
+
 /* Sometimes certain combinations of command options do not make sense
    on a particular target machine.  You can define a macro
    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
@@ -1209,7 +1295,7 @@ do {                                              \
 /* A C expression whose value is RTL representing the value of the return
    address for the frame COUNT steps up from the current frame.
    FRAMEADDR is the frame pointer of the COUNT frame, or the frame pointer of
-   the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME} is defined.  */
+   the COUNT-1 frame if RETURN_ADDR_IN_PREVIOUS_FRAME is defined.  */
 
 #define RETURN_ADDR_RTX  alpha_return_addr
 extern struct rtx_def *alpha_return_addr ();
index d28847c44d937d711f1526f51d7c45700698c38b..4f4703c14ef0e7943d1a12efbf482426618f6edc 100644 (file)
@@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA.    */
   %{!shared:                                                   \
     %{!static:                                                 \
       %{rdynamic:-export-dynamic}                              \
-      %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}}\
+      %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}}        \
     %{static:-static}}"
 
 /* Output at beginning of assembler file.  */
index 40aa332d189da7727bb380eacb10c39f8ec2db58..90009f1c5d0ccb406c1fa617f1d68d718373d654 100644 (file)
@@ -22,13 +22,17 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ELF)");
 
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+
 #undef SUB_CPP_PREDEFINES
-#define SUB_CPP_PREDEFINES "-D__ELF__"
+#define SUB_CPP_PREDEFINES     "-D__ELF__"
 
 #ifdef USE_GNULIBC_1
-#define ELF_DYNAMIC_LINKER  "/lib/ld.so.1"
+#define ELF_DYNAMIC_LINKER     "/lib/ld.so.1"
 #else
-#define ELF_DYNAMIC_LINKER  "/lib/ld-linux.so.2"
+#define ELF_DYNAMIC_LINKER     "/lib/ld-linux.so.2"
 #endif
 
 #ifndef USE_GNULIBC_1
@@ -39,7 +43,5 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #ifndef USE_GNULIBC_1
 #undef LIB_SPEC
 #define LIB_SPEC \
-  "%{shared: -lc} \
-   %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
-       %{profile:-lc_p} %{!profile: -lc}}"
+"%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} "
 #endif
index 00df8e590369f8d0561a6b547949ba41d204da88..39c1f575ecee1add63f189cf70e6537091c9038f 100644 (file)
@@ -23,9 +23,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "\
--D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix \
--Asystem(linux) -Acpu(alpha) -Amachine(alpha) " SUB_CPP_PREDEFINES
+#define CPP_PREDEFINES \
+"-Dlinux -Dunix -Asystem(linux) -D_LONGLONG " SUB_CPP_PREDEFINES
 
 #undef LIB_SPEC
 #define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
index 353e62f02cd35bb1854c30a8d46fae18bc38eebb..17d7bb0e4ae1f9052aced584135e7df2afad4a06 100644 (file)
@@ -24,4 +24,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef SUB_CPP_PREDEFINES
 #define SUB_CPP_PREDEFINES "-D__ELF__"
 
-#define ELF_DYNAMIC_LINKER  "/usr/libexec/ld.elf_so"
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+
+#define ELF_DYNAMIC_LINKER     "/usr/libexec/ld.elf_so"
index 56559f3145b79fe1b4e24aa781f8184ec1039a50..054e9e063b4656ec2da83fa2a748dd89e0f04655 100644 (file)
@@ -22,9 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "\
--D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dnetbsd -Dunix \
--Asystem(linux) -Acpu(alpha) -Amachine(alpha) " SUB_CPP_PREDEFINES
+#define CPP_PREDEFINES "-D_LONGLONG -Dnetbsd -Dunix " SUB_CPP_PREDEFINES
 
 #undef LIB_SPEC
 #define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
index 1e8e505d97898fdf932766c3338dd1d75a456a9e..956961f7cf3c3826fa627983d21beb66bab1c6d3 100644 (file)
@@ -27,8 +27,8 @@ Boston, MA 02111-1307, USA.  */
 /* Names to predefine in the preprocessor for this target machine.  */
 
 #define CPP_PREDEFINES "\
--Dunix -D__osf__ -D__alpha -D__alpha__ -D_LONGLONG -DSYSTYPE_BSD  \
--D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -Acpu(alpha) -Amachine(alpha)"
+-Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD \
+-D_SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4)"
 
 /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
 
index e318f0bfde475fe67f671cf1effebf48e9653055..44cf5bf82dff5093b3068a554c41a477b70f3e93 100644 (file)
@@ -31,20 +31,13 @@ Boston, MA 02111-1307, USA.  */
 
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES \
-"-D__ALPHA -Dvms -DVMS -D__alpha__ -D__alpha -D__vms__ -D__VMS__\
- -Asystem(vms) -Acpu(alpha) -Amachine(alpha)"
+"-D__ALPHA -Dvms -DVMS -D__vms__ -D__VMS__ -Asystem(vms)"
 
-#undef CPP_SPEC
-#define CPP_SPEC "\
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC "\
 %{mfloat-ieee:-D__IEEE_FLOAT} \
 %{mfloat-vax:-D__G_FLOAT} \
-%{!mfloat-vax:-D__IEEE_FLOAT} \
-%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}  \
-%{.S:  -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \
-%{.cc: -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.cxx:        -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.C:  -D__LANGUAGE_C_PLUS_PLUS__ -D__LANGUAGE_C_PLUS_PLUS -D__cplusplus} \
-%{.m:  -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C}"
+%{!mfloat-vax:-D__IEEE_FLOAT}"
 
 /* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf.  */
 
index 9d21ad9b0cc8e5663f438b7f89ad3ac20bc3daae..6dee4b3e721182c88464b9c2e9748f4878c85b37 100644 (file)
@@ -20,20 +20,16 @@ Boston, MA 02111-1307, USA.  */
 
 /* This file just exists to give specs for the Alpha running on VxWorks.  */
 
-#undef CPP_SPEC
-#define CPP_SPEC "\
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC "\
 %{mvxsim:-DCPU=SIMALPHADUNIX} \
-%{!mvxsim: %{!mcpu*:-DCPU=21064} \
-           %{mcpu=21064:-DCPU=21064} \
-           %{mcpu=21164:-DCPU=21164}} \
-%{posix: -D_POSIX_SOURCE} \
-%{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}}  \
-%{.S:  -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}}"
+%{!mvxsim: %{!mcpu*|mcpu=21064:-DCPU=21064} %{mcpu=21164:-DCPU=21164}} \
+%{posix: -D_POSIX_SOURCE}"
 
 #undef CPP_PREDEFINES
 #define CPP_PREDEFINES "\
 -D__vxworks -D__alpha_vxworks -Asystem(vxworks) \
--Asystem(embedded) -D_LONGLONG  -Acpu(alpha) -Amachine(alpha)"
+-Asystem(embedded) -D_LONGLONG"
 
 /* VxWorks does all the library stuff itself.  */
 
index 1233a80a68f3b11df8c6a35661aa1cfa8a465d52..339ed4465a39208a0cca955e5c8b9a837a72dc26 100644 (file)
@@ -29,10 +29,8 @@ Boston, MA 02111-1307, USA.  */
 /* Names to predefine in the preprocessor for this target machine.  */
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-DWIN32 -D_WIN32 -DWINNT -D__STDC__=0 -DALMOST_STDC\
-  -D_M_ALPHA -D_ALPHA_ -D__alpha -D__alpha__\
-  -D_LONGLONG -D__unaligned= -D__stdcall= \
-  -Asystem(winnt) -Acpu(alpha) -Amachine(alpha)"
+#define CPP_PREDEFINES "-DWIN32 -D_WIN32 -DWINNT -D__STDC__=0 -DALMOST_STDC \
+-D_M_ALPHA -D_ALPHA_ -D_LONGLONG -D__unaligned= -D__stdcall= -Asystem(winnt)"
 
 #undef ASM_SPEC
 #undef ASM_FINAL_SPEC