This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

powerpc64-gnu target


powerpc64-gnu builds have been broken for a long time, at least as far
back as 2003-06-04 when powerpc64-linux became biarch, and changes
since then have made things worse.  The length of time probably means
that the target should be removed, but someone may want to resurrect
it (or build some other powerpc64 target non-biarch).  In which case
the following patch will help.

Incidentally, my powerpc64-gnu build still failed with
.../driver-rs6000.c:47: error: 'describe_cache' defined but not used
at which point I decided I'd wasted enough time..

The t-linux64 change came about when I was still trying to use
t-linux64 on powerpc64-gnu, and found the build dying due to lack of
tramp.S.  You need t-ppccomm to build tramp.S, but that file already
adds tramp.S and darwin-ldouble.c to LIB2FUNCS_EXTRA, so they need not
be added in t-linux64.

Bootrapped powerpc-linux and powerpc64-linux.  OK to install?

	* config.gcc (powerpc64-*-gnu*): Add rs6000/default64.h to tm_file.
	Remove a number of t-files from tmake_file.
	* config/rs6000/sysv4.opt (mprototype): Name variable target_prototype.
	* config/rs6000/sysv4.h (TARGET_PROTOTYPE): Define.
	* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Set
	target_prototype, not TARGET_PROTOTYPE.
	(LINK_OS_GNU_SPEC): Define.
	* config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Delete tramp.S
	and darwin-ldoubdle.c.

Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 145380)
+++ gcc/config.gcc	(working copy)
@@ -1723,9 +1723,9 @@ powerpc64-*-linux*)
 	tmake_file="t-dfprules rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
 	;;
 powerpc64-*-gnu*)
-	tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux64.h rs6000/gnu.h glibc-stdint.h"
+	tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/default64.h rs6000/linux64.h rs6000/gnu.h glibc-stdint.h"
 	extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
-	tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
+	tmake_file="t-slibgcc-elf-ver t-gnu"
 	;;
 powerpc-*-darwin*)
 	extra_options="${extra_options} rs6000/darwin.opt"
Index: gcc/config/rs6000/sysv4.opt
===================================================================
--- gcc/config/rs6000/sysv4.opt	(revision 145380)
+++ gcc/config/rs6000/sysv4.opt	(working copy)
@@ -74,7 +74,7 @@ Target RejectNegative
 no description yet
 
 mprototype
-Target Var(TARGET_PROTOTYPE)
+Target Var(target_prototype)
 Assume all variable arg functions are prototyped
 
 ;; FIXME: Does nothing.
Index: gcc/config/rs6000/linux64.h
===================================================================
--- gcc/config/rs6000/linux64.h	(revision 145380)
+++ gcc/config/rs6000/linux64.h	(working copy)
@@ -99,7 +102,7 @@ extern int dot_symbols;
 	    }							\
 	  if (TARGET_PROTOTYPE)					\
 	    {							\
-	      TARGET_PROTOTYPE = 0;				\
+	      target_prototype = 0;				\
 	      error (INVALID_64BIT, "prototype");		\
 	    }							\
 	  if ((target_flags & MASK_POWERPC64) == 0)		\
@@ -134,6 +137,10 @@ extern int dot_symbols;
 #undef	ASM_SPEC
 #undef	LINK_OS_LINUX_SPEC
 
+/* FIXME: This will quite possibly choose the wrong dynamic linker.  */
+#undef	LINK_OS_GNU_SPEC
+#define	LINK_OS_GNU_SPEC LINK_OS_LINUX_SPEC
+
 #ifndef	RS6000_BI_ARCH
 #define	ASM_DEFAULT_SPEC "-mppc64"
 #define	ASM_SPEC	 "%(asm_spec64) %(asm_spec_common)"
Index: gcc/config/rs6000/t-linux64
===================================================================
--- gcc/config/rs6000/t-linux64	(revision 145380)
+++ gcc/config/rs6000/t-linux64	(working copy)
@@ -1,8 +1,7 @@
 
 #rs6000/t-linux64
 
-LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \
-	$(srcdir)/config/rs6000/darwin-ldouble.c
+LIB2FUNCS_EXTRA += $(srcdir)/config/rs6000/ppc64-fp.c
 LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA))
 
 TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
Index: gcc/config/rs6000/sysv4.h
===================================================================
--- gcc/config/rs6000/sysv4.h	(revision 145380)
+++ gcc/config/rs6000/sysv4.h	(working copy)
@@ -54,6 +54,7 @@ extern enum rs6000_sdata_type rs6000_sda
 
 #define	TARGET_BITFIELD_TYPE	(! TARGET_NO_BITFIELD_TYPE)
 #define	TARGET_BIG_ENDIAN	(! TARGET_LITTLE_ENDIAN)
+#define	TARGET_PROTOTYPE	target_prototype
 #define	TARGET_NO_PROTOTYPE	(! TARGET_PROTOTYPE)
 #define	TARGET_NO_TOC		(! TARGET_TOC)
 #define	TARGET_NO_EABI		(! TARGET_EABI)

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]