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

            Bug ID: 65711
           Summary: arm*-linux* "link" spec passes '-dynamic-linker' even
                    for '-shared'
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ludo at gnu dot org

gcc/config/arm/linux-elf.h defines LINUX_TARGET_LINK_SPEC to (simplified):

  %{!static -dynamic-linker LINKER}

However, '-dynamic-linker' should not be passed when '-shared' is used.  The
correct way appears to be what config/i386/gnu-user.h does, which is:

  %{!static %{!shared -dynamic-linker LINKER}}

I believe the attached patch fixes that.  At least both 4.8.4 and 4.9.2 are
affected.

(Initially discussed in the context of <http://bugs.gnu.org/20102>.)

Reply via email to