diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-07-31 00:18:27 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-07-31 00:18:27 +0000 |
commit | d4e8358893c7e14b553fa35310668999323dbfe4 (patch) | |
tree | ec6e25527a1e7fa8594c8162fb9165b2293efa1e /gnu/usr.bin/gcc/config | |
parent | 9a2516fc45f5a96899127139d9231ac1aa97197b (diff) |
Redid the info-file build slightly, but with kept semantics. Made g77
this style too. Added OpenBSD/alpha support
Diffstat (limited to 'gnu/usr.bin/gcc/config')
-rw-r--r-- | gnu/usr.bin/gcc/config/alpha/alpha.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/config/alpha/alpha.h | 18 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/config/alpha/openbsd.h | 98 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/config/alpha/xm-openbsd.h | 2 |
4 files changed, 119 insertions, 1 deletions
diff --git a/gnu/usr.bin/gcc/config/alpha/alpha.c b/gnu/usr.bin/gcc/config/alpha/alpha.c index d460e8bd2d1..b80717d41c1 100644 --- a/gnu/usr.bin/gcc/config/alpha/alpha.c +++ b/gnu/usr.bin/gcc/config/alpha/alpha.c @@ -1238,7 +1238,7 @@ direct_return () /* Write a version stamp. Don't write anything if we are running as a cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */ -#if !defined(CROSS_COMPILE) && !defined(_WIN32) +#if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__OpenBSD__) && !defined(__NetBSD__) #include <stamp.h> #endif diff --git a/gnu/usr.bin/gcc/config/alpha/alpha.h b/gnu/usr.bin/gcc/config/alpha/alpha.h index 0a42ef2d106..b179f1445a0 100644 --- a/gnu/usr.bin/gcc/config/alpha/alpha.h +++ b/gnu/usr.bin/gcc/config/alpha/alpha.h @@ -22,12 +22,15 @@ Boston, MA 02111-1307, USA. */ /* Names to predefine in the preprocessor for this target machine. */ +#ifndef CPP_PREDEFINES #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)" +#endif /* Write out the correct language type definition for the header files. Unless we have assembler language, write out the symbols for C. */ +#ifndef CPP_SPEC #define CPP_SPEC "\ %{!.S: -D__LANGUAGE_C__ -D__LANGUAGE_C %{!ansi:-DLANGUAGE_C}} \ %{.S: -D__LANGUAGE_ASSEMBLY__ -D__LANGUAGE_ASSEMBLY %{!ansi:-DLANGUAGE_ASSEMBLY}} \ @@ -35,24 +38,31 @@ Boston, MA 02111-1307, USA. */ %{.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}" +#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" operand. */ +#ifndef SIGNED_CHAR_SPEC #define SIGNED_CHAR_SPEC "%{funsigned-char:-D__CHAR_UNSIGNED__}" +#endif /* Under OSF/1, -p and -pg require -lprof1. */ +#ifndef LIB_SPEC #define LIB_SPEC "%{p:-lprof1} %{pg:-lprof1} %{a:-lprof2} -lc" +#endif /* 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. */ +#ifndef LINK_SPEC #define LINK_SPEC \ "-G 8 %{O*:-O3} %{!O*:-O1} %{static:-non_shared} \ %{!static:%{shared:-shared} %{!shared:-call_shared}} %{pg} %{taso} \ %{rpath*}" +#endif #define WORD_SWITCH_TAKES_ARG(STR) \ (!strcmp (STR, "rpath") || !strcmp (STR, "include") \ @@ -61,8 +71,10 @@ Boston, MA 02111-1307, USA. */ || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ || !strcmp (STR, "isystem")) +#ifndef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" +#endif /* Print subsidiary information on the compiler version in use. */ #define TARGET_VERSION @@ -74,7 +86,9 @@ Boston, MA 02111-1307, USA. */ /* Define the location for the startup file on OSF/1 for Alpha. */ +#ifndef MD_STARTFILE_PREFIX #define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/" +#endif /* Run-time compilation parameters selecting different hardware subsets. */ @@ -111,7 +125,9 @@ extern int target_flags; {"gas", MASK_GAS}, \ {"", TARGET_DEFAULT | TARGET_CPU_DEFAULT} } +#ifndef TARGET_DEFAULT #define TARGET_DEFAULT 3 +#endif #ifndef TARGET_CPU_DEFAULT #define TARGET_CPU_DEFAULT 0 @@ -2013,6 +2029,7 @@ do { \ #define PUT_SDB_EPILOGUE_END(NAME) +#ifndef ASM_SPEC /* 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. */ @@ -2026,6 +2043,7 @@ do { \ will need to be fixed to work in this case. */ #define ASM_SPEC "%{!mgas:-g} -nocpp %{pg}" #endif +#endif /* Specify to run a post-processor, mips-tfile after the assembler has run to stuff the ecoff debug information into the object file. diff --git a/gnu/usr.bin/gcc/config/alpha/openbsd.h b/gnu/usr.bin/gcc/config/alpha/openbsd.h new file mode 100644 index 00000000000..44acb1baf20 --- /dev/null +++ b/gnu/usr.bin/gcc/config/alpha/openbsd.h @@ -0,0 +1,98 @@ +/* Definitions for Alpha systems running BSD as target machine for GNU compiler. + Copyright (C) 1993, 1995 Free Software Foundation, Inc. + +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. */ + +/* We settle for little endian for now */ + +#define TARGET_ENDIAN_DEFAULT 0 + +/* Look for the include files in the system-defined places. */ + +#ifndef CROSS_COMPILE +#undef GPLUSPLUS_INCLUDE_DIR +#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++" + +#undef GCC_INCLUDE_DIR +#define GCC_INCLUDE_DIR "/usr/include" + +#undef INCLUDE_DEFAULTS +#define INCLUDE_DEFAULTS \ + { \ + { GPLUSPLUS_INCLUDE_DIR, 1, 1 }, \ + { GCC_INCLUDE_DIR, 0, 0 }, \ + { 0, 0, 0 } \ + } + +/* Under OpenBSD, the normal location of the various *crt*.o files is the + /usr/lib directory. */ + +#undef STANDARD_STARTFILE_PREFIX +#define STANDARD_STARTFILE_PREFIX "/usr/lib/" +#endif + +/* Provide a LINK_SPEC appropriate for OpenBSD. Here we provide support + for the special GCC options -static, -assert, and -nostdlib. */ + +#undef LINK_SPEC +#define LINK_SPEC \ + "%{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp \ + %{static:-Bstatic} %{assert*}" + +/* We have atexit(3). */ + +#define HAVE_ATEXIT + +/* Implicit library calls should use memcpy, not bcopy, etc. */ + +#define TARGET_MEM_FUNCTIONS + +/* Define mips-specific OpenBSD predefines... */ +#ifndef CPP_PREDEFINES +#define CPP_PREDEFINES "-D__ANSI_COMPAT \ +-D__OpenBSD__ -D__NetBSD__ -D__alpha__ -D__alpha" +#endif + +/* Always uses gas. */ +#ifndef ASM_SPEC +#define ASM_SPEC "\ +%|" +#endif + +#ifndef CPP_SPEC +#define CPP_SPEC "\ +%{posix:-D_POSIX_SOURCE}" +#endif + +#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}" +#define STARTFILE_SPEC \ + "%{!shared:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}" + +#ifndef MACHINE_TYPE +#define MACHINE_TYPE "OpenBSD/alpha" +#endif + +#define TARGET_DEFAULT MASK_GAS +#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG + +#define LOCAL_LABEL_PREFIX "." + +#include "alpha/alpha.h" + +/* Since gas and gld are standard on OpenBSD, we don't need this */ +#undef ASM_FINAL_SPEC diff --git a/gnu/usr.bin/gcc/config/alpha/xm-openbsd.h b/gnu/usr.bin/gcc/config/alpha/xm-openbsd.h new file mode 100644 index 00000000000..145b2e2b5b8 --- /dev/null +++ b/gnu/usr.bin/gcc/config/alpha/xm-openbsd.h @@ -0,0 +1,2 @@ +#include "alpha/xm-alpha.h" +#include "config/xm-openbsd.h" |