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]

RFA: FT32: Fix building gcc.


Hi Guys,

  It seems that the FT32 port of GCC does not have a maintainer at the
  moment.  Nevertheless I have a patch to fix a couple of build time
  problems compiling gcc for the FT32.  Is this OK to apply ?

Cheers
  Nick

gcc/ChangeLog
2015-06-23  Nick Clifton  <nickc@redhat.com>

	* config/ft32/ft32.c: Include emit-rtl.h for the definition of
	crtl.
        (ft32_print_operand): Cast the result of INTVAL in order to make
	sure that the correct value is printed.
        * config/ft32/ft32.h (STACK_GROWS_DOWNWARD): Define to an
	integer.

Index: gcc/config/ft32/ft32.c
===================================================================
--- gcc/config/ft32/ft32.c	(revision 224834)
+++ gcc/config/ft32/ft32.c	(working copy)
@@ -59,8 +59,8 @@
 #include "basic-block.h"
 #include "df.h"
 #include "builtins.h"
+#include "emit-rtl.h"

-
 #include <stdint.h>

 #define LOSE_AND_RETURN(msgid, x)               \
@@ -199,7 +199,7 @@
       return;

     case 'm':
-      fprintf (file, "%d", -INTVAL(x));
+      fprintf (file, "%ld", (long) (- INTVAL(x)));
       return;

case 'd': // a DW spec, from an integer alignment (for BLKmode insns)
Index: gcc/config/ft32/ft32.h
===================================================================
--- gcc/config/ft32/ft32.h	(revision 224834)
+++ gcc/config/ft32/ft32.h	(working copy)
@@ -248,7 +248,7 @@

 /* Define this macro if pushing a word onto the stack moves the stack
    pointer to a smaller address.  */
-#define STACK_GROWS_DOWNWARD
+#define STACK_GROWS_DOWNWARD 1

 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0


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