[commit: ghc] ghc-8.0: build system: Include CONF_LD_LINKER_OPTS in ALL_LD_OPTS (7bd5dd0)
git at git.haskell.org
git at git.haskell.org
Thu Nov 10 21:42:44 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/7bd5dd093120cc4a1952a85e665fd68377c5c80c/ghc
>---------------------------------------------------------------
commit 7bd5dd093120cc4a1952a85e665fd68377c5c80c
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Nov 4 15:03:44 2016 -0400
build system: Include CONF_LD_LINKER_OPTS in ALL_LD_OPTS
This ensures that artifacts built with build-prog see these options.
Also spruce up comments.
Test Plan: Carefully read it.
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2673
(cherry picked from commit e2a9b529a8b06e2dace8c2b4c58710cf5e57ef03)
>---------------------------------------------------------------
7bd5dd093120cc4a1952a85e665fd68377c5c80c
configure.ac | 5 +++++
rules/distdir-way-opts.mk | 12 +++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 13d33d2..8259f0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -665,15 +665,20 @@ FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_GCC_LINKER_OPTS_STAG
FP_GCC_EXTRA_FLAGS
+# See rules/distdir-way-opts.mk for details.
+# Flags passed to the C compiler
AC_SUBST(CONF_CC_OPTS_STAGE0)
AC_SUBST(CONF_CC_OPTS_STAGE1)
AC_SUBST(CONF_CC_OPTS_STAGE2)
+# Flags passed to the C compiler when we ask it to link
AC_SUBST(CONF_GCC_LINKER_OPTS_STAGE0)
AC_SUBST(CONF_GCC_LINKER_OPTS_STAGE1)
AC_SUBST(CONF_GCC_LINKER_OPTS_STAGE2)
+# Flags passed to the linker when we ask it to link
AC_SUBST(CONF_LD_LINKER_OPTS_STAGE0)
AC_SUBST(CONF_LD_LINKER_OPTS_STAGE1)
AC_SUBST(CONF_LD_LINKER_OPTS_STAGE2)
+# Flags passed to the C preprocessor
AC_SUBST(CONF_CPP_OPTS_STAGE0)
AC_SUBST(CONF_CPP_OPTS_STAGE1)
AC_SUBST(CONF_CPP_OPTS_STAGE2)
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index f099d4e..4ebbc0e 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -34,9 +34,18 @@ define distdir-way-opts # args: $1 = dir, $2 = distdir, $3 = way, $4 = stage
#
# CONF_HC_OPTS GHC options from ./configure mk/config.mk.in
#
+# CONF_CPP_OPTS_STAGE$4 CPP options from ./configure mk/config.mk.in
+#
+# CONF_CC_OPTS_STAGE$4 C compiler options from mk/config.mk.in
+# ./configure
+#
# CONF_HC_OPTS_STAGE$4 GHC options from ./configure mk/config.mk.in
# specific to stage $4
#
+# CONF_LD_LINKER_OPTS_STAGE$4
+# GHC options from ./configure mk/config.mk.in
+# specific to stage $4
+#
# WAY_$3_HC_OPTS GHC options specific to way $3 mk/ways.mk
#
# SRC_HC_OPTS source-tree-wide GHC options mk/config.mk.in
@@ -186,7 +195,8 @@ $1_$2_$3_ALL_LD_OPTS = \
$$($1_$2_DIST_LD_OPTS) \
$$($1_$2_$3_LD_OPTS) \
$$($1_$2_EXTRA_LD_OPTS) \
- $$(EXTRA_LD_OPTS)
+ $$(EXTRA_LD_OPTS) \
+ $$(CONF_LD_LINKER_OPTS_STAGE$4)
# Options for passing to GHC when we use it for linking
$1_$2_$3_GHC_LD_OPTS = \
More information about the ghc-commits
mailing list