This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65711] New: arm*-linux* "link" spec passes '-dynamic-linker' even for '-shared'
- From: "ludo at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Apr 2015 08:03:24 +0000
- Subject: [Bug target/65711] New: arm*-linux* "link" spec passes '-dynamic-linker' even for '-shared'
- Auto-submitted: auto-generated
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>.)