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] Attempt to increase RLIMIT_STACK in the driver as well as compiler (PR c++/49756, take 3)


On Thu, 21 Jul 2011, Ian Lance Taylor wrote:
>> 2011-07-21  Jakub Jelinek  <jakub@redhat.com>
>>
>> 	PR c++/49756
>> 	* libiberty.h (stack_limit_increase): New prototype.
>>
>> 	* stack-limit.c: New file.
>> 	* Makefile.in: Regenerate deps.
>> 	(CFILES): Add stack-limit.c.
>> 	(REQUIRED_OFILES): Add ./stack-limit.$(objext).
>> 	* configure.ac (checkfuncs): Add getrlimit and setrlimit.
>> 	(AC_CHECK_FUNCS): Likewise.
>> 	* configure: Regenerated.
>> 	* config.in: Regenerated.
>>
>> 	* gcc.c (main): Call stack_limit_increase (64MB).
>> 	* toplev.c (toplev_main): Likewise.
> This is OK.

I'm afraid it's not:

.../gcc-HEAD/libiberty/stack-limit.c: In function 'stack_limit_increase':
.../gcc-HEAD/libiberty/stack-limit.c:49: error: 'uint64_t' undeclared (first use in this function)

That puzzled me at first, but FreeBSD defines RLIM_INFINITY in 
/usr/include/sys/resource.h and as follows:

  ((rlim_t)(((uint64_t)1 << 63) - 1))

Luckily, the fix is simple and bootstrap on i386-unknown-freebsd9.0 has
proceeded beyond the previous failure point.

Okay?

Gerald


2011-07-22  Gerald Pfeifer  <gerald@pfeifer.com>

	PR target/49817
	* stack-limit.c: Include <stdint.h>.

Index: stack-limit.c
===================================================================
--- stack-limit.c	(revision 176657)
+++ stack-limit.c	(working copy)
@@ -35,6 +35,9 @@
 
 #include "config.h"
 
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif


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