Skip to content
Snippets Groups Projects
Commit 9f592bb0 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Fix fwrite$UNIX2003 symbols when cross-compiling for Tiger

- When compiling with -mmacos-deployment-target=10.4, we need 
  --no-builtin-fprintf, as the use of GCC's builtin function 
  optimisation for fprintf together with #include "PosixSource" in the 
  RTS leads to the use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 
  10.5.2).
parent 92049cd6
No related branches found
Tags ghc-darcs-git-switchover
No related merge requests found
......@@ -192,13 +192,18 @@ MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
-isysroot $(MACOSX_DEPLOYMENT_SDK)
-isysroot $(MACOSX_DEPLOYMENT_SDK) \
--no-builtin-fprintf
MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
-Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
# We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
# overwritten in build.mk and (b) we must not use the deployment options in
# stage 1 or we get a linker error if the bootstrap compiler is for a more
# recent OS version.
#
# We need --no-builtin-fprintf, as the use of the builtin function optimisation
# for fprintf together with #include "PosixSource" in the RTS leads to the
# use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
endif
################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment