On Thu, 23 Aug 2018, Iain Sandoe wrote:

> Joseph: As a side-comment, is there a reason that we don’t exclude 
> gomp/itm/fortran/gcov from the link for -nostdlib / -nodefaultlib?
> 
> If we are relying on the lib self-specs for this, then we’re not 
> succeeding since the one we build at the moment don’t include those 
> clauses.

Well, fortran/gfortranspec.c for example has

        case OPT_nostdlib:
        case OPT_nodefaultlibs:
        case OPT_c:
        case OPT_S:
        case OPT_fsyntax_only:
        case OPT_E:
          /* These options disable linking entirely or linking of the
             standard libraries.  */
          library = 0;
          break;

and only uses libgfortran.spec if (library).  So it's certainly meant to 
avoid linking with libgfortran or its dependencies if -nostdlib.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to