Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/gcc Make sparc-netbsdelf and powerpc-netb...



details:   https://anonhg.NetBSD.org/src/rev/f0089848e8fd
branches:  trunk
changeset: 510497:f0089848e8fd
user:      tv <tv%NetBSD.org@localhost>
date:      Wed May 30 18:47:24 2001 +0000

description:
Make sparc-netbsdelf and powerpc-netbsd targets work.

diffstat:

 gnu/dist/toolchain/gcc/config/rs6000/netbsd.h     |  72 +++++++++++++++++++++++
 gnu/dist/toolchain/gcc/config/sparc/netbsd.h      |   8 +-
 gnu/dist/toolchain/gcc/config/sparc/t-netbsd      |   2 +
 gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h   |   4 -
 gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h |   4 -
 gnu/dist/toolchain/gcc/configure                  |   5 +
 gnu/dist/toolchain/gcc/configure.in               |   5 +
 7 files changed, 89 insertions(+), 11 deletions(-)

diffs (176 lines):

diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/config/rs6000/netbsd.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/rs6000/netbsd.h     Wed May 30 18:47:24 2001 +0000
@@ -0,0 +1,72 @@
+/* Start with SVR4 defaults. */
+#include <rs6000/sysv4.h>
+
+/* Get generic NetBSD definitions.  */
+
+#define NETBSD_ELF
+#include <netbsd.h>
+
+#undef SDB_DEBUGGING_INFO
+#define SDB_DEBUGGING_INFO
+#undef DBX_DEBUGGING_INFO
+#define DBX_DEBUGGING_INFO
+
+#undef PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+
+/* Names to predefine in the preprocessor for this target machine.  */
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "\
+-D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \
+-Asystem(unix) -Asystem(NetBSD) -Acpu(powerpc) -Amachine(powerpc)"
+
+/* Make gcc agree with <machine/ansi.h> */
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+/* Don't default to pcc-struct-return, because gcc is the only compiler, and
+   we want to retain compatibility with older gcc versions.  */
+#define DEFAULT_PCC_STRUCT_RETURN 0
+
+/* XXX Duplicated from sysv4.h  --thorpej%netbsd.org@localhost
+   Pass -mppc to the assembler, since that is what powerpc.h currently
+   implies */
+#undef ASM_SPEC
+#define ASM_SPEC \
+  "-u \
+%{mcpu=601: -m601} %{!mcpu=601: -mppc} \
+%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \
+%{mrelocatable} \
+%{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
+
+/* The `multiple' instructions may not be universally implemented.
+   We avoid their use here. */
+#undef CC1_SPEC
+#define        CC1_SPEC        "-mno-multiple"
+
+/* Provide a LINK_SPEC approriate for NetBSD. */
+#undef LINK_SPEC
+#define LINK_SPEC " \
+  %{O*:-O3} %{!O*:-O1}                                         \
+  %{assert*} %{R*}                                             \
+  %{shared:-shared}                                            \
+  %{!shared:                                                   \
+    -dc -dp                                                    \
+    %{!nostdlib:%{!r*:%{!e*:-e _start}}}                       \
+    %{!static:                                                 \
+      %{rdynamic:-export-dynamic}                              \
+      %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+    %{static:-static}}"
+
+/* XXX Sort of a mix of ../netbsd.h and sysv4.h  --thorpej%netbsd.org@localhost
+   Provide a CPP_SPEC appropriate for NetBSD.  Currently we just deal with
+   the GCC option `-posix' and the calling convention definition.  */
+
+#undef CPP_SPEC
+#define CPP_SPEC "\
+%{posix:-D_POSIX_SOURCE} \
+%{mcall-sysv: -D_CALL_SYSV} %{mcall-aix: -D_CALL_AIX} %{!mcall-sysv: %{!mcall-aix: -D_CALL_SYSV}}"
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/config/sparc/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/sparc/netbsd.h      Wed May 30 17:50:46 2001 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/netbsd.h      Wed May 30 18:47:24 2001 +0000
@@ -7,15 +7,15 @@
 /* Names to predefine in the preprocessor for this target machine.  */
 
 #undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Dsparc -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sparc) -Amachine(sparc)"
+#define CPP_PREDEFINES "-Dsparc -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sparc) -Amachine(sparc)"
 
 /* Make gcc agree with <machine/ansi.h> */
 
 #undef SIZE_TYPE
-#define SIZE_TYPE "unsigned int"
+#define SIZE_TYPE "long unsigned int"
 
 #undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "int"
+#define PTRDIFF_TYPE "long int"
 
 #undef WCHAR_TYPE
 #define WCHAR_TYPE "int"
@@ -44,3 +44,5 @@
    and initialization stuff better.  */
 #define DWARF2_UNWIND_INFO 0
 
+/* Name the default cpu target */
+#define TARGET_CPU_DEFAULT     TARGET_CPU_sparc
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/config/sparc/t-netbsd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/t-netbsd      Wed May 30 18:47:24 2001 +0000
@@ -0,0 +1,2 @@
+# The NetBSD libc has all the needed libgcc1 stubs.
+LIBGCC1_TEST=
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h
--- a/gnu/dist/toolchain/gcc/config/sparc/xm-netbsd.h   Wed May 30 17:50:46 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-/* Configuration for GCC for Sun SPARC running NetBSD as host.  */
-
-#include <sparc/xm-sparc.h>
-#include <xm-netbsd.h>
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h
--- a/gnu/dist/toolchain/gcc/config/sparc/xm-netbsd64.h Wed May 30 17:50:46 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-/* Configuration for GCC for Sun SPARC V9 running NetBSD as host.  */
-
-#include <xm-netbsd.h>
-#include <sparc/xm-sp64.h>
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/configure
--- a/gnu/dist/toolchain/gcc/configure  Wed May 30 17:50:46 2001 +0000
+++ b/gnu/dist/toolchain/gcc/configure  Wed May 30 18:47:24 2001 +0000
@@ -5068,6 +5068,9 @@
        romp-*-openbsd*)
                # Nothing special
                ;;
+       powerpc-*-netbsd*)
+               tmake_file="${tmake_file} rs6000/t-rs6000"
+               ;;
        powerpc-*-openbsd*)
                tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
                ;;
@@ -5339,9 +5342,11 @@
                tm_file="sparc/aout.h libgloss.h"
                ;;
        sparc-*-netbsdelf*)
+               tmake_file="${tmake_file} sparc/t-netbsd"
                gas=yes gnu_ld=yes
                ;;
        sparc-*-netbsd*)
+               tmake_file="${tmake_file} sparc/t-netbsd"
                ;;
        sparc-*-openbsd*)
                # we need collect2 until our bug is fixed...
diff -r dc42ff5ec65f -r f0089848e8fd gnu/dist/toolchain/gcc/configure.in
--- a/gnu/dist/toolchain/gcc/configure.in       Wed May 30 17:50:46 2001 +0000
+++ b/gnu/dist/toolchain/gcc/configure.in       Wed May 30 18:47:24 2001 +0000
@@ -2754,6 +2754,9 @@
        romp-*-openbsd*)
                # Nothing special
                ;;
+       powerpc-*-netbsd*)
+               tmake_file="${tmake_file} rs6000/t-rs6000"
+               ;;
        powerpc-*-openbsd*)
                tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
                ;;
@@ -3035,9 +3038,11 @@
                tm_file="sparc/aout.h libgloss.h"
                ;;
        sparc-*-netbsdelf*)
+               tmake_file="${tmake_file} sparc/t-netbsd"
                gas=yes gnu_ld=yes
                ;;
        sparc-*-netbsd*)
+               tmake_file="${tmake_file} sparc/t-netbsd"
                ;;
        sparc-*-openbsd*)
                # we need collect2 until our bug is fixed...



Home | Main Index | Thread Index | Old Index