Skip to content
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

Conversation

eamsden
Copy link
Contributor

@eamsden eamsden commented May 14, 2019

…from llvmPackages_7.compiler-rt

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -0,0 +1,595 @@
Get crtbegin and crtend without compiler GCC! PR is at https://reviews.llvm.org/D28791
Copy link
Member

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.

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@matthewbauer matthewbauer added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Aug 28, 2019
@eamsden eamsden closed this Mar 6, 2020
@eamsden eamsden deleted the eamsden/backport_llvm_7_crosscompile_to_6 branch March 6, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 101-500 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants