toplev.c (default_get_pch_validity): Guard the use of target_options with #ifdef...
authorKazu Hirata <kazu@cs.umass.edu>
Sun, 26 Oct 2003 15:40:14 +0000 (15:40 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sun, 26 Oct 2003 15:40:14 +0000 (15:40 +0000)
* toplev.c (default_get_pch_validity): Guard the use of
target_options with #ifdef TARGET_OPTIONS.
(default_pch_valid_p): Likewise.

From-SVN: r72953

gcc/ChangeLog
gcc/toplev.c

index 8a90bc693b605a8c964eb6f37445f8e0d0039177..f975f88dee65b4cce793baae01470457af1bf94d 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-26  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * toplev.c (default_get_pch_validity): Guard the use of
+       target_options with #ifdef TARGET_OPTIONS.
+       (default_pch_valid_p): Likewise.
+
 2003-10-26  Andreas Jaeger  <aj@suse.de>
            Zack Weinberg  <zack@codesourcery.com>
            Andreas Tobler <toa@pop.agri.ch>
index 8f3f03408929dd7b183c3ef850bef2560d960c43..6f7255059d999a8536430901c1aac2c61e96cafc 100644 (file)
@@ -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;