From c88dc8efc80ab8c19b54dbf624e8fb94f7a7b445 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 16 Jul 2013 06:03:54 -0600 Subject: [PATCH] configure: fix a CC vs. CC_FOR_BUILD mismatch --- racket/src/configure | 3 +++ racket/src/racket/configure.ac | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/racket/src/configure b/racket/src/configure index fd7fc13e17..6694a32823 100755 --- a/racket/src/configure +++ b/racket/src/configure @@ -4199,6 +4199,9 @@ _ACEOF fi SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS} ${PREFLAGS}"'"' need_cc_in_extras=yes + if test "$ORIG_CC_FOR_BUILD" = "" ; then + CC_FOR_BUILD="$CC" + fi fi if test "${enable_sdk6}" != "" ; then diff --git a/racket/src/racket/configure.ac b/racket/src/racket/configure.ac index 9ca90ada31..9ba7325b6e 100644 --- a/racket/src/racket/configure.ac +++ b/racket/src/racket/configure.ac @@ -18,6 +18,12 @@ # Note: we use CPPFLAGS for configure-time testing only because # it used to include C++ flags that we didn't want for Racket. # hence PREFLAGS, which is initialized to the original CPPFLAGS. +# +# CC_FOR_BUILD is used for the Boehm GC build. In contrast to some +# other build processes, CC_FOR_BUILD needs to be consistent with CC +# in terms of its platform selection, and so it receives CFLAGS, +# PREFLAGS, and COMPFLAGS, too. If that doesn't work out, use +# `--enable-sgc', instead. AC_INIT([Racket]) AC_CONFIG_SRCDIR(racket/src/bignum.c) @@ -688,6 +694,9 @@ case "$host_os" in fi SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS} ${PREFLAGS}"'"' need_cc_in_extras=yes + if test "$ORIG_CC_FOR_BUILD" = "" ; then + CC_FOR_BUILD="$CC" + fi fi if test "${enable_sdk6}" != "" ; then