OSDN Git Service

2010-04-30 Tobias Burnus Mburnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / gfortranspec.c
index a6f9b42..413da7b 100644 (file)
@@ -1,6 +1,6 @@
 /* Specific flags and argument handling of the Fortran front-end.
    Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009
+   2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -186,8 +186,8 @@ lookup_option (Option *xopt, int *xskip, const char **xarg, const char *text)
        opt = OPTION_syntax_only;
       else if (!strcmp (text, "-static-libgfortran"))
        opt = OPTION_static_libgfortran;
-      else if (!strcmp (text, "-dumpversion"))
-       opt = OPTION_version;
+      else if (!strcmp (text, "-static"))
+       opt = OPTION_static;
       else if (!strcmp (text, "-fversion"))    /* Really --version!! */
        opt = OPTION_version;
       else if (!strcmp (text, "-Xlinker") || !strcmp (text, "-specs"))
@@ -277,11 +277,13 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
   /* By default, we throw on the math library if we have one.  */
   int need_math = (MATH_LIBRARY[0] != '\0');
 
-  /* Whether we should link a static libgfortran.  */
-  int static_lib = 0;
+#ifdef HAVE_LD_STATIC_DYNAMIC
+  /* Whether we should link a static libgfortran. */
+  int static_lib = 0; 
 
   /* Whether we need to link statically.  */
   int static_linking = 0;
+#endif
 
   /* The number of input and output files in the incoming arg list.  */
   int n_infiles = 0;
@@ -342,11 +344,16 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
          break;
 
        case OPTION_static_libgfortran:
+#ifdef HAVE_LD_STATIC_DYNAMIC
          static_lib = 1;
+#endif
          break;
 
        case OPTION_static:
+#ifdef HAVE_LD_STATIC_DYNAMIC
          static_linking = 1;
+#endif
+         break;
 
        case OPTION_l:
          ++n_infiles;
@@ -371,7 +378,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
 
        case OPTION_version:
          printf ("GNU Fortran %s%s\n", pkgversion_string, version_string);
-         printf ("Copyright %s 2009 Free Software Foundation, Inc.\n\n",
+         printf ("Copyright %s 2010 Free Software Foundation, Inc.\n\n",
                  _("(C)"));
          printf (_("GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\
 You may redistribute copies of GNU Fortran\n\