From: Manuel M T Chakravarty Date: Mon, 26 May 2008 07:35:46 +0000 (+0000) Subject: Fix fwrite$UNIX2003 symbols when cross-compiling for Tiger X-Git-Tag: 2008-05-28~2 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9f592bb0ae0dc76bd3ec7729474057d2069bb4db;hp=92049cd60bd98e7803ea5c46150d80376d296557 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). --- diff --git a/mk/config.mk.in b/mk/config.mk.in index 14fd667..1279523 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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 ################################################################################