summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/config/alpha/freebsd.h
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-01-11 04:39:46 +0000
committerjb <jb@FreeBSD.org>1998-01-11 04:39:46 +0000
commitf0c9fe97ad54d00b6f0d6e0684e4b6bd8469af9d (patch)
tree46f69b27fc285696406cac68e6a9c5bfe5b45328 /contrib/gcc/config/alpha/freebsd.h
parent936e6bae2f8ddbc14d5ba39d3d549c18093626fa (diff)
downloadFreeBSD-src-f0c9fe97ad54d00b6f0d6e0684e4b6bd8469af9d.zip
FreeBSD-src-f0c9fe97ad54d00b6f0d6e0684e4b6bd8469af9d.tar.gz
Add the alpha MD files for gcc to product ELF for FreeBSD/Alpha.
See freebsd.h and freebsd-elf.h for the silly comment that cgd@netbsd.org wanted me to add about his claim that uncommented source files that have been publicly available for ftp for nearly a year; that are configuration patches to a GPL'ed program; are owned by his previous employer who refuses to release them. Well... I did as he said. As if that makes a difference! At this point we've got cpp, gcc, g++ ported to FreeBSD/Alpha so all the code that uses __FreeBSD__ is correctly pre-processed. Yay. I'll commit the bootstrap makefile next to let others play, then on to libc.
Diffstat (limited to 'contrib/gcc/config/alpha/freebsd.h')
-rw-r--r--contrib/gcc/config/alpha/freebsd.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/contrib/gcc/config/alpha/freebsd.h b/contrib/gcc/config/alpha/freebsd.h
new file mode 100644
index 0000000..24567a6
--- /dev/null
+++ b/contrib/gcc/config/alpha/freebsd.h
@@ -0,0 +1,103 @@
+/* XXX */
+/*
+ * This file was derived from source obtained from NetBSD/Alpha which
+ * is publicly available for ftp. The patch was developed by cgd@netbsd.org
+ * during the time he worked at CMU. He claims that CMU own this patch
+ * to gcc and that they have not (and will not) release the patch for
+ * incorporation in FSF sources. We are supposedly able to use the patch,
+ * but we are not allowed to forward it back to FSF for inclusion in
+ * their source releases.
+ *
+ * This all has me (jb@freebsd.org) confused because (a) I see no copyright
+ * messages that tell me that use is restricted; and (b) I expected that
+ * the patch was originally developed from other files which are subject
+ * to GPL.
+ *
+ * Use of this file is restricted until its CMU ownership is tested.
+ */
+
+#include "alpha/alpha.h"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* FreeBSD-specific things: */
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__FreeBSD__ -D__alpha__ -D__alpha"
+
+/* Look for the include files in the system-defined places. */
+
+#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 FreeBSD, the normal location of the `ld' and `as' programs is the
+ /usr/bin directory. */
+
+#undef MD_EXEC_PREFIX
+#define MD_EXEC_PREFIX "/usr/bin/"
+
+/* Under FreeBSD, the normal location of the various *crt*.o files is the
+ /usr/lib directory. */
+
+#undef MD_STARTFILE_PREFIX
+#define MD_STARTFILE_PREFIX "/usr/lib/"
+
+
+/* Provide a CPP_SPEC appropriate for FreeBSD. Current we just deal with
+ the GCC option `-posix'. */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
+
+/* Provide an ASM_SPEC appropriate for FreeBSD. */
+
+#undef ASM_SPEC
+#define ASM_SPEC " %|"
+
+#undef ASM_FINAL_SPEC
+
+/* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate
+ libc, depending on whether we're doing profiling. */
+
+#undef LIB_SPEC
+#define LIB_SPEC "%{!shared:%{!pg:%{!pthread:-lc}%{pthread:-lpthread -lc}}%{pg:%{!pthread:-lc_p}%{pthread:-lpthread_p -lc_p}}}"
+
+/* Provide a LINK_SPEC appropriate for FreeBSD. 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*}"
+
+/* Output assembler code to FILE to increment profiler label # LABELNO
+ for profiling a function entry. Under FreeBSD/Alpha, the assembler does
+ nothing special with -pg. */
+
+#undef FUNCTION_PROFILER
+#define FUNCTION_PROFILER(FILE, LABELNO) \
+ fputs ("\tjsr $28,_mcount\n", (FILE)); /* at */
+
+/* Show that we need a GP when profiling. */
+#define TARGET_PROFILING_NEEDS_GP
+
+#define bsd4_4
+#undef HAS_INIT_SECTION
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
OpenPOWER on IntegriCloud