configure: Pass HC_OPTS_STAGEx to build system
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 4 Nov 2016 19:03:55 +0000 (15:03 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 10 Nov 2016 18:16:03 +0000 (13:16 -0500)
Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail

Reviewers: austin, hvr

Subscribers: thomie, erikd

Differential Revision: https://phabricator.haskell.org/D2674

configure.ac
mk/config.mk.in

index 9b0b549..70c4447 100644 (file)
@@ -643,6 +643,10 @@ AC_SUBST(CONF_LD_LINKER_OPTS_STAGE2)
 AC_SUBST(CONF_CPP_OPTS_STAGE0)
 AC_SUBST(CONF_CPP_OPTS_STAGE1)
 AC_SUBST(CONF_CPP_OPTS_STAGE2)
+# Flags passed to the Haskell compiler
+AC_SUBST(CONF_HC_OPTS_STAGE0)
+AC_SUBST(CONF_HC_OPTS_STAGE1)
+AC_SUBST(CONF_HC_OPTS_STAGE2)
 
 dnl ** Set up the variables for the platform in the settings file.
 dnl May need to use gcc to find platform details.
index 2163643..35c492f 100644 (file)
@@ -618,6 +618,9 @@ CONF_LD_LINKER_OPTS_STAGE2 = @CONF_LD_LINKER_OPTS_STAGE2@
 CONF_CPP_OPTS_STAGE0 = @CONF_CPP_OPTS_STAGE0@
 CONF_CPP_OPTS_STAGE1 = @CONF_CPP_OPTS_STAGE1@
 CONF_CPP_OPTS_STAGE2 = @CONF_CPP_OPTS_STAGE2@
+CONF_HC_OPTS_STAGE0 = @CONF_HC_OPTS_STAGE0@
+CONF_HC_OPTS_STAGE1 = @CONF_HC_OPTS_STAGE1@
+CONF_HC_OPTS_STAGE2 = @CONF_HC_OPTS_STAGE2@
 
 # The .hsc files aren't currently safe for cross-compilation on Windows:
 #     libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160