Pass -m32 to gcc on i386 and ppc OS X
authorIan Lynagh <igloo@earth.li>
Sat, 8 Aug 2009 22:25:37 +0000 (22:25 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 8 Aug 2009 22:25:37 +0000 (22:25 +0000)
This makes GHC work even if you are actually running it in 64bit mode,
e.g. on OS X 10.6 Snow.

configure.ac

index 31baed2..dcea6e1 100644 (file)
@@ -242,6 +242,10 @@ case $host in
     ;;
 i386-apple-darwin|powerpc-apple-darwin)
     soext='.dylib'
+    CFLAGS="$CFLAGS -m32"
+    LDFLAGS="$LDFLAGS -m32"
+    SRC_CC_OPTS="$SRC_CC_OPTS -m32"
+    SRC_LD_OPTS="$SRC_LD_OPTS -m32"
     ;;
 x86_64-apple-darwin)
     soext='.dylib'