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]

Re: [PATCH, rs6000] Preserve link stack for 476 cpus



On 2 Nov 2011, at 18:34, Peter Bergner wrote:


On Wed, 2011-11-02 at 18:17 +0000, Iain Sandoe wrote:
also in macho_branch_islands () :

	  if (TARGET_LINK_STACK)
	    {
	      char name[32];
	      get_ppc64_thunk_name (name);
	      strcat (tmp_buf, ":\n\tmflr r0\n\tbl ");
	      strcat (tmp_buf, name);
	      strcat (tmp_buf, "\n");
	      strcat (tmp_buf, label);
	      strcat (tmp_buf, "_pic:\n\tmflr r11\n");
	    }
	  else

which breaks bootstrap for darwin - I'm not sure why you have an entry
here (this is mach-o-specific code)
- I doubt there will ever be a mach-o implementation with a PPC476 -
but, in any case the call to get_ppc64_thunk_name needs wrapping
somehow.

How is it failing for you? And what are your configure options so I can try and recreate the error?

/GCC/gcc-live-trunk/gcc/config/rs6000/rs6000.c: In function ‘void macho_branch_islands()’:
/GCC/gcc-live-trunk/gcc/config/rs6000/rs6000.c:25074:34: error: ‘get_ppc64_thunk_name’ was not declared in this scope
make[3]: *** [rs6000.o] Error 1
make[3]: *** Waiting for unfinished jobs....



/GCC/gcc-live-trunk/configure --prefix=/GCC/gcc-4-7-tempi -- target=powerpc-apple-darwin9 --host=powerpc-apple-darwin9 -- build=powerpc-apple-darwin9 --enable-version-specific-runtime-libs -- enable-checking=yes --with-libiconv-prefix=/usr --with-system-zlib -- with-gmp=/GCC/multiprec-math/ppc --with-mpfr=/GCC/multiprec-math/ppc --with-mpc=/GCC/multiprec-math/ppc --enable-languages=c,c+ +,fortran,ada,objc,obj-c++,lto


etc..

===

Hmm .. I wonder if this is just a temporary glitch because of the move of files to libgcc.

I'll investigate a bit further later...

If it's similar to what Alan saw but for get_ppc64_thunk_name, namely:

rs6000.c:27968:1: error: 'void rs6000_code_end()' defined but not used
[-Werror=unused-function]
cc1plus: all warnings being treated as errors

Does the following fix it for you?

Index: config/rs6000/rs6000-protos.h
===================================================================
--- config/rs6000/rs6000-protos.h	(revision 180786)
+++ config/rs6000/rs6000-protos.h	(working copy)
@@ -173,7 +173,7 @@ extern void rs6000_emit_eh_reg_restore (
extern const char * output_isel (rtx *);
extern void rs6000_call_indirect_aix (rtx, rtx, rtx);
extern void rs6000_aix_asm_output_dwarf_table_ref (char *);
-extern void get_ppc476_thunk_name (char name[32]);
+extern void get_ppc476_thunk_name (char name[32]) ATTRIBUTE_UNUSED;

/* Declare functions in rs6000-c.c */

We do include this in tm_p.h


$ more ../gcc-4-7-trunk-build/gcc/tm_p.h
#ifndef GCC_TM_P_H
#define GCC_TM_P_H
#ifdef IN_GCC
# include "config/rs6000/rs6000-protos.h"
# include "config/darwin-protos.h"
# include "tm-preds.h"
#endif
#endif /* GCC_TM_P_H */

.. but not in tm.h

Iain


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