http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53002

             Bug #: 53002
           Summary: Request new specs string token for multilib_os_dir
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: s...@netbsd.org


Created attachment 27163
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27163
Add %M spec string token

In the GCC FAQ under "Dynamic linker is unable to find GCC libraries", one
suggestion is to add '-R' or '-rpath' linker option to the *link or *lib specs
so that the GCC libraries can be found.

E.G. the following line is added to the DRIVER_DEFINES when building gcc
via pkgsrc ('$(LINKER_RPATH_FLAG)' comes from the environment):

  -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(libdir) \""

This is needed as the prefix is normally something like '/usr/pkg/gcc47'.

The problem is that this does not allow for multilib os directory's and
there is currently no simple way of dong so.

My solution is to add the '%M' token that expands to multilib_os_dir.

The above line can then be easily change to handle multilib directory's:

  -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(libdir)/%M \""

Reply via email to