-
Notifications
You must be signed in to change notification settings - Fork 710
Avoid compiling setup executable when cross-compiling #2085
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems currently cabal cannot know whether it cross-compiles or not, i.e. you can pass
--with-ghc
,--with-gcc
,--with-ld
etc flags pointing to cross-compiler and other tools but there's no way to tell cabal to not try building setup executable with these tools.When
build-type
of a package isSimple
the cabal can avoid creating setup executable and is able to cross-compile a package. But whenbuild-type
isCustom
, or when, for some other reason which I haven't figured out, cabal decides to build setup executable it uses cross-compiler and executable generally cannot be runned on the platform you're compiling. And so the cross-compilation process fails even when it could be successfully finished by using/usr/bin/runghc Setup.hs
(presuming that runghc is the native interpreter for the platform you`re building on).Given the need to support
Custom
build types I'd like to suggest to add an option to cabal to compile Setup.hs files with user-supplied ghc or to run them with user-supplied runghc rather than compiling them with compiler from--with-ghc
.Or maybe I missed something obvious and someone can point it out.
The text was updated successfully, but these errors were encountered: