[commit: ghc] master: Revert "Build system: don't add ALL_HC_OPTS when linking" (a051788)

git at git.haskell.org git at git.haskell.org
Thu Oct 29 11:24:31 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a0517889383127848faf82b32919d3f742a59278/ghc

>---------------------------------------------------------------

commit a0517889383127848faf82b32919d3f742a59278
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Oct 29 06:45:45 2015 -0400

    Revert "Build system: don't add ALL_HC_OPTS when linking"
    
    This reverts commit 9fc2d777f53110040f48ab27643a16888fa377f5.
    
    This appears to cause interface file issues during rebuilds. Punting
    back to @thomie for further investigation.


>---------------------------------------------------------------

a0517889383127848faf82b32919d3f742a59278
 rules/build-package-way.mk | 4 ++--
 rules/build-prog.mk        | 2 +-
 rules/distdir-way-opts.mk  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index 592d3a7..a10e538 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -91,7 +91,7 @@ endif
 
 else # ifneq "$$(HostOS_CPP)" "mingw32"
 $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
-	$$(call cmd,$1_$2_HC) $$($1_$2_$3_GHC_LD_OPTS) $$($1_$2_$3_ALL_OBJS) \
+	$$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_GHC_LD_OPTS) $$($1_$2_$3_ALL_OBJS) \
          -shared -dynamic -dynload deploy \
 	 $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) $$(addprefix -L,$$($1_$2_EXTRA_LIBDIRS)) \
          -no-auto-link-packages \
@@ -170,7 +170,7 @@ endef # build-package-way
 # $5 = object files to link
 # $6 = output filename
 define build-dll
-	$(call cmd,$1_$2_HC) $($1_$2_$3_GHC_LD_OPTS) $4 $5 \
+	$(call cmd,$1_$2_HC) $($1_$2_$3_ALL_HC_OPTS) $($1_$2_$3_GHC_LD_OPTS) $4 $5 \
 	    -shared -dynamic -dynload deploy \
 	    $(addprefix -l,$($1_$2_EXTRA_LIBRARIES)) \
 	    -no-auto-link-packages \
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 48b8aa2..1a49707 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -255,7 +255,7 @@ $1/$2/build/tmp/$$($1_$2_PROG).dll : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$(
 else # $1_$2_PROG_NEEDS_C_WRAPPER=NO
 ifeq "$$($1_$2_LINK_WITH_GCC)" "NO"
 $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
-	$$(call cmd,$1_$2_HC) -o $$@ $$($1_$2_$$($1_$2_PROGRAM_WAY)_GHC_LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES))
+	$$(call cmd,$1_$2_HC) -o $$@ $$($1_$2_$$($1_$2_PROGRAM_WAY)_ALL_HC_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_GHC_LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES))
 
 else
 $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index e848943..920ff07 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -131,7 +131,7 @@ $1_$2_$3_MOST_DIR_HC_OPTS = \
 # that -O0 is effective (see #5484)
 
 # $1_$2_$3_ALL_HC_OPTS: this is all the options we will pass to GHC
-# for a given ($1,$2,$3) when we use it for compiling.
+# for a given ($1,$2,$3).
 $1_$2_$3_ALL_HC_OPTS = \
  -hisuf $$($3_hisuf) -osuf  $$($3_osuf) -hcsuf $$($3_hcsuf) \
  $$($1_$2_$3_MOST_DIR_HC_OPTS) \



More information about the ghc-commits mailing list