[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
powerpc-elf-netbsd patch for egcs-980214
というわけで egcsへのpatchです。
egcs-980214でしか試してませんが、egcs-1.0.1でも似たようなもんでしょう、きっと。
gccだのegcsだのcompileしていくとディスクがいくらあっても足らなくなる :-<
sakamoto@cec.co.jp
*** gcc/configure.orig Tue Feb 24 15:59:37 1998
--- gcc/configure Tue Feb 24 15:28:15 1998
***************
*** 3988,3993 ****
--- 3988,4000 ----
fi
xmake_file=rs6000/x-sysv4
;;
+ powerpc-elf-netbsd*)
+ tm_file=rs6000/netbsd.h
+ xm_file=rs6000/xm-netbsd.h
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-netbsd
+ ;;
powerpc-*-eabiaix*)
tm_file=rs6000/eabiaix.h
tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
*** /dev/null Tue Feb 24 15:49:12 1998
--- gcc/config/rs6000/netbsd.h Tue Feb 24 15:28:34 1998
***************
*** 0 ****
--- 1,72 ----
+ #include <rs6000/sysv4.h>
+
+ /* Get generic NetBSD definitions. */
+
+ #include <netbsd.h>
+
+ /* Use bcopy etc. instead of memcpy etc. */
+ #undef TARGET_MEM_FUNCTIONS
+
+ /* Names to predefine in the preprocessor for this target machine. */
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-D__powerpc__ -D__PPC__ -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(powerpc) -Amachine(powerpc)"
+
+ /* Make gcc agree with <machine/ansi.h> */
+
+ #undef SIZE_TYPE
+ #define SIZE_TYPE "unsigned int"
+
+ #undef PTRDIFF_TYPE
+ #define PTRDIFF_TYPE "int"
+
+ #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
+
+ /* Until gcc uses fixed functions on procedure entry, -mmultiple is probably
+ more efficient due to smaller code and less cache thrashing. */
+ #undef CC1_SPEC
+ #define CC1_SPEC "-mmultiple"
+
+ /* We want a implemetation reserved symbol for the entry point! */
+ #undef LINK_SPEC
+ #define LINK_SPEC "%{!nostdlib:%{!r*:%{!e*:-e _start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+
+ /* Provide a STARTFILE_SPEC appropriate for NetBSD. Here we add
+ the crtbegin.o file (see crtstuff.c) which provides part of the
+ support for getting C++ file-scope static object constructed
+ before entering `main'. */
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+ "%{!shared: \
+ %{pg:gcrt0.o%s} \
+ %{!pg: \
+ %{p:gcrt0.o%s} \
+ %{!p:crt0.o%s}}} \
+ %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+
+ /* Provide a ENDFILE_SPEC appropriate for NetBSD. Here we tack on
+ the file which provides part of the support for getting C++
+ file-scope static object deconstructed after exiting `main' */
+
+ #undef ENDFILE_SPEC
+ #define ENDFILE_SPEC \
+ "%{!shared:crtend.o%s} %{shared:crtendS.o%s}"
+
+ #undef FUNCTION_PROFILER
+ #define FUNCTION_PROFILER(FILE, LABELNO) \
+ { \
+ fprintf (FILE, "\tmflr %s\n", reg_names[0]); \
+ fprintf (FILE, "\tstw %s,4(%s)\n", reg_names[0], reg_names[1]); \
+ /* XXX PIC?? */ \
+ fprintf (FILE, "\tbl _mcount\n"); \
+ fprintf (FILE, "\tlwz %s,4(%s)\n", reg_names[0], reg_names[1]); \
+ fprintf (FILE, "\tmtlr %s\n", reg_names[0]); \
+ }
*** /dev/null Tue Feb 24 15:49:12 1998
--- gcc/config/rs6000/xm-netbsd.h Tue Feb 24 15:28:34 1998
***************
*** 0 ****
--- 1,9 ----
+ /* Configuration for GCC for PowerPC running NetBSD as host. */
+
+ #include <rs6000/xm-rs6000.h>
+
+ /* NetBSD isn't SysV */
+ #undef USG
+
+ /* Not needed on NetBSD (really?) */
+ #undef COLLECT_EXPORT_LIST