diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-10-05 10:34:42 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-10-08 09:06:24 +0100 |
commit | e1846d7f49d55e300a6cb63aa26a3bfcbba9dd6e (patch) | |
tree | 1fa12079d684335392114cbe38c3af7a42fe46ac /rules | |
parent | 6e95114e65ffadacc40e97a64467350c5c9d5af2 (diff) | |
download | haskell-e1846d7f49d55e300a6cb63aa26a3bfcbba9dd6e.tar.gz |
Fix a dependency bug in the build system
I've been meaning to track this one down for a long time.
Occasionally a build will fail with an error about a .so library being
truncated; the reason was that we weren't tracking the dependencies of
the GHC stage2 .so library correctly.
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-package-way.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk index 18ac917099..a4b604fe24 100644 --- a/rules/build-package-way.mk +++ b/rules/build-package-way.mk @@ -28,6 +28,7 @@ $(call hs-objs,$1,$2,$3) $1_$2_$3_LIB = $1/$2/build/libHS$$($1_PACKAGE)-$$($1_$2_VERSION)$$($3_libsuf) $$($1_PACKAGE)-$($1_$2_VERSION)_$2_$3_LIB = $$($1_$2_$3_LIB) +# Note [inconsistent distdirs] # hack: the DEPS_LIBS mechanism assumes that the distdirs for packages # that depend on each other are the same, but that is not the case for # ghc where we use stage1/stage2 rather than dist/dist-install. @@ -37,8 +38,11 @@ ifeq "$$($1_PACKAGE) $2" "ghc stage2" $$($1_PACKAGE)-$($1_$2_VERSION)_dist-install_$3_LIB = $$($1_$2_$3_LIB) endif -# All the .a/.so library file dependencies for this library -$1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEPS),$$($$(dep)_$2_$3_LIB)) +# All the .a/.so library file dependencies for this library. +# +# The $(subst stage2,dist-install,..) is needed due to Note +# [inconsistent distdirs]. +$1_$2_$3_DEPS_LIBS=$$(foreach dep,$$($1_$2_DEPS),$$($$(dep)_$(subst stage2,dist-install,$2)_$3_LIB)) ifeq "$$(BootingFromHc)" "YES" $1_$2_$3_C_OBJS += $$(shell $$(FIND) $1/$2/build -name "*_stub.c" -print | sed 's/c$$$$/o/') |