summaryrefslogtreecommitdiff
path: root/bootstrap/bootstrap
diff options
context:
space:
mode:
authorschmonz <schmonz>2014-07-30 16:30:26 +0000
committerschmonz <schmonz>2014-07-30 16:30:26 +0000
commit22684d77b8847f3e75b275413ba0c9752b73bc7e (patch)
tree0cc88593d9eb1d2cbe8be8db0a5dc950ec3be037 /bootstrap/bootstrap
parentbe11c8b39880e32a313e244b9e636102b65f62f9 (diff)
downloadpkgsrc-22684d77b8847f3e75b275413ba0c9752b73bc7e.tar.gz
Detecting clang on OS X is stymied in some configurations by "gcc"
looking sufficiently like gcc. Inspect "cc" instead, and don't believe it's __GNUC__ unless it's also not __clang__. While here, if you manage to find and install PackageMaker.app, it still works on 10.9 for --binary-macpkg. From Sevan Janiyan.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-xbootstrap/bootstrap8
1 files changed, 5 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index c1fd83e25d3..13de89f0c12 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.209 2014/07/11 17:29:21 jperkin Exp $
+# $NetBSD: bootstrap,v 1.210 2014/07/30 16:30:26 schmonz Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@@ -159,8 +159,10 @@ EOF
cat >${wrkdir}/$$.c <<EOF
#ifdef __GNUC__
+#ifndef __clang__
indeed
#endif
+#endif
EOF
compiler_is_gnu=`${testcc:-cc} -E ${wrkdir}/$$.c 2>/dev/null | grep -c indeed`
rm -f ${wrkdir}/$$.c
@@ -519,12 +521,12 @@ Darwin)
need_sed=no
set_opsys=no
machine_arch=`uname -p`
- CC=${CC:-"gcc -isystem /usr/include"}; export CC
+ CC=${CC:-"cc -isystem /usr/include"}; export CC
check_compiler=yes
osrev=`uname -r`
macosx_version=`echo $osrev | awk -F . '{ print "10."$1-4; }'`
case "$macosx_version" in
- 10.[7-8])
+ 10.[7-9])
packagemaker=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
;;
10.[0-4])