diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 07:48:28 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 07:48:28 +0200 |
commit | 5b9c3fc489788e131d89749e99c88d31bdae418f (patch) | |
tree | b13f3fbe9e2ed2f7b3538a470648b39de5a19659 /gcc/ada/init.c | |
parent | 13d923cc90c7964d5629013c843036fdb50e4301 (diff) | |
download | gcc-5b9c3fc489788e131d89749e99c88d31bdae418f.zip gcc-5b9c3fc489788e131d89749e99c88d31bdae418f.tar.gz gcc-5b9c3fc489788e131d89749e99c88d31bdae418f.tar.bz2 |
[multiple changes]
2010-06-23 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Minor reformatting.
2010-06-23 Doug Rupp <rupp@adacore.com>
* bindusg.adb (Display): Write -Hnn line.
* bindgen.adb (Gen_Adainit_Ada): Write Heap_Size to binder file as
necessary.
* init.c (__gl_heap_size): Rename from __gl_no_malloc_64 and change
valid values to 32 and 64.
(GNAT$NO_MALLOC_64): Recognize TRUE, 1, FALSE, and 0 in addition to
ENABLE, DISABLE as valid settings.
* switch-b.adb (Scan_Binder_Switches): Process -Hnn switch.
* opt.ads (Heap_Size): New global variable.
* gcc-interface/utils2.c (maybe_wrap_malloc): Remove mostly redundant
TARGET_MALLOC64 check. Fix comment.
From-SVN: r161243
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index cd028e5..f011668 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -1568,15 +1568,18 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext) #endif -/* Feature logical name and global variable address pair */ +/* Feature logical name and global variable address pair. + If we ever add another feature logical to this list, the + feature struct will need to be enhanced to take into account + possible values for *gl_addr. */ struct feature {char *name; int* gl_addr;}; /* Default values for GNAT features set by environment. */ -int __gl_no_malloc_64 = 0; +int __gl_heap_size = 64; /* Array feature logical names and global variable addresses */ static struct feature features[] = { - {"GNAT$NO_MALLOC_64", &__gl_no_malloc_64}, + {"GNAT$NO_MALLOC_64", &__gl_heap_size}, {0, 0} }; @@ -1607,10 +1610,14 @@ void __gnat_set_features () else strcpy (buff, ""); - if (strcmp (buff, "ENABLE") == 0) - *features [i].gl_addr = 1; - else if (strcmp (buff, "DISABLE") == 0) - *features [i].gl_addr = 0; + if ((strcmp (buff, "ENABLE") == 0) || + (strcmp (buff, "TRUE") == 0) || + (strcmp (buff, "1") == 0)) + *features [i].gl_addr = 32; + else if ((strcmp (buff, "DISABLE") == 0) || + (strcmp (buff, "FALSE") == 0) || + (strcmp (buff, "0") == 0)) + *features [i].gl_addr = 64; } __gnat_features_set = 1; |