Commit b0435cf4 by Richard Henderson Committed by Richard Henderson

alpha.h (CPP_PREDEFINES, [...]): Move OSF/1 specific defines out.

* alpha.h (CPP_PREDEFINES, LIB_SPEC, LINK_SPEC, STARTFILE_SPEC,
MD_STARTFILE_PREFIX, ASM_FILE_START, ASM_SPEC, ASM_FINAL_SPEC):
Move OSF/1 specific defines out.
* alpha/elf.h (TARGET_VERSION, CPP_PREDEFINES, DEFAULT_VTABLE_THUNKS):
Move Linux specific defines out.
(LINK_SPEC): Genericize.
(ASM_FILE_START): Emit .arch if using more than the base insn set.
(ASM_OUTPUT_SOURCE_LINE): Remove; identical to alpha.h version.
(SDB_DEBUGGING_INFO): Remove; gas can't handle it.
(HANDLE_SYSV_PRAGMA): Define.
* alpha/osf.h: New file.
* alpha/linux.h: Split.  Retain file-format independant defines.
Import Linux bits from elf.h.
(CPP_PREDEFINES): Take a file-format specific SUB_CPP_PREDEFINES
(FUNCTION_PROFILER): _mcount takes its address in $28.
(MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Remove undef.
* alpha/linux-ecoff.h: New file.
* alpha/linux-elf.h: New file.
* alpha/vms.h (LIB_SPEC, LINK_SPEC): Copy from osf.h.
* alpha/win-nt.h (TARGET_DEFAULT): Define.
* configure.in (alpha*-*-osf*, alpha*-*-linux*) [tm_file]:
Add new headers as appropriate.
* configure.in (alpha*): Enable Haifa by default.
(*-*-winnt3*): Change to winnt*, since we're not v3 specific.
* configure: Rebuild.

From-SVN: r17211
parent 5768f211
Tue Dec 23 03:53:21 1997 Richard Henderson <rth@cygnus.com>
* alpha.h (CPP_PREDEFINES, LIB_SPEC, LINK_SPEC, STARTFILE_SPEC,
MD_STARTFILE_PREFIX, ASM_FILE_START, ASM_SPEC, ASM_FINAL_SPEC):
Move OSF/1 specific defines out.
* alpha/elf.h (TARGET_VERSION, CPP_PREDEFINES, DEFAULT_VTABLE_THUNKS):
Move Linux specific defines out.
(LINK_SPEC): Genericize.
(ASM_FILE_START): Emit .arch if using more than the base insn set.
(ASM_OUTPUT_SOURCE_LINE): Remove; identical to alpha.h version.
(SDB_DEBUGGING_INFO): Remove; gas can't handle it.
(HANDLE_SYSV_PRAGMA): Define.
* alpha/osf.h: New file.
* alpha/linux.h: Split. Retain file-format independant defines.
Import Linux bits from elf.h.
(CPP_PREDEFINES): Take a file-format specific SUB_CPP_PREDEFINES
(FUNCTION_PROFILER): _mcount takes its address in $28.
(MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Remove undef.
* alpha/linux-ecoff.h: New file.
* alpha/linux-elf.h: New file.
* alpha/vms.h (LIB_SPEC, LINK_SPEC): Copy from osf.h.
* alpha/win-nt.h (TARGET_DEFAULT): Define.
* configure.in (alpha*-*-osf*, alpha*-*-linux*) [tm_file]:
Add new headers as appropriate.
* configure.in (alpha*): Enable Haifa by default.
(*-*-winnt3*): Change to winnt*, since we're not v3 specific.
* configure: Rebuild.
Tue Dec 23 03:14:54 1997 Richard Henderson <rth@cygnus.com> Tue Dec 23 03:14:54 1997 Richard Henderson <rth@cygnus.com>
* Makefile.in (clean): Remove the stages with their objects here ... * Makefile.in (clean): Remove the stages with their objects here ...
......
...@@ -20,12 +20,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -20,12 +20,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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)"
/* Write out the correct language type definition for the header files. /* Write out the correct language type definition for the header files.
Unless we have assembler language, write out the symbols for C. */ Unless we have assembler language, write out the symbols for C. */
#define CPP_SPEC "\ #define CPP_SPEC "\
...@@ -44,18 +38,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,18 +38,6 @@ Boston, MA 02111-1307, USA. */
#define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}" #define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}"
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
#define LIB_SPEC "%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} -lc"
/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are
optimizing, -O1 if we are not. Pass -shared, -non_shared or
-call_shared as appropriate. Also pass -pg. */
#define LINK_SPEC \
"-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
%{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \
%{rpath*}"
#define WORD_SWITCH_TAKES_ARG(STR) \ #define WORD_SWITCH_TAKES_ARG(STR) \
(!strcmp (STR, "rpath") || !strcmp (STR, "include") \ (!strcmp (STR, "rpath") || !strcmp (STR, "include") \
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \ || !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
...@@ -63,16 +45,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -63,16 +45,9 @@ Boston, MA 02111-1307, USA. */
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem")) || !strcmp (STR, "isystem"))
#define STARTFILE_SPEC \
"%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
/* Print subsidiary information on the compiler version in use. */ /* Print subsidiary information on the compiler version in use. */
#define TARGET_VERSION #define TARGET_VERSION
/* Define the location for the startup file on OSF/1 for Alpha. */
#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"
/* Run-time compilation parameters selecting different hardware subsets. */ /* Run-time compilation parameters selecting different hardware subsets. */
/* Which processor to schedule for. The cpu attribute defines a list that /* Which processor to schedule for. The cpu attribute defines a list that
...@@ -1504,8 +1479,8 @@ extern void alpha_init_expanders (); ...@@ -1504,8 +1479,8 @@ extern void alpha_init_expanders ();
/* Define as C expression which evaluates to nonzero if the tablejump /* Define as C expression which evaluates to nonzero if the tablejump
instruction expects the table to contain offsets from the address of the instruction expects the table to contain offsets from the address of the
table. table. Do not define this if the table should contain absolute addresses.
Do not define this if the table should contain absolute addresses. */
On the Alpha, the table is really GP-relative, not relative to the PC On the Alpha, the table is really GP-relative, not relative to the PC
of the table, but we pretend that it is PC-relative; this should be OK, of the table, but we pretend that it is PC-relative; this should be OK,
but we should try to find some better way sometime. */ but we should try to find some better way sometime. */
...@@ -1746,24 +1721,6 @@ extern void alpha_init_expanders (); ...@@ -1746,24 +1721,6 @@ extern void alpha_init_expanders ();
/* Control the assembler format that we output. */ /* Control the assembler format that we output. */
/* Output at beginning of assembler file. */
#define ASM_FILE_START(FILE) \
{ \
alpha_write_verstamp (FILE); \
fprintf (FILE, "\t.set noreorder\n"); \
fprintf (FILE, "\t.set volatile\n"); \
fprintf (FILE, "\t.set noat\n"); \
if (TARGET_SUPPORT_ARCH) \
fprintf (FILE, "\t.arch %s\n", \
alpha_cpu == PROCESSOR_EV6 ? "ev6" \
: (alpha_cpu == PROCESSOR_EV5 \
? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
: "ev4")); \
\
ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
}
/* Output to assembler file text saying following lines /* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */ may contain character constants, extra white space, comments, etc. */
...@@ -2282,47 +2239,6 @@ do { \ ...@@ -2282,47 +2239,6 @@ do { \
#define PUT_SDB_EPILOGUE_END(NAME) #define PUT_SDB_EPILOGUE_END(NAME)
/* No point in running CPP on our assembler output. */
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
/* Don't pass -g to GNU as, because some versions don't accept this option. */
#define ASM_SPEC "%{malpha-as:-g} -nocpp %{pg}"
#else
/* In OSF/1 v3.2c, the assembler by default does not output file names which
causes mips-tfile to fail. Passing -g to the assembler fixes this problem.
??? Strictly speaking, we need -g only if the user specifies -g. Passing
it always means that we get slightly larger than necessary object files
if the user does not specify -g. If we don't pass -g, then mips-tfile
will need to be fixed to work in this case. Pass -O0 since some
optimization are broken and don't help us anyway. */
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg} -O0"
#endif
/* Specify to run a post-processor, mips-tfile after the assembler
has run to stuff the ecoff debug information into the object file.
This is needed because the Alpha assembler provides no way
of specifying such information in the assembly file. */
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
#define ASM_FINAL_SPEC "\
%{malpha-as: %{!mno-mips-tfile: \
\n mips-tfile %{v*: -v} \
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%g.s}}}"
#else
#define ASM_FINAL_SPEC "\
%{!mgas: %{!mno-mips-tfile: \
\n mips-tfile %{v*: -v} \
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%g.s}}}"
#endif
/* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for /* Macros for mips-tfile.c to encapsulate stabs in ECOFF, and for
mips-tdump.c to print them out. mips-tdump.c to print them out.
...@@ -2343,10 +2259,10 @@ do { \ ...@@ -2343,10 +2259,10 @@ do { \
#define ALIGN_SYMTABLE_OFFSET(OFFSET) (((OFFSET) + 7) & ~7) #define ALIGN_SYMTABLE_OFFSET(OFFSET) (((OFFSET) + 7) & ~7)
/* The system headers under OSF/1 are C++-aware. */
#define NO_IMPLICIT_EXTERN_C
/* The linker will stick __main into the .init section. */ /* The linker will stick __main into the .init section. */
#define HAS_INIT_SECTION #define HAS_INIT_SECTION
#define LD_INIT_SWITCH "-init" #define LD_INIT_SWITCH "-init"
#define LD_FINI_SWITCH "-fini" #define LD_FINI_SWITCH "-fini"
/* The system headers under Alpha systems are generally C++-aware. */
#define NO_IMPLICIT_EXTERN_C
...@@ -19,64 +19,42 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -19,64 +19,42 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* This is used on Alpha platforms that use the ELF format.
Currently only GNU/Linux uses this. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux with ELF)");
#undef OBJECT_FORMAT_COFF #undef OBJECT_FORMAT_COFF
#undef EXTENDED_COFF #undef EXTENDED_COFF
#define OBJECT_FORMAT_ELF #define OBJECT_FORMAT_ELF
#define SDB_DEBUGGING_INFO #define DBX_DEBUGGING_INFO
#undef ASM_FINAL_SPEC #undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#undef CPP_PREDEFINES #undef ASM_FINAL_SPEC
#define CPP_PREDEFINES "\
-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix \
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__ELF__"
#undef LINK_SPEC #undef LINK_SPEC
#ifdef USE_GNULIBC_1
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
%{static:-static}}"
#else
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \ #define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \ %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}}\
%{static:-static}}" %{static:-static}}"
#endif
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
#endif
/* Output at beginning of assembler file. */ /* Output at beginning of assembler file. */
#undef ASM_FILE_START #undef ASM_FILE_START
#define ASM_FILE_START(FILE) \ #define ASM_FILE_START(FILE) \
{ \ { \
alpha_write_verstamp (FILE); \ alpha_write_verstamp (FILE); \
output_file_directive (FILE, main_input_filename); \ output_file_directive (FILE, main_input_filename); \
fprintf (FILE, "\t.version\t\"01.01\"\n"); \
fprintf (FILE, "\t.set noat\n"); \ fprintf (FILE, "\t.set noat\n"); \
fprintf (FILE, "\t.set noreorder\n"); \
if (TARGET_BWX | TARGET_MAX | TARGET_CIX) \
{ \
fprintf (FILE, "\t.arch %s\n", \
(alpha_cpu == PROCESSOR_EV6 ? "ev6" \
: TARGET_MAX ? "pca56" : "ev56")); \
} \
} }
#define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \
alpha_output_lineno (STREAM, LINE)
extern void alpha_output_lineno ();
extern void output_file_directive (); extern void output_file_directive ();
/* Attach a special .ident directive to the end of the file to identify /* Attach a special .ident directive to the end of the file to identify
...@@ -100,11 +78,9 @@ do { \ ...@@ -100,11 +78,9 @@ do { \
#endif #endif
/* Allow #sccs in preprocessor. */ /* Allow #sccs in preprocessor. */
#define SCCS_DIRECTIVE #define SCCS_DIRECTIVE
/* Output #ident as a .ident. */ /* Output #ident as a .ident. */
#define ASM_OUTPUT_IDENT(FILE, NAME) \ #define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME); fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
...@@ -473,26 +449,24 @@ do { \ ...@@ -473,26 +449,24 @@ do { \
escape sequence like \377 would count as four bytes. escape sequence like \377 would count as four bytes.
If your target assembler doesn't support the .string directive, you If your target assembler doesn't support the .string directive, you
should define this to zero. should define this to zero. */
*/
#define STRING_LIMIT ((unsigned) 256) #define STRING_LIMIT ((unsigned) 256)
#define STRING_ASM_OP ".string" #define STRING_ASM_OP ".string"
/* /* GAS is the only Alpha/ELF assembler. */
* We always use gas here, so we don't worry about ECOFF assembler problems.
*/
#undef TARGET_GAS #undef TARGET_GAS
#define TARGET_GAS (1) #define TARGET_GAS (1)
#undef PREFERRED_DEBUGGING_TYPE /* Provide a STARTFILE_SPEC appropriate for ELF. Here we add the
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG (even more) magical crtbegin.o file which provides part of the
support for getting C++ file-scope static object constructed before
entering `main'.
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add Don't bother seeing crtstuff.c -- there is absolutely no hope of
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which getting that file to understand multiple GPs. GNU Libc provides a
provides part of the support for getting C++ file-scope static hand-coded version that is used on Linux; it could be copied here
object constructed before entering `main'. */ if there is ever a need. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
...@@ -500,12 +474,14 @@ do { \ ...@@ -500,12 +474,14 @@ do { \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
crti.o%s crtbegin.o%s" crti.o%s crtbegin.o%s"
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on /* Provide a ENDFILE_SPEC appropriate for ELF. Here we tack on the
the GNU/Linux magical crtend.o file (see crtstuff.c) which magical crtend.o file which provides part of the support for
provides part of the support for getting C++ file-scope static getting C++ file-scope static object constructed before entering
object constructed before entering `main', followed by a normal `main', followed by a normal ELF "finalizer" file, `crtn.o'. */
GNU/Linux "finalizer" file, `crtn.o'. */
#undef ENDFILE_SPEC #undef ENDFILE_SPEC
#define ENDFILE_SPEC \ #define ENDFILE_SPEC \
"crtend.o%s crtn.o%s" "crtend.o%s crtn.o%s"
/* We support #pragma. */
#define HANDLE_SYSV_PRAGMA
/* Definitions of target machine for GNU compiler
for Alpha Linux-based GNU systems using ECOFF.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Bob Manson.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (Alpha GNU/Linux for ECOFF)");
#undef SUB_CPP_PREDEFINES
#define SUB_CPP_PREDEFINES "-D__ECOFF__"
#undef LINK_SPEC
#define LINK_SPEC "-G 8 %{O*:-O3} %{!O*:-O1}"
/* stabs get slurped by the assembler into a queer ecoff format. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
/* We support #pragma. */
#define HANDLE_SYSV_PRAGMA
/* Definitions of target machine for GNU compiler
for Alpha Linux-based GNU systems using ELF.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
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 SUB_CPP_PREDEFINES
#define SUB_CPP_PREDEFINES "-D__ELF__"
#ifdef USE_GNULIBC_1
#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
#else
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#endif
#ifndef USE_GNULIBC_1
#undef DEFAULT_VTABLE_THUNKS
#define DEFAULT_VTABLE_THUNKS 1
#endif
/* Definitions of target machine for GNU compiler, for Alpha Linux-based GNU /* Definitions of target machine for GNU compiler,
systems using ECOFF. for Alpha Linux-based GNU systems.
Copyright (C) 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Bob Manson. Contributed by Richard Henderson.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -20,56 +20,29 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -20,56 +20,29 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT (3 | MASK_GAS) #define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_GAS)
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (GNU/Linux/Alpha)");
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
#define CPP_PREDEFINES "\ #define CPP_PREDEFINES "\
-D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix \ -D__alpha -D__alpha__ -D__linux__ -D__linux -D_LONGLONG -Dlinux -Dunix \
-Asystem(linux) -Acpu(alpha) -Amachine(alpha)" -Asystem(linux) -Acpu(alpha) -Amachine(alpha)" SUB_CPP_PREDEFINES
/* We don't actually need any of these; the MD_ vars are ignored
anyway for cross-compilers, and the other specs won't get picked up
because the user is supposed to do ld -r (hmm, perhaps that should be
the default). In any case, setting them thus will catch some
common user errors. */
#undef MD_EXEC_PREFIX
#undef MD_STARTFILE_PREFIX
#undef LIB_SPEC #undef LIB_SPEC
#define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}" #define LIB_SPEC "%{pg:-lgmon} %{pg:-lc_p} %{!pg:-lc}"
#undef LINK_SPEC
#define LINK_SPEC "-G 8 %{O*:-O3} %{!O*:-O1}"
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "-nocpp" #define ASM_SPEC "-nocpp"
/* Can't do stabs */ /* Generate calls to memcpy, etc., not bcopy, etc. */
#undef SDB_DEBUGGING_INFO #define TARGET_MEM_FUNCTIONS
/* Prefer dbx. */
#undef PREFERRED_DEBUGGING_TYPE
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#undef FUNCTION_PROFILER #undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \ #define FUNCTION_PROFILER(FILE, LABELNO) \
fputs ("\tjsr $28,_mcount\n", (FILE)) fputs ("\tlda $28,_mcount\n\tjsr $28,($28),_mcount\n", (FILE))
/* Generate calls to memcpy, etc., not bcopy, etc. */
#define TARGET_MEM_FUNCTIONS
/* Show that we need a GP when profiling. */ /* Show that we need a GP when profiling. */
#define TARGET_PROFILING_NEEDS_GP #define TARGET_PROFILING_NEEDS_GP
/* We support #pragma. */
#define HANDLE_SYSV_PRAGMA
#undef ASM_FINAL_SPEC
/* Emit RTL insns to initialize the variable parts of a trampoline. /* Emit RTL insns to initialize the variable parts of a trampoline.
FNADDR is an RTX for the address of the function's pure code. FNADDR is an RTX for the address of the function's pure code.
CXT is an RTX for the static chain value for the function. CXT is an RTX for the static chain value for the function.
......
/* Definitions of target machine for GNU compiler, for DEC Alpha on OSF/1.
Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
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)"
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
#define LIB_SPEC "%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} -lc"
/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are
optimizing, -O1 if we are not. Pass -shared, -non_shared or
-call_shared as appropriate. Also pass -pg. */
#define LINK_SPEC \
"-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
%{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \
%{rpath*}"
#define STARTFILE_SPEC \
"%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}"
#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"
#define ASM_FILE_START(FILE) \
{ \
alpha_write_verstamp (FILE); \
fprintf (FILE, "\t.set noreorder\n"); \
fprintf (FILE, "\t.set volatile\n"); \
fprintf (FILE, "\t.set noat\n"); \
if (TARGET_SUPPORT_ARCH) \
fprintf (FILE, "\t.arch %s\n", \
alpha_cpu == PROCESSOR_EV6 ? "ev6" \
: (alpha_cpu == PROCESSOR_EV5 \
? (TARGET_MAX ? "pca56" : TARGET_BWX ? "ev56" : "ev5") \
: "ev4")); \
\
ASM_OUTPUT_SOURCE_FILENAME (FILE, main_input_filename); \
}
/* No point in running CPP on our assembler output. */
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
/* Don't pass -g to GNU as, because some versions don't accept this option. */
#define ASM_SPEC "%{malpha-as:-g} -nocpp %{pg}"
#else
/* In OSF/1 v3.2c, the assembler by default does not output file names which
causes mips-tfile to fail. Passing -g to the assembler fixes this problem.
??? Strictly speaking, we need -g only if the user specifies -g. Passing
it always means that we get slightly larger than necessary object files
if the user does not specify -g. If we don't pass -g, then mips-tfile
will need to be fixed to work in this case. Pass -O0 since some
optimization are broken and don't help us anyway. */
#define ASM_SPEC "%{!mgas:-g} -nocpp %{pg} -O0"
#endif
/* Specify to run a post-processor, mips-tfile after the assembler
has run to stuff the ecoff debug information into the object file.
This is needed because the Alpha assembler provides no way
of specifying such information in the assembly file. */
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GAS) != 0
#define ASM_FINAL_SPEC "\
%{malpha-as: %{!mno-mips-tfile: \
\n mips-tfile %{v*: -v} \
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%g.s}}}"
#else
#define ASM_FINAL_SPEC "\
%{!mgas: %{!mno-mips-tfile: \
\n mips-tfile %{v*: -v} \
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%g.s}}}"
#endif
...@@ -46,6 +46,18 @@ Boston, MA 02111-1307, USA. */ ...@@ -46,6 +46,18 @@ Boston, MA 02111-1307, USA. */
%{.C: -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}" %{.m: -D__LANGUAGE_OBJECTIVE_C__ -D__LANGUAGE_OBJECTIVE_C}"
/* Under OSF4, -p and -pg require -lprof1, and -lprof1 requires -lpdf. */
#define LIB_SPEC "%{p:-lprof1 -lpdf} %{pg:-lprof1 -lpdf} %{a:-lprof2} -lc"
/* Pass "-G 8" to ld because Alpha's CC does. Pass -O3 if we are
optimizing, -O1 if we are not. Pass -shared, -non_shared or
-call_shared as appropriate. Also pass -pg. */
#define LINK_SPEC \
"-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \
%{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \
%{rpath*}"
/* We allow $'s in identifiers unless -ansi is used .. */ /* We allow $'s in identifiers unless -ansi is used .. */
#define DOLLARS_IN_IDENTIFIERS 2 #define DOLLARS_IN_IDENTIFIERS 2
......
...@@ -20,6 +20,9 @@ along with GNU CC; see the file COPYING. If not, write to ...@@ -20,6 +20,9 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_FP | MASK_FPREGS | MASK_WINDOWS_NT)
/* Names to predefine in the preprocessor for this target machine. */ /* Names to predefine in the preprocessor for this target machine. */
#undef CPP_PREDEFINES #undef CPP_PREDEFINES
......
...@@ -310,18 +310,22 @@ for machine in $build $host $target; do ...@@ -310,18 +310,22 @@ for machine in $build $host $target; do
use_collect2=yes use_collect2=yes
;; ;;
alpha*-*-linux-gnuecoff*) alpha*-*-linux-gnuecoff*)
tm_file="${tm_file} alpha/linux.h" if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
xm_file="${xm_file} alpha/xm-linux.h" xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
gas=no gas=no
xmake_file=none xmake_file=none
fixincludes=Makefile.in fixincludes=Makefile.in
gas=yes gnu_ld=yes gas=yes gnu_ld=yes
;; ;;
alpha*-*-linux-gnulibc1*) alpha*-*-linux-gnulibc1*)
tm_file="${tm_file} alpha/linux.h alpha/elf.h" if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
xm_file="${xm_file} alpha/xm-linux.h" xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux" tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
xmake_file=none xmake_file=none
fixincludes=Makefile.in fixincludes=Makefile.in
...@@ -331,9 +335,11 @@ for machine in $build $host $target; do ...@@ -331,9 +335,11 @@ for machine in $build $host $target; do
fi fi
;; ;;
alpha*-*-linux-gnu*) alpha*-*-linux-gnu*)
tm_file="${tm_file} alpha/linux.h alpha/elf.h" if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
xm_file="${xm_file} alpha/xm-linux.h" xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux alpha/t-linux" tmake_file="t-linux alpha/t-linux"
xmake_file=none xmake_file=none
fixincludes=Makefile.in fixincludes=Makefile.in
...@@ -343,6 +349,9 @@ for machine in $build $host $target; do ...@@ -343,6 +349,9 @@ for machine in $build $host $target; do
fi fi
;; ;;
alpha*-dec-osf*) alpha*-dec-osf*)
if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
if [[ x$stabs = xyes ]] if [[ x$stabs = xyes ]]
then then
tm_file="${tm_file} dbx.h" tm_file="${tm_file} dbx.h"
...@@ -354,12 +363,13 @@ for machine in $build $host $target; do ...@@ -354,12 +363,13 @@ for machine in $build $host $target; do
use_collect2=yes use_collect2=yes
case $machine in case $machine in
*-*-osf1.2) *-*-osf1.2)
tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h" tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
;; ;;
*-*-osf[[23]]*) *-*-osf[[23]]*)
tm_file="${tm_file} alpha/osf2or3.h" tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
;; ;;
*-*-osf4*) *-*-osf4*)
tm_file="${tm_file} alpha/osf.h"
# Some versions of OSF4 (specifically X4.0-9 296.7) have # Some versions of OSF4 (specifically X4.0-9 296.7) have
# a broken tar, so we use cpio instead. # a broken tar, so we use cpio instead.
install_headers_dir=install-headers-cpio install_headers_dir=install-headers-cpio
...@@ -371,9 +381,11 @@ for machine in $build $host $target; do ...@@ -371,9 +381,11 @@ for machine in $build $host $target; do
;; ;;
esac esac
;; ;;
alpha*-*-winnt3*) alpha*-*-winnt*)
if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
tm_file="${tm_file} alpha/win-nt.h" tm_file="${tm_file} alpha/win-nt.h"
target_cpu_default=MASK_WINDOWS_NT
xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h" xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
tmake_file=t-libc-ok tmake_file=t-libc-ok
xmake_file=winnt/x-winnt xmake_file=winnt/x-winnt
...@@ -389,6 +401,9 @@ for machine in $build $host $target; do ...@@ -389,6 +401,9 @@ for machine in $build $host $target; do
fi fi
;; ;;
alpha*-dec-vms*) alpha*-dec-vms*)
if [[ x$enable_haifa != xno ]]; then
enable_haifa=yes
fi
tm_file=alpha/vms.h tm_file=alpha/vms.h
xm_file="${xm_file} alpha/xm-vms.h" xm_file="${xm_file} alpha/xm-vms.h"
tmake_file=alpha/t-vms tmake_file=alpha/t-vms
...@@ -1066,7 +1081,7 @@ for machine in $build $host $target; do ...@@ -1066,7 +1081,7 @@ for machine in $build $host $target; do
fi fi
exeext=.exe exeext=.exe
;; ;;
i[[3456]]86-*-winnt3*) i[[3456]]86-*-winnt*)
tm_file=i386/win-nt.h tm_file=i386/win-nt.h
out_file=i386/i386.c out_file=i386/i386.c
xm_file=i386/xm-winnt.h xm_file=i386/xm-winnt.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment