diff options
author | Richard Henderson <rth@cygnus.com> | 1997-12-22 20:42:30 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1997-12-22 20:42:30 -0800 |
commit | b0435cf4cfaac64f49fc2b118b002ea1d32eb004 (patch) | |
tree | 122a5e519d9c21ab9b64c7bad5e16a9d9cf6f819 /gcc/config/alpha/osf.h | |
parent | 5768f2112cf69725d22a4c1deb2bdefdb9db62fd (diff) | |
download | gcc-b0435cf4cfaac64f49fc2b118b002ea1d32eb004.zip gcc-b0435cf4cfaac64f49fc2b118b002ea1d32eb004.tar.gz gcc-b0435cf4cfaac64f49fc2b118b002ea1d32eb004.tar.bz2 |
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
Diffstat (limited to 'gcc/config/alpha/osf.h')
-rw-r--r-- | gcc/config/alpha/osf.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/gcc/config/alpha/osf.h b/gcc/config/alpha/osf.h new file mode 100644 index 0000000..eb7765a --- /dev/null +++ b/gcc/config/alpha/osf.h @@ -0,0 +1,101 @@ +/* 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 |