From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23062 invoked by alias); 9 Apr 2010 17:42:30 -0000 Received: (qmail 23009 invoked by uid 48); 9 Apr 2010 17:42:18 -0000 Date: Fri, 09 Apr 2010 17:42:00 -0000 Message-ID: <20100409174218.23008.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/31400] enable static linking of support libraries through -static-libXY In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "iains at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg00961.txt.bz2 ------- 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