mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-26 09:06:38 +12:00
* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
system compiler is installed. If not, do not run set_cc_for_build, as the default cc will open a dialog box asking to install Xcode. If no C compiler is available, guess based on uname -p and uname -m.
This commit is contained in:
parent
104ee6463c
commit
3f4274dfc2
@ -1,3 +1,11 @@
|
|||||||
|
2019-05-28 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
|
* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
|
||||||
|
system compiler is installed. If not, do not run set_cc_for_build,
|
||||||
|
as the default cc will open a dialog box asking to install
|
||||||
|
Xcode. If no C compiler is available, guess based on uname -p and
|
||||||
|
uname -m.
|
||||||
|
|
||||||
2019-05-28 Ben Elliston <bje@gnu.org>
|
2019-05-28 Ben Elliston <bje@gnu.org>
|
||||||
|
|
||||||
* testsuite/config-guess.data: Add Darwin tests.
|
* testsuite/config-guess.data: Add Darwin tests.
|
||||||
|
53
config.guess
vendored
53
config.guess
vendored
@ -1325,38 +1325,39 @@ EOF
|
|||||||
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Darwin:*:*)
|
*:Darwin:*:*)
|
||||||
set_cc_for_build
|
|
||||||
UNAME_PROCESSOR=`uname -p`
|
UNAME_PROCESSOR=`uname -p`
|
||||||
case $UNAME_PROCESSOR in
|
case $UNAME_PROCESSOR in
|
||||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||||
esac
|
esac
|
||||||
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
|
if command -v xcode-select > /dev/null 2> /dev/null && \
|
||||||
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
! xcode-select --print-path > /dev/null 2> /dev/null ; then
|
||||||
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
# Avoid executing cc if there is no toolchain installed as
|
||||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
# cc will be a stub that puts up a graphical alert
|
||||||
grep IS_64BIT_ARCH >/dev/null
|
# prompting the user to install developer tools.
|
||||||
then
|
CC_FOR_BUILD=no_compiler_found
|
||||||
case $UNAME_PROCESSOR in
|
else
|
||||||
i386) UNAME_PROCESSOR=x86_64 ;;
|
set_cc_for_build
|
||||||
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
fi
|
||||||
esac
|
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
|
||||||
fi
|
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||||
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
grep IS_64BIT_ARCH >/dev/null
|
||||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
then
|
||||||
grep IS_PPC >/dev/null
|
case $UNAME_PROCESSOR in
|
||||||
then
|
i386) UNAME_PROCESSOR=x86_64 ;;
|
||||||
UNAME_PROCESSOR=powerpc
|
powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
||||||
fi
|
esac
|
||||||
|
fi
|
||||||
|
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
|
||||||
|
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
|
||||||
|
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||||
|
grep IS_PPC >/dev/null
|
||||||
|
then
|
||||||
|
UNAME_PROCESSOR=powerpc
|
||||||
fi
|
fi
|
||||||
elif test "$UNAME_PROCESSOR" = i386 ; then
|
elif test "$UNAME_PROCESSOR" = i386 ; then
|
||||||
# Avoid executing cc on OS X 10.9, as it ships with a stub
|
# uname -m returns i386 or x86_64
|
||||||
# that puts up a graphical alert prompting to install
|
UNAME_PROCESSOR=$UNAME_MACHINE
|
||||||
# developer tools. Any system running Mac OS X 10.7 or
|
|
||||||
# later (Darwin 11 and later) is required to have a 64-bit
|
|
||||||
# processor. This is not true of the ARM version of Darwin
|
|
||||||
# that Apple uses in portable devices.
|
|
||||||
UNAME_PROCESSOR=x86_64
|
|
||||||
fi
|
fi
|
||||||
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
|
||||||
exit ;;
|
exit ;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user