New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvmPackages_6.compiler-rt: Backport cross-compilation fixes... #61500
llvmPackages_6.compiler-rt: Backport cross-compilation fixes... #61500
Conversation
…mPackages_7.compiler-rt
@@ -0,0 +1,595 @@ | |||
Get crtbegin and crtend without compiler GCC! PR is at https://reviews.llvm.org/D28791 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone noticed this:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190513/652039.html
We probably want to wait for that to be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think we can use fetchpatch here as well IIRC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch in question is already being applied to LLVM 7 to make cross-compilation work, I merely backported it to 6 (I'm doing Haskell cross-compilation and GHC 8.6.4 needs LLVM 6.) Perhaps since this is already in place for LLVM 7 it could just be merged for LLVM 6 and then all the LLVMs could be updated with the resolution to the above thread?
Also, I'm cross-compiling to ARM and have not encountered the mentioned issue with the patched LLVM v6 in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need clang for GHC cross compilation. LLVM should just work on its own. Are you on nixpkgs-unstable or 19.03?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using unstable, but I'm using IOHK's haskell nix infrastructure. I'm attempting to use clang as the compiler for c files included with Haskell libraries, trying to work around some issues with iserv and template Haskell during cross-compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, it took longer into the build than I expected, but that error from the mailing list did now show up. So I guess this isn't ready to be merged yet.
…from llvmPackages_7.compiler-rt
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)