summaryrefslogtreecommitdiff
path: root/lang/gcc
diff options
context:
space:
mode:
authorkent <kent@pkgsrc.org>2002-02-16 14:46:19 +0000
committerkent <kent@pkgsrc.org>2002-02-16 14:46:19 +0000
commit3fc5e98bc89997d354394f17077bc27ebafd6540 (patch)
treed77dbe4f8235bd2dc762fa67fa864e68f8c87b5a /lang/gcc
parent3cc0347d817c9e61653d28791d797e78f36786cc (diff)
downloadpkgsrc-3fc5e98bc89997d354394f17077bc27ebafd6540.tar.gz
Add missing sparc/netbsd-elf-common.h.
Diffstat (limited to 'lang/gcc')
-rw-r--r--lang/gcc/Makefile5
-rw-r--r--lang/gcc/files/sparc_netbsd-elf-common.h69
2 files changed, 72 insertions, 2 deletions
diff --git a/lang/gcc/Makefile b/lang/gcc/Makefile
index 8591552b6a9..4c803d220fc 100644
--- a/lang/gcc/Makefile
+++ b/lang/gcc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2002/01/09 16:33:32 seb Exp $
+# $NetBSD: Makefile,v 1.34 2002/02/16 14:46:20 kent Exp $
# Make sure that the version number in "Makefile.gcc" matches this.
DISTNAME= gcc-2.95.3
@@ -64,7 +64,8 @@ post-extract:
for ARCH in arm arm i386 m68k sh sparc vax; do \
${MKDIR} $${ARCH}; \
${CP} ${FILESDIR}/$${ARCH}_netbsd-elf.h $${ARCH}/netbsd-elf.h; \
- done
+ done; \
+ ${CP} ${FILESDIR}/sparc_netbsd-elf-common.h sparc/netbsd-elf-common.h
post-patch:
${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
diff --git a/lang/gcc/files/sparc_netbsd-elf-common.h b/lang/gcc/files/sparc_netbsd-elf-common.h
new file mode 100644
index 00000000000..89af4182e61
--- /dev/null
+++ b/lang/gcc/files/sparc_netbsd-elf-common.h
@@ -0,0 +1,69 @@
+/* NetBSD/sparc ELF common 32/64 bit configuration */
+
+#define OBJECT_FORMAT_ELF
+#define NETBSD_ELF
+#include <netbsd.h>
+
+/* Fix up CPP_SPEC. This merges the code from <netbsd.h> and <sparc/sparc.h> */
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__sparc__ -D__NetBSD__ -D__ELF__ \
+-Asystem(unix) -Asystem(NetBSD)"
+
+#undef SIZE_TYPE
+#define SIZE_TYPE "long unsigned int"
+
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE "long int"
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef WCHAR_UNSIGNED
+#define WCHAR_UNSIGNED 0
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* This is the char to use for continuation (in case we need to turn
+ continuation back on). */
+#undef DBX_CONTIN_CHAR
+#define DBX_CONTIN_CHAR '?'
+
+#undef DBX_REGISTER_NUMBER
+#define DBX_REGISTER_NUMBER(REGNO) \
+ (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
+
+/* This is how to output a definition of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class. */
+
+#undef ASM_OUTPUT_INTERNAL_LABEL
+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
+ fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
+
+/* This is how to store into the string LABEL
+ the symbol_ref name of an internal numbered label where
+ PREFIX is the class of label and NUM is the number within the class.
+ This is suitable for output with `assemble_name'. */
+
+#undef ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
+ sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{fpic:-K PIC} %{fPIC:-K PIC} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch)\
+"
+
+#undef STDC_0_IN_SYSTEM_HEADERS
+
+/* XXX Redefine this; <sparc/sparc.h> mucks with it. */
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (%s)", TARGET_NAME);