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

powerpc-elf-netbsd patch for gcc-2.8.0



gcc-2.8.0のpowerpc-elf-netbsd用patchを作ってみました。
#gcc-2.7.2.1用のpatchほとんどそのままです。
configure --target=powerpc-elf-netbsdが使えるようになります。

これで作ったpowerpcバイナリの動作確認はまだしてません。

extra_headers=ppc-asm.h
は別に必要ないですかね。

sakamoto@cec.co.jp

diff -c ./configure configure
*** ./configure	Tue Dec 23 20:19:51 1997
--- configure	Fri Feb 20 11:06:41 1998
***************
*** 4517,4522 ****
--- 4517,4530 ----
  		fi
  		xmake_file=rs6000/x-sysv4
  		;;
+ 	powerpc-elf-netbsd*)
+ 		tm_file=rs6000/netbsd.h
+ 		xm_file=rs6000/xm-netbsd.h
+ 		fixincludes=Makefile.in
+ 		extra_headers=ppc-asm.h
+ 		tmake_file=t-libc-ok
+ 		xmake_file=x-netbsd
+ 		;;
  	powerpc-*-eabiaix*)
  		tm_file=rs6000/eabiaix.h
  		tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
diff -c /dev/null config/rs6000/netbsd.h
*** /dev/null	Thu Jan  1 09:00:00 1970
--- config/rs6000/netbsd.h	Fri Feb 20 11:10:41 1998
***************
*** 0 ****
--- 1,45 ----
+ #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"
+ 
+ /* With NetBSD, no need for endfiles.  */
+ #undef	ENDFILE_SPEC
+ 
+ /* 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*}"
+ 
+ /* With NetBSD, no need for special startfiles either.  */
+ #undef	STARTFILE_SPEC
diff -c /dev/null config/rs6000/xm-netbsd.h
*** /dev/null	Thu Jan  1 09:00:00 1970
--- config/rs6000/xm-netbsd.h	Fri Feb 20 11:21:45 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