[Haskell-iPhone] cabal arch function

Stephen Blackheath [to GHC-iPhone] likeliest.complexions.stephen at blacksapphire.com
Tue Dec 18 20:56:37 CET 2012


Stefan,

The short answer is that there is more work to do on Cabal. I didn't get 
much further than the changes necessary to compile plain Haskell packages.

At the moment I'm putting the priority on getting the stuff that's 
already done integrated into the mainline (ghc in particular). I am 
intending to get to that work soon.


Steve

On 19/12/12 06:03, Stefan Kersten wrote:
> hi again,
>
> i am trying to compile the primitive library, which includes the following in its cabal file:
>
>    if arch(i386) || arch(x86_64) {
>      cc-options: -msse2
>    }
>
> during configuration the arm cross compiler (rightly) complains about the unsupported -msse2 option (see below). but why is that option even added to cc-options? shouldn't arch be arm or something similar when cross-compiling?
>
> the cabal docs are saying:
>
> "arch(name)
> Tests if the current architecture is name. The argument is matched against System.Info.arch on the target system. If the arch names match, this test evaluates to true, otherwise false. The match is case-insensitive."
>
> any help appreciated!
>
> thanks,
> <sk>
>
> runOutput /Users/skersten/dev/samplecount/ghc-ios/bin/arm-apple-darwin10-gcc ["-fno-stack-protector","-isysroot","/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk","-march=armv7","-mcpu=cortex-a8","-mfpu=neon","-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/","/var/folders/O8/O8mOkxWPErOOmiDsQeAl2E+++TI/-Tmp-/92247.c","-o","/var/folders/O8/O8mOkxWPErOOmiDsQeAl2E+++TI/-Tmp-/92247","-D__GLASGOW_HASKELL__=705","-Ddarwin_HOST_OS=1","-Dx86_64_HOST_ARCH=1","-Idist/build/autogen","-Icbits","-I.","-msse2","-O3","-ftree-vectorize","-fomit-frame-pointer","-I/usr/local/ghc-iphone//lib/ghc-7.5.20121127/base-4.5.0.0/include","-I/usr/local/ghc-iphone//lib/ghc-7.5.20121127/include","-msse2","-O3","-ftree-vectorize","-fomit-frame-pointer","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/base-4.5.0.0","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/integer-simple-0.1.0.0","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/ghc-prim-0.2.0.0","-L/usr/local
/ghc-iphone//lib/ghc-7.5.20121127"]
> ("/Users/skersten/dev/samplecount/ghc-ios/bin/arm-apple-darwin10-gcc",["-fno-stack-protector","-isysroot","/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk","-march=armv7","-mcpu=cortex-a8","-mfpu=neon","-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/","/var/folders/O8/O8mOkxWPErOOmiDsQeAl2E+++TI/-Tmp-/92247.c","-o","/var/folders/O8/O8mOkxWPErOOmiDsQeAl2E+++TI/-Tmp-/92247","-D__GLASGOW_HASKELL__=705","-Ddarwin_HOST_OS=1","-Dx86_64_HOST_ARCH=1","-Idist/build/autogen","-Icbits","-I.","-msse2","-O3","-ftree-vectorize","-fomit-frame-pointer","-I/usr/local/ghc-iphone//lib/ghc-7.5.20121127/base-4.5.0.0/include","-I/usr/local/ghc-iphone//lib/ghc-7.5.20121127/include","-msse2","-O3","-ftree-vectorize","-fomit-frame-pointer","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/base-4.5.0.0","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/integer-simple-0.1.0.0","-L/usr/local/ghc-iphone//lib/ghc-7.5.20121127/ghc-prim-0.2.0.0","-L/usr/local/ghc-ip
hone//lib/ghc-7.5.20121127"])
> /Users/skersten/dev/samplecount/ghc-ios/bin/arm-apple-darwin10-gcc returned
> ExitFailure 1 with error message:
> cc1: error: unrecognized command line option "-msse2"
> cc1: error: unrecognized command line option "-msse2"
> program: int main(int argc, char** argv) { return 0; }
>
>
> _______________________________________________
> iPhone mailing list
> iPhone at haskell.org
> http://www.haskell.org/mailman/listinfo/iphone
>



More information about the iPhone mailing list