Skip to content

Commit

Permalink
Fix fwrite$UNIX2003 symbols when cross-compiling for Tiger
Browse files Browse the repository at this point in the history
- 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).
  • Loading branch information
mchakravarty committed May 26, 2008
1 parent 92049cd commit 9f592bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mk/config.mk.in
Expand Up @@ -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

################################################################################
Expand Down

0 comments on commit 9f592bb

Please sign in to comment.