summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-08-02 23:43:47 +0000
committerrillig <rillig@pkgsrc.org>2006-08-02 23:43:47 +0000
commitf63a40d9e42f2de990d9d4c5fa5ae9402d4e6cfa (patch)
treeb89fb546b424ddc2db1553cd1848560a2305dcc9 /bootstrap
parent3ae62b88187d967abf68ad775344f7dd334278f4 (diff)
downloadpkgsrc-f63a40d9e42f2de990d9d4c5fa5ae9402d4e6cfa.tar.gz
Added an option --compiler, which can be used to override the automatic
compiler detection. This is needed for Solaris with SunPro at least, since bootstrap tried to install gcc>=2.95.3 during the registration of the bootstrap packages.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap18
1 files changed, 13 insertions, 5 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 78cdeda669b..f132e82bad1 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.78 2006/07/24 07:57:45 rillig Exp $
+# $NetBSD: bootstrap,v 1.79 2006/08/02 23:43:47 rillig Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -59,6 +59,7 @@ usage="Usage: $0 "'
[ --ignore-case-check ]
[ --ignore-user-check ]
[ --preserve-path ]
+ [ --compiler <compiler> ]
[ --full ]
[ --help ]'
@@ -252,7 +253,9 @@ pkgdbdir=
pkgmandir=
sysconfdir=
varbase=
-full=
+
+full=no
+compiler=""
while [ $# -gt 0 ]; do
case $1 in
@@ -270,6 +273,8 @@ while [ $# -gt 0 ]; do
--varbase) varbase="$2"; shift ;;
--fetch-cmd=*) fetch_cmd=`get_optarg "$1"` ;;
--fetch-cmd) fetch_cmd="$a"; shift ;;
+ --compiler=*) compiler=`get_optarg "$1"` ;;
+ --compiler) compiler="$2"; shift ;;
--ignore-case-check) ignorecasecheck=yes ;;
--ignore-user-check) ignoreusercheck=yes ;;
--preserve-path) preserve_path=yes ;;
@@ -441,6 +446,7 @@ SunOS)
set_opsys=no
whoamiprog=/usr/ucb/whoami
machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
+ check_compiler=yes
;;
AIX)
root_group=system
@@ -568,7 +574,7 @@ else
fi
echo "Working directory is: ${wrkdir}"
-if [ x"$check_compiler" = x"yes" ]; then
+if [ "$compiler" = "" ] && [ x"$check_compiler" = x"yes" ]; then
get_compiler
if [ $compiler_is_gnu -gt 0 ]; then
compiler="gcc"
@@ -581,6 +587,8 @@ if [ x"$check_compiler" = x"yes" ]; then
compiler="ido"
fi
;;
+ SunOS) compiler="sunpro"
+ ;;
esac
fi
fi
@@ -670,13 +678,13 @@ fi
if [ ! -z "$abi" ]; then
echo "ABI= $abi" >> ${MKCONF_EXAMPLE}
fi
-if [ ! -z "$compiler" ]; then
+if [ "$compiler" != "" ]; then
echo "PKGSRC_COMPILER= $compiler" >> ${MKCONF_EXAMPLE}
fi
# enable unprivileged builds if not root
if [ "$ignoreusercheck" = "yes" ]; then
- echo "UNPRIVILEGED= yes" >> ${MKCONF_EXAMPLE}
+ echo "UNPRIVILEGED= yes" >> ${MKCONF_EXAMPLE}
fi
# save environment in example mk.conf