 
            Hey, I am working on getting ghc to cross compile to android. When trying to get haskeline to compile. I want to change the cabal file such that it sets a flag when compiling for android. For that I changed cabal so that it recognizes android as a OS. But cabal seems to get its os information from System.Info.os, and from what I can tell this always returns the host os and not the target os. Am I getting this right, is cabal unaware of the target os? How can we change this? Regards, Nathan
 
            On 23 January 2013 05:41, Nathan Hüsken 
Hey,
I am working on getting ghc to cross compile to android.
When trying to get haskeline to compile. I want to change the cabal file such that it sets a flag when compiling for android.
For that I changed cabal so that it recognizes android as a OS. But cabal seems to get its os information from System.Info.os, and from what I can tell this always returns the host os and not the target os.
Am I getting this right, is cabal unaware of the target os? How can we change this?
That's right, currently Cabal only knows about the host OS & arch not the target. Adding proper cross compilation awareness and support into Cabal will require some hacking in the Cabal library, (to pass in the target platform, toolchain etc) Duncan
 
            Somebody claiming to be Nathan Hüsken wrote:
For that I changed cabal so that it recognizes android as a OS. But cabal seems to get its os information from System.Info.os, and from what I can tell this always returns the host os and not the target os.
https://github.com/haskell/cabal/issues/1184 -- Stephen Paul Weber, @singpolyma See http://singpolyma.net for how I prefer to be contacted edition right joseph
participants (3)
- 
                 Duncan Coutts Duncan Coutts
- 
                 Nathan Hüsken Nathan Hüsken
- 
                 Stephen Paul Weber Stephen Paul Weber