summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-26 15:40:14 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-26 15:40:14 +0000
commit2e41efb0e3d353d1d7392e8f51af0ce7bc1de770 (patch)
tree8ff063f00956e08787b905d9ca24f573263c2093 /gcc/toplev.c
parentda45fc41a7b79243ebffdd994e8b3eafcbfb3f91 (diff)
downloadgcc-2e41efb0e3d353d1d7392e8f51af0ce7bc1de770.tar.gz
* toplev.c (default_get_pch_validity): Guard the use of
target_options with #ifdef TARGET_OPTIONS. (default_pch_valid_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 8f3f0340892..6f7255059d9 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -4110,12 +4110,14 @@ default_get_pch_validity (size_t *len)
char *result, *r;
*len = sizeof (target_flags) + 2;
+#ifdef TARGET_OPTIONS
for (i = 0; i < ARRAY_SIZE (target_options); i++)
{
*len += 1;
if (*target_options[i].variable)
*len += strlen (*target_options[i].variable);
}
+#endif
result = r = xmalloc (*len);
r[0] = flag_pic;
@@ -4124,6 +4126,7 @@ default_get_pch_validity (size_t *len)
memcpy (r, &target_flags, sizeof (target_flags));
r += sizeof (target_flags);
+#ifdef TARGET_OPTIONS
for (i = 0; i < ARRAY_SIZE (target_options); i++)
{
const char *str = *target_options[i].variable;
@@ -4134,6 +4137,7 @@ default_get_pch_validity (size_t *len)
memcpy (r, str, l);
r += l;
}
+#endif
return result;
}
@@ -4179,6 +4183,7 @@ default_pch_valid_p (const void *data_p, size_t len)
len -= sizeof (target_flags);
/* Check string options. */
+#ifdef TARGET_OPTIONS
for (i = 0; i < ARRAY_SIZE (target_options); i++)
{
const char *str = *target_options[i].variable;
@@ -4194,6 +4199,7 @@ default_pch_valid_p (const void *data_p, size_t len)
data += l;
len -= l;
}
+#endif
return NULL;