------- Comment #12 from iains at gcc dot gnu dot org  2010-04-09 17:42 -------
(In reply to comment #11)
> The http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126068
> patch adds OPTION_static, but nothing ever returns that value, so the code
> setting static_linking is clearly dead code.  That couldn't be the intent.

indeed:
how about this? (tested on ia32-pc-linux)

Index: gcc/fortran/gfortranspec.c
===================================================================
--- gcc/fortran/gfortranspec.c  (revision 158167)
+++ gcc/fortran/gfortranspec.c  (working copy)
@@ -186,6 +186,8 @@ lookup_option (Option *xopt, int *xskip, const cha
        opt = OPTION_syntax_only;
       else if (!strcmp (text, "-static-libgfortran"))
        opt = OPTION_static_libgfortran;
+      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"))
@@ -351,8 +353,7 @@ lang_specific_driver (int *in_argc, const char *co
 #ifdef HAVE_LD_STATIC_DYNAMIC
          static_linking = 1;
 #endif
-         /* Fall through, count OPTION_static as an item included in
-            the rewritten command line. */
+         break;

        case OPTION_l:
          ++n_infiles;


-- 

iains at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31400

Reply via email to