Commit fcc6b1de authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Use idiomatic way to tell Autoconf the c compiler

The non-idiomatic `--with-cc` flag was added via
5c789e42

However, `--with-cc` seems rather fragile and support for `--with-cc` needs
to be added explicitly to autoconf-based Cabal packages. The `CC=` flag, however,
is supported natively by GNU Autoconf, so let's use the standard facility for that.

Relatedly, Cabal prior to version 1.24 used a similiar flag `--with-gcc=...`,
but starting with Cabal-1.24 this has been changed to use `CC=...` instead as well
(see https://github.com/haskell/cabal/pull/2946)

This also updates a few submodules removing the now obsolete `--with-cc` flag
support.

Reviewed By: trofi, thomie, erikd

Differential Revision: https://phabricator.haskell.org/D1608
parent 0bf0cf93
......@@ -10,10 +10,7 @@ AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_ARG_WITH([cc],
[C compiler],
[CC=$withval])
AC_PROG_CC()
AC_PROG_CC
dnl make extensions visible to allow feature-tests to detect them lateron
AC_USE_SYSTEM_EXTENSIONS
......
Subproject commit a7a5b0b738aad432a9cad512a26d7564120ef0e8
Subproject commit 298529bf8adc38ed602eab300c63bbc68510e5a3
......@@ -6,10 +6,7 @@ AC_CONFIG_SRCDIR([cbits/wrappers.c])
AC_CANONICAL_TARGET
AC_ARG_WITH([cc],
[C compiler],
[CC=$withval])
AC_PROG_CC()
AC_PROG_CC
dnl make extensions visible to allow feature-tests to detect them lateron
AC_USE_SYSTEM_EXTENSIONS
......
Subproject commit 0edb97876c2f783b33f9a69089ca9d26a061e112
Subproject commit e594712a8fe49c94ff43ab016739e0fa63f0de00
Subproject commit 147630c7c76bd9b947524ef140d21b9e81967c6e
Subproject commit 59edb0a0a0d91ecfe938029b3b00a0c99dcb8481
......@@ -111,7 +111,7 @@ ifneq "$3" "0"
$1_$2_CONFIGURE_OPTS += --with-ld="$$(LD_STAGE$3)"
endif
$1_$2_CONFIGURE_OPTS += --configure-option=--with-cc="$$(CC_STAGE$3)"
$1_$2_CONFIGURE_OPTS += --configure-option=CC="$$(CC_STAGE$3)"
$1_$2_CONFIGURE_OPTS += --with-ar="$$(AR_STAGE$3)"
$1_$2_CONFIGURE_OPTS += $$(if $$(ALEX),--with-alex="$$(ALEX)")
$1_$2_CONFIGURE_OPTS += $$(if $$(HAPPY),--with-happy="$$(HAPPY)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment