summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-03-23 15:53:06 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-17 00:25:02 -0400
commitfb579e15c56994bc6c4cc266535024f20a81f830 (patch)
treecceee15e84d67bdbbe6eced0a4e89449a416bcc4 /m4
parent8dfea0789957278b99bf302dfb24078fff84b6d2 (diff)
downloadhaskell-fb579e15c56994bc6c4cc266535024f20a81f830.tar.gz
driver: Introduce pgmcxx
Here we introduce proper support for compilation of C++ objects. This includes: * logic in `configure` to detect the C++ toolchain and propagating this information into the `settings` file * logic in the driver to use the C++ toolchain when compiling C++ sources
Diffstat (limited to 'm4')
-rw-r--r--m4/fp_settings.m43
-rw-r--r--m4/fp_setup_windows_toolchain.m41
2 files changed, 4 insertions, 0 deletions
diff --git a/m4/fp_settings.m4 b/m4/fp_settings.m4
index dbacd3a816..0b75cf8d35 100644
--- a/m4/fp_settings.m4
+++ b/m4/fp_settings.m4
@@ -11,6 +11,7 @@ AC_DEFUN([FP_SETTINGS],
mingw_bin_prefix='$$tooldir/mingw/bin/'
SettingsCCompilerCommand="${mingw_bin_prefix}clang.exe"
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
+ SettingsCxxCompilerCommand="${mingw_bin_prefix}clang++.exe"
SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2"
SettingsCCompilerLinkFlags="$CONF_GCC_LINKER_OPTS_STAGE2"
SettingsHaskellCPPCommand="${mingw_bin_prefix}clang.exe"
@@ -32,6 +33,7 @@ AC_DEFUN([FP_SETTINGS],
SettingsCCompilerCommand="$CC"
SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
+ SettingsCxxCompilerCommand="$CXX"
SettingsCxxCompilerFlags="$CONF_CXX_OPTS_STAGE2"
SettingsHaskellCPPCommand="$HaskellCPPCmd"
SettingsHaskellCPPFlags="$HaskellCPPArgs"
@@ -104,6 +106,7 @@ AC_DEFUN([FP_SETTINGS],
SettingsCCompilerSupportsNoPie="$CONF_GCC_SUPPORTS_NO_PIE"
AC_SUBST(SettingsCCompilerCommand)
+ AC_SUBST(SettingsCxxCompilerCommand)
AC_SUBST(SettingsHaskellCPPCommand)
AC_SUBST(SettingsHaskellCPPFlags)
AC_SUBST(SettingsCCompilerFlags)
diff --git a/m4/fp_setup_windows_toolchain.m4 b/m4/fp_setup_windows_toolchain.m4
index 35e322c8a0..79a6ac6531 100644
--- a/m4/fp_setup_windows_toolchain.m4
+++ b/m4/fp_setup_windows_toolchain.m4
@@ -80,6 +80,7 @@ AC_DEFUN([FP_SETUP_WINDOWS_TOOLCHAIN],[
mingwbin="$hardtop/inplace/mingw/bin/"
CC="${mingwbin}clang.exe"
+ CXX="${mingwbin}clang++.exe"
cflags="--rtlib=compiler-rt"
CFLAGS="$cflags"
CONF_CC_OPTS_STAGE1="$cflags"