summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-05 14:28:23 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-05 14:28:23 +0000
commit65550dee66017c96af825d0b38bfdf834c57a711 (patch)
tree04ed3850fd1629d7c0283f526cc84206499d75b2
parent1e54e0fc6fd455938bf9d945ed412e045b29a9d2 (diff)
downloadppe42-gcc-65550dee66017c96af825d0b38bfdf834c57a711.tar.gz
ppe42-gcc-65550dee66017c96af825d0b38bfdf834c57a711.zip
2014-06-05 Richard Biener <rguenther@suse.de>
PR fortran/61418 * gfortranspec.c (spec_file): Remove. (find_spec_file): Likewise. (lang_specific_driver): Do not look for specs file in -L or append -specs command line argument. (lang_specific_pre_link): Always %:include libgfortran.spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211281 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog9
-rw-r--r--gcc/fortran/gfortranspec.c38
2 files changed, 10 insertions, 37 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 15da2d6bd40..3d1c184073c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-05 Richard Biener <rguenther@suse.de>
+
+ PR fortran/61418
+ * gfortranspec.c (spec_file): Remove.
+ (find_spec_file): Likewise.
+ (lang_specific_driver): Do not look for specs file in -L
+ or append -specs command line argument.
+ (lang_specific_pre_link): Always %:include libgfortran.spec.
+
2014-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60834
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index a6296efbf4d..cceee6d2d39 100644
--- a/gcc/fortran/gfortranspec.c
+++ b/gcc/fortran/gfortranspec.c
@@ -73,34 +73,11 @@ static void append_arg (const struct cl_decoded_option *);
static unsigned int g77_newargc;
static struct cl_decoded_option *g77_new_decoded_options;
-/* The path to the spec file. */
-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
- not. */
-static char *
-find_spec_file (const char *dir)
-{
- const char dirsep_string[] = { DIR_SEPARATOR, '\0' };
- char *spec;
- struct stat sb;
-
- spec = XNEWVEC (char, strlen (dir) + sizeof (SPEC_FILE) + 4);
- strcpy (spec, dir);
- strcat (spec, dirsep_string);
- strcat (spec, SPEC_FILE);
- if (!stat (spec, &sb))
- return spec;
- free (spec);
- return NULL;
-}
-
-
/* Return whether strings S1 and S2 are both NULL or both the same
string. */
@@ -313,12 +290,6 @@ For more information about these matters, see the file named COPYING\n\n"));
cool facility for handling --help and --verbose --help. */
return;
- case OPT_L:
- if (!spec_file)
- spec_file = find_spec_file (decoded_options[i].arg);
- break;
-
-
default:
break;
}
@@ -449,12 +420,6 @@ For more information about these matters, see the file named COPYING\n\n"));
#endif
- /* Read the specs file corresponding to libgfortran.
- If we didn't find the spec file on the -L path, we load it
- via lang_specific_pre_link. */
- if (spec_file)
- append_option (OPT_specs_, spec_file, 1);
-
if (verbose && g77_new_decoded_options != g77_x_decoded_options)
{
fprintf (stderr, _("Driving:"));
@@ -473,8 +438,7 @@ For more information about these matters, see the file named COPYING\n\n"));
int
lang_specific_pre_link (void)
{
- free (spec_file);
- if (spec_file == NULL && library)
+ if (library)
do_spec ("%:include(libgfortran.spec)");
return 0;
OpenPOWER on IntegriCloud