[llvm-bugs] [Bug 31465] New: linker driver should not use -export_dynamic when the linker does not support it
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Dec 24 23:36:50 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31465
Bug ID: 31465
Summary: linker driver should not use -export_dynamic when the
linker does not support it
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: jeremyhu at apple.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Reported in https://trac.macports.org/ticket/53150
If -rdynamic is passed to clang, it will unconditionally pass -export_dynamic
to ld, causing an error in versions that don't support it.
It looks like this was expected to be fixed by r187680, but it seems to be a
problem on all versions I've still got around (3.3 through current trunk):
commit bd77c59acc58e797756b0fcc6739319587e95d85
Author: Bob Wilson <bob.wilson at apple.com>
Date: Fri Aug 2 22:25:34 2013 +0000
Only use the Darwin linker's -export_dynamic option with supported
versions.
Related to <rdar://problem/14578094>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187680
91177308-0d34-0410-b5e6-96231b3b80d8
---
$ clang-mp-devel -c true.c && clang-mp-devel -rdynamic true.o -v
clang version 4.0.0 (trunk 290074)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-devel/bin
"/opt/local/libexec/llvm-devel/bin/ld" -demangle -export_dynamic -lto_library
/opt/local/libexec/llvm-devel/lib/libLTO.dylib -dynamic -arch x86_64
-macosx_version_min 10.9.0 -o a.out true.o -lSystem
/opt/local/libexec/llvm-devel/bin/../lib/clang/4.0.0/lib/darwin/libclang_rt.osx.a
ld: unknown option: -export_dynamic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ /opt/local/libexec/llvm-devel/bin/ld -v
@(#)PROGRAM:ld PROJECT:ld64-136
configured to support archs: i386 x86_64 armv7 armv7s
LTO support using: LLVM version 4.0.0svn
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161225/3fa886fe/attachment.html>
More information about the llvm-bugs
mailing list