summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/config/pa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-04 21:23:00 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-05-04 21:23:00 +0000
commit592b361f51efc9187e0971de2b272baedb3e1623 (patch)
tree7519b110af0b0c6dfca11a45a078e99713a86a53 /gnu/usr.bin/gcc/config/pa
parentb620f6794dbe8d9a21e09ebd34112a354b7e211b (diff)
first cut on binutils/gcc support for hppa-*-openbsd*; tested on i386 host
Diffstat (limited to 'gnu/usr.bin/gcc/config/pa')
-rw-r--r--gnu/usr.bin/gcc/config/pa/pa-openbsd.h89
-rw-r--r--gnu/usr.bin/gcc/config/pa/pa1-openbsd.h24
-rw-r--r--gnu/usr.bin/gcc/config/pa/t-pa10
-rw-r--r--gnu/usr.bin/gcc/config/pa/xm-openbsd.h1
4 files changed, 122 insertions, 2 deletions
diff --git a/gnu/usr.bin/gcc/config/pa/pa-openbsd.h b/gnu/usr.bin/gcc/config/pa/pa-openbsd.h
new file mode 100644
index 00000000000..45db5d836d4
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/pa/pa-openbsd.h
@@ -0,0 +1,89 @@
+/* Definitions for HP-PA 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
+
+#ifndef CROSS_COMPILE
+/* Look for the G++ include files in the system-defined place. */
+
+#undef GPLUSPLUS_INCLUDE_DIR
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
+
+/* 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 \
+ "%{EB} %{EL} %{shared} %{non_shared} \
+ %{call_shared} %{no_archive} %{exact_version} \
+ %{!shared: %{!non_shared: %{!call_shared: -non_shared}}} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so} \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} -dc -dp \
+ %{static:-Bstatic} %{!static:-Bdynamic} %{assert*}"
+
+/* We have atexit(3). */
+
+#define HAVE_ATEXIT
+
+/* Implicit library calls should use memcpy, not bcopy, etc. */
+
+#define TARGET_MEM_FUNCTIONS
+
+/* Define hppa-specific OpenBSD predefines... */
+#ifndef CPP_PREDEFINES
+#define CPP_PREDEFINES "-Dunix -D__ANSI_COMPAT \
+-Asystem(unix) -Asystem(OpenBSD) -Amachine(hppa) \
+-D__OpenBSD__ -D__hppa__ -D__hppa"
+#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/hppa"
+#endif
+
+#define LOCAL_LABEL_PREFIX "."
+
+/* Since gas and gld are standard on OpenBSD, we don't need this */
+#undef ASM_FINAL_SPEC
+#undef STARTFILE_SPEC
+
diff --git a/gnu/usr.bin/gcc/config/pa/pa1-openbsd.h b/gnu/usr.bin/gcc/config/pa/pa1-openbsd.h
new file mode 100644
index 00000000000..c791b553769
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/pa/pa1-openbsd.h
@@ -0,0 +1,24 @@
+/* Definitions of target machine for GNU compiler, for HP PA-RISC 1.1
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Tim Moore (moore@defmacro.cs.utah.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. */
+
+#define TARGET_DEFAULT 1 /* TARGET_SNAKE */
+
+#include "pa/pa-openbsd.h"
diff --git a/gnu/usr.bin/gcc/config/pa/t-pa b/gnu/usr.bin/gcc/config/pa/t-pa
index a359918a125..ecb5b2ac840 100644
--- a/gnu/usr.bin/gcc/config/pa/t-pa
+++ b/gnu/usr.bin/gcc/config/pa/t-pa
@@ -1,8 +1,14 @@
-LIBGCC1=libgcc1.null
-CROSS_LIBGCC1=libgcc1.null
+LIBGCC1=libgcc1-asm.a
+CROSS_LIBGCC1=libgcc1-asm.a
ADA_CFLAGS=-mdisable-indexing
+LIB1ASMSRC=pa/lib1funcs.asm
+LIB1ASMFUNCS=_divI _divU _modI _modU _remI _remU
LIB2FUNCS_EXTRA=lib2funcs.asm ee.asm ee_fp.asm
+lib1funcs.asm: $(srcdir)/config/pa/lib1funcs.asm
+ rm -f lib1funcs.asm
+ cp $(srcdir)/config/pa/lib1funcs.asm .
+
lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
rm -f lib2funcs.asm
cp $(srcdir)/config/pa/lib2funcs.asm .
diff --git a/gnu/usr.bin/gcc/config/pa/xm-openbsd.h b/gnu/usr.bin/gcc/config/pa/xm-openbsd.h
new file mode 100644
index 00000000000..7d1314fdc56
--- /dev/null
+++ b/gnu/usr.bin/gcc/config/pa/xm-openbsd.h
@@ -0,0 +1 @@
+#include "pa/xm-pa.h"