This is the mail archive of the gcc-patches@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]

Re: [Patch][GCC] Document and fix -r (partial linking)


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
joseph@codesourcery.com

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