adjust configure with --enable-sdk to force gcc 4.0 instead of 4.2

Merge to 5.0.1
(cherry picked from commit 79b782edad)
This commit is contained in:
Matthew Flatt 2010-07-29 07:12:51 -06:00 committed by Eli Barzilay
parent 1b1667800c
commit 2cfa400936
2 changed files with 32 additions and 0 deletions

16
src/configure vendored
View File

@ -5963,6 +5963,22 @@ case $OS in
if test "${enable_sdk}" != "" ; then if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS" PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4" LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CXX}" = "g++" ; then
CXX=g++-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
fi
if test "${CXXCPP}" = "g++ -E" ; then
CXXCPP="g++-4.0 -E"
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS} ${PREFLAGS}"'"'
fi fi
case `$UNAME -m` in case `$UNAME -m` in

View File

@ -660,6 +660,22 @@ case $OS in
if test "${enable_sdk}" != "" ; then if test "${enable_sdk}" != "" ; then
PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS" PREFLAGS="$PREFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4 -DEXTRA_EXCEPTION_STUBS"
LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4" LDFLAGS="$LDFLAGS -isysroot ${enable_sdk} -mmacosx-version-min=10.4"
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CXX}" = "g++" ; then
CXX=g++-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
fi
if test "${CXXCPP}" = "g++ -E" ; then
CXXCPP="g++-4.0 -E"
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
fi
SUB_CONFIGURE_EXTRAS="${SUB_CONFIGURE_EXTRAS} CFLAGS="'"'"${CFLAGS} ${PREFLAGS}"'"'
fi fi
case `$UNAME -m` in case `$UNAME -m` in