[commit: ghc] master: Follow build system changes in integer-gmp (aa06f5d)
Ian Lynagh
igloo at earth.li
Sat Apr 20 19:30:49 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/aa06f5d7a0821d5118a594b448d364b77df4985f
>---------------------------------------------------------------
commit aa06f5d7a0821d5118a594b448d364b77df4985f
Author: Ian Lynagh <ian at well-typed.com>
Date: Sat Apr 20 14:17:00 2013 +0100
Follow build system changes in integer-gmp
Also a couple of other fixes and sanity checks along the way.
>---------------------------------------------------------------
ghc.mk | 2 ++
rts/ghc.mk | 2 +-
rules/build-prog.mk | 6 ++++--
rules/distdir-opts.mk | 4 ++++
rules/distdir-way-opts.mk | 2 ++
5 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/ghc.mk b/ghc.mk
index 43e55f3..d873070 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -614,8 +614,10 @@ endif
ifeq "$(INTEGER_LIBRARY)" "integer-gmp"
BUILD_DIRS += libraries/integer-gmp/gmp
+BUILD_DIRS += libraries/integer-gmp/mkGmpDerivedConstants
else ifneq "$(findstring clean,$(MAKECMDGOALS))" ""
BUILD_DIRS += libraries/integer-gmp/gmp
+BUILD_DIRS += libraries/integer-gmp/mkGmpDerivedConstants
endif
ifeq "$(CrossCompiling)-$(phase)" "YES-final"
diff --git a/rts/ghc.mk b/rts/ghc.mk
index b7651b0..b3b51a6 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -220,7 +220,7 @@ endef
# And expand the above for each way:
$(foreach way,$(rts_WAYS),$(eval $(call build-rts-way,$(way))))
-$(eval $(call distdir-opts,rts,dist))
+$(eval $(call distdir-opts,rts,dist,1))
#-----------------------------------------------------------------------------
# Flags for compiling every file
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 468fcaf..b788bc1 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -152,7 +152,7 @@ $(call c-sources,$1,$2)
# --- IMPLICIT RULES
-$(call distdir-opts,$1,$2,,$3)
+$(call distdir-opts,$1,$2,$3)
$(call distdir-way-opts,$1,$2,$$($1_$2_PROGRAM_WAY),$3)
ifeq "$3" "0"
@@ -209,7 +209,9 @@ ifeq "$$(TargetOS_CPP)" "darwin"
ifneq "$3" "0"
ifeq "$$($1_$2_PROGRAM_WAY)" "dyn"
# Use relative paths for all the libraries
+ifneq "$$($1_$2_TRANSITIVE_DEP_NAMES)" ""
install_name_tool $$(foreach d,$$($1_$2_TRANSITIVE_DEP_NAMES), -change $$(TOP)/$$($$($$d_INSTALL_INFO)_dyn_LIB) @loader_path/../$$d-$$($$($$d_INSTALL_INFO)_VERSION)/$$($$($$d_INSTALL_INFO)_dyn_LIB_NAME)) $$@
+endif
# Use relative paths for the RTS. Rather than try to work out which RTS
# way is being linked, we just change it for all ways
install_name_tool $$(foreach w,$$(rts_WAYS), -change $$(TOP)/$$(rts_$$w_LIB) @loader_path/../rts-$$(rts_VERSION)/$$(rts_$$w_LIB_NAME)) $$@
@@ -232,11 +234,11 @@ ifneq "$$($1_$2_HS_SRCS)" ""
ifeq "$$(strip $$(ALL_STAGE1_LIBS))" ""
$$(error ordering failure in $1 ($2): ALL_STAGE1_LIBS is empty)
endif
-endif
$1/$2/build/tmp/$$($1_$2_PROG) : $$(ALL_STAGE1_LIBS) $$(ALL_RTS_LIBS) $$(OTHER_LIBS)
endif
endif
endif
+endif
ifneq "$$($1_$2_INSTALL_INPLACE)" "NO"
$(call all-target,$1_$2,$$($1_$2_INPLACE))
diff --git a/rules/distdir-opts.mk b/rules/distdir-opts.mk
index fd415b6..0009f85 100644
--- a/rules/distdir-opts.mk
+++ b/rules/distdir-opts.mk
@@ -15,6 +15,10 @@
define distdir-opts # args: $1 = dir, $2 = distdir, $3 = stage
+ifeq "$3" ""
+$$(error Stage not given for distdir-opts $1 $2)
+endif
+
ifeq "$3" "0"
# This is a bit of a hack.
# If we are compiling something with the bootstrapping compiler on
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 872e527..8d2649f 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -140,6 +140,7 @@ $1_$2_$3_ALL_CC_OPTS = \
$$($1_$2_DIST_GCC_CC_OPTS) \
$$($1_$2_$3_CC_OPTS) \
$$($$(basename $$<)_CC_OPTS) \
+ $$($1_$2_EXTRA_CC_OPTS) \
$$(EXTRA_CC_OPTS)
$1_$2_$3_GHC_CC_OPTS = \
@@ -148,6 +149,7 @@ $1_$2_$3_GHC_CC_OPTS = \
$$($1_$2_DIST_CC_OPTS) \
$$($1_$2_$3_CC_OPTS) \
$$($$(basename $$<)_CC_OPTS) \
+ $$($1_$2_EXTRA_CC_OPTS) \
$$(EXTRA_CC_OPTS)) \
$$($1_$2_$3_MOST_HC_OPTS)
More information about the ghc-commits
mailing list