+2010-11-22 Michael Matz <matz@suse.de>
+
+ * gfortranspec.c (library): New global, moved from ...
+ (lang_specific_driver): ... here.
+ (lang_specific_pre_link): Test it here before including
+ libgfortran.spec.
+
2010-11-21 Michael Matz <matz@suse.de>
Tobias Burnus <burnus@net-b.de>
static struct cl_decoded_option *g77_new_decoded_options;
/* The path to the spec file. */
-char *spec_file = NULL;
+static char *spec_file = NULL;
+
+/* This will be NULL if we encounter a situation where we should not
+ link in the fortran libraries. */
+static const char *library = NULL;
/* Return full path name of spec file if it is in DIR, or NULL if
unsigned int i;
int verbose = 0;
- /* This will be NULL if we encounter a situation where we should not
- link in libf2c. */
- const char *library = FORTRAN_LIBRARY;
-
/* 0 => -xnone in effect.
1 => -xfoo in effect. */
int saw_speclang = 0;
int n_infiles = 0;
int n_outfiles = 0;
+ library = FORTRAN_LIBRARY;
+
#if 0
fprintf (stderr, "Incoming:");
for (i = 0; i < argc; i++)
{
if (spec_file)
free (spec_file);
- else
+ else if (library)
do_spec ("%:include(libgfortran.spec)");
return 0;