Issue |
102777
|
Summary |
Behavior of -rpath under llvm-mingw does not match gcc-mingw
|
Labels |
|
Assignees |
|
Reporter |
tomager
|
The behavior of -rpath under llvm-mingw is different than in gcc-mingw. Please see mstorsjo/llvm-mingw#300 for more information. Briefly summarized here:
Here is the output of gcc-mingw (toolchain generated from crosstool-ng) compiling the simple program [1] with -rpath option:
```
# /xgcc-x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ test.cc -Wl,-rpath,anything
<no error>
```
And here is the llvm-mingw toolchain failing on the same inputs:
```
# /xllvm-x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ test.cc -Wl,-rpath,anything
lld: error: unknown argument: -rpath
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
It would be nice if lld behaved the same as gcc-mingw, to lower friction when porting mingw packages to clang/llvm.
Would there be objections to a patch that causes -rpath to be silently ignored?
[1]
```
#include <iostream>
int main(int argc, const char** argv) {
std::cout<<"hello world!"<<std::endl;
*(volatile int*)0 = 0;
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs