diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-04-20 14:17:00 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-04-20 17:09:00 +0100 |
commit | aa06f5d7a0821d5118a594b448d364b77df4985f (patch) | |
tree | 0e716be82526f8e7d3ed2c101352d409c8ef07a1 | |
parent | 9e4e2c24d1895ae81c92e4432b91026505827c96 (diff) | |
download | haskell-aa06f5d7a0821d5118a594b448d364b77df4985f.tar.gz |
Follow build system changes in integer-gmp
Also a couple of other fixes and sanity checks along the way.
-rw-r--r-- | ghc.mk | 2 | ||||
-rw-r--r-- | rts/ghc.mk | 2 | ||||
-rw-r--r-- | rules/build-prog.mk | 6 | ||||
-rw-r--r-- | rules/distdir-opts.mk | 4 | ||||
-rw-r--r-- | rules/distdir-way-opts.mk | 2 |
5 files changed, 13 insertions, 3 deletions
@@ -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 b7651b09cf..b3b51a6d23 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 468fcafc45..b788bc15b4 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 fd415b64db..0009f8582a 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 872e52741e..8d2649f074 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) |