This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/61418] [4.9/4.10 Regression] HDF5 build failure with -flto: libgfortran.spec: attempt to rename spec 'lib' to already defined spec 'liborig'


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61418

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
gfortranspec.c does

        case OPT_L:
          if (!spec_file)
            spec_file = find_spec_file (decoded_options[i].arg);
          break;
...
  /* 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);

seemingly copied from Java I guess.  lang_specific_pre_link doesn't add
-specs.

int
lang_specific_pre_link (void)
{
  free (spec_file);
  if (spec_file == NULL && library)
    do_spec ("%:include(libgfortran.spec)");

  return 0;
}

I suppose it could simply do

 do_spec ("%:include(<expand spec_file here>)");

instead.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]