diff mbox

Attempt to increase RLIMIT_STACK in the driver as well as compiler (PR c++/49756, take 3)

Message ID alpine.LFD.2.02.1107230003120.22948@gerinyyl
State New
Headers show

Commit Message

Gerald Pfeifer July 22, 2011, 10:19 p.m. UTC
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>.

Comments

Ian Lance Taylor July 22, 2011, 10:34 p.m. UTC | #1
Gerald Pfeifer <gerald@pfeifer.com> writes:

> 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))

Oy.


> 2011-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
>
> 	PR target/49817
> 	* stack-limit.c: Include <stdint.h>.

This is OK.

Thanks.

Ian
diff mbox

Patch

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