projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d42eeec
)
Set C compiler and linker flags correctly for OS X 64
author
Ian Lynagh
<igloo@earth.li>
Thu, 21 May 2009 12:44:59 +0000
(12:44 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Thu, 21 May 2009 12:44:59 +0000
(12:44 +0000)
configure.ac
patch
|
blob
|
history
mk/config.mk.in
patch
|
blob
|
history
diff --git
a/configure.ac
b/configure.ac
index
eb63052
..
085dd35
100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-371,7
+371,10
@@
x86_64-apple-darwin*)
HostArch_CPP='x86_64'
HostVendor_CPP='apple'
HostOS_CPP='darwin'
HostArch_CPP='x86_64'
HostVendor_CPP='apple'
HostOS_CPP='darwin'
- soext='.dylib'
+ soext='.dylib'
+ # By default, gcc makes 32bit executables on OS X
+ CFLAGS="$CFLAGS -m64"
+ LDFLAGS="$LDFLAGS -m64"
;;
m68k-*-linux*)
HostPlatform=m68k-unknown-linux # hack again
;;
m68k-*-linux*)
HostPlatform=m68k-unknown-linux # hack again
@@
-948,7
+951,11
@@
AC_PROG_CPP
dnl ** Without optimization some INLINE trickery fails for GHCi
SRC_CC_OPTS="-O"
dnl ** Without optimization some INLINE trickery fails for GHCi
SRC_CC_OPTS="-O"
+SRC_CC_OPTS="$SRC_CC_OPTS $CFLAGS"
+SRC_LD_OPTS="$SRC_LD_OPTS $LDFLAGS"
+
AC_SUBST(SRC_CC_OPTS)
AC_SUBST(SRC_CC_OPTS)
+AC_SUBST(SRC_LD_OPTS)
dnl ** figure out how to do context diffs
FP_PROG_CONTEXT_DIFF
dnl ** figure out how to do context diffs
FP_PROG_CONTEXT_DIFF
diff --git
a/mk/config.mk.in
b/mk/config.mk.in
index
4fac281
..
71f6e17
100644
(file)
--- a/
mk/config.mk.in
+++ b/
mk/config.mk.in
@@
-687,8
+687,9
@@
else
endif
endif
endif
endif
-# default C compiler flags
+# default C compiler and linker flags
SRC_CC_OPTS = @SRC_CC_OPTS@
SRC_CC_OPTS = @SRC_CC_OPTS@
+SRC_LD_OPTS = @SRC_LD_OPTS@
ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
SRC_CC_OPTS += -G0
ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
SRC_CC_OPTS += -G0