This is the mail archive of the gcc-bugs@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]

egcs-19980531, some patches to bootstrap on sunos4/hpux9


	Here are some patches I needed to bootstrap egcs-19980531 on
SunOS4 and HPUX9 when using cc for stage1. 

		--Kaveh



Wed Jun  3 12:45:00 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* gencheck.c: Remove redundant stdio.h include.  Add a definition
 	of xmalloc for when we are forced to link with alloca.o.

	* reload1.c (reload_reg_free_for_value_p): Use `(unsigned)1'
	instead of `1U'.

	* fold-const.c (constant_boolean_node): Make definition static to
	match the prototype.

*** gencheck.c~	Thu May 21 15:20:36 1998
--- gencheck.c	Tue Jun  2 23:52:01 1998
***************
*** 18,24 ****
  the Free Software Foundation, 59 Temple Place - Suite 330,
  Boston, MA 02111-1307, USA.  */
  
- #include <stdio.h>
  #include "hconfig.h"
  #include "system.h"
  
--- 18,23 ----
***************
*** 60,62 ****
--- 59,80 ----
    return 0;
  }
  
+ #if defined(USE_C_ALLOCA) && !defined(__GNUC__)
+ /* FIXME: We only need an xmalloc definition because we are forced to
+    link with alloca.o on some platforms.  This should go away if/when
+    we link against libiberty.a. (ghazi@caip.rutgers.edu 6/3/98) */
+ char *
+ xmalloc (nbytes)
+      int nbytes;
+ {
+   char *tmp = (char *) malloc (nbytes);
+ 
+   if (!tmp)
+     {
+       fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes);
+       exit (FATAL_EXIT_CODE);
+     }
+ 
+   return tmp;
+ }
+ #endif /* USE_C_ALLOCA && !__GNUC__ */
*** reload1.c~	Wed May 27 18:42:52 1998
--- reload1.c	Wed Jun  3 00:36:45 1998
***************
*** 5047,5053 ****
        rtx reg = reload_reg_rtx[i];
        if (reg && GET_CODE (reg) == REG
  	  && ((unsigned) regno - true_regnum (reg)
! 	      <= HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)) - 1U)
  	  && (! reload_in[i] || ! rtx_equal_p (reload_in[i], value)
  	      || reload_out[i]))
  	{
--- 5047,5053 ----
        rtx reg = reload_reg_rtx[i];
        if (reg && GET_CODE (reg) == REG
  	  && ((unsigned) regno - true_regnum (reg)
! 	      <= HARD_REGNO_NREGS (REGNO (reg), GET_MODE (reg)) - (unsigned)1)
  	  && (! reload_in[i] || ! rtx_equal_p (reload_in[i], value)
  	      || reload_out[i]))
  	{
--- fold-const.c~	Fri May 22 16:58:13 1998
+++ fold-const.c	Wed Jun  3 00:29:53 1998
@@ -3740,7 +3740,7 @@
 /* Return a node which has the indicated constant VALUE (either 0 or
    1), and is of the indicated TYPE.  */
 
-tree
+static tree
 constant_boolean_node (value, type)
      int value;
      tree type;


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