summaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-11-10 10:28:47 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1992-11-10 10:28:47 -0500
commitf0cdf2b265a1eb99f22131b4a8f6a851cc1819b8 (patch)
tree7a689acc5b308ff39dcf94cb4c1368149c47527c /gcc/genattrtab.c
parent5ce402b71dda6acf9d2cfa1c6810df2455c10118 (diff)
downloadgcc-f0cdf2b265a1eb99f22131b4a8f6a851cc1819b8.tar.gz
(main): Unlimit stack size.
From-SVN: r2737
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 47908266fea..4426df8ae59 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -101,6 +101,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "insn-config.h" /* For REGISTER_CONSTRAINTS */
#include <stdio.h>
+#ifndef VMS
+#ifndef USG
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+#endif
+
static struct obstack obstack, obstack1, obstack2;
struct obstack *rtl_obstack = &obstack;
struct obstack *hash_obstack = &obstack1;
@@ -5464,6 +5471,18 @@ main (argc, argv)
rtx tem;
int i;
+#ifdef RLIMIT_STACK
+ /* Get rid of any avoidable limit on stack size. */
+ {
+ struct rlimit rlim;
+
+ /* Set the stack limit huge so that alloca does not fail. */
+ getrlimit (RLIMIT_STACK, &rlim);
+ rlim.rlim_cur = rlim.rlim_max;
+ setrlimit (RLIMIT_STACK, &rlim);
+ }
+#endif /* RLIMIT_STACK defined */
+
obstack_init (rtl_obstack);
obstack_init (hash_obstack);
obstack_init (temp_obstack);