aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2019-01-07 21:48:38 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2019-01-07 21:48:38 +0100
commit98222694f92aeecfcbb216fd1cb835b9550aa6d6 (patch)
tree94f06e87ee4eb2145b46be89db141d82507c630d /INSTALL
parentd95f1bcc4938b3b0b7f832b67575e07a87095721 (diff)
parent2607cc565ee3d5facb8949e9acfed35c8ae300c9 (diff)
downloadplan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.tar.gz
plan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.tar.bz2
plan9port-98222694f92aeecfcbb216fd1cb835b9550aa6d6.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'INSTALL')
-rwxr-xr-xINSTALL45
1 files changed, 27 insertions, 18 deletions
diff --git a/INSTALL b/INSTALL
index 4673056b..cb0df570 100755
--- a/INSTALL
+++ b/INSTALL
@@ -15,9 +15,9 @@ x-c)
doinstall=true
;;
x-r)
- shift
- PLAN9_TARGET=$1 export PLAN9_TARGET
- ;;
+ shift
+ PLAN9_TARGET=$1 export PLAN9_TARGET
+ ;;
*)
echo 'usage: INSTALL [-b | -c] [-r path]' 1>&2
exit 1
@@ -42,23 +42,27 @@ echo "* Resetting $PLAN9/config"
rm -f config
(
-echo "* Compiler version:"
-9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /'
-
if [ `uname` = FreeBSD ]; then
- echo "* Running on FreeBSD, adjusting linker flags"
- echo "LDFLAGS='-L/usr/local/lib'" >> $PLAN9/config
+ case `cc -v 2>&1` in
+ *clang*)
+ echo "CC9=clang" >> $PLAN9/config
+ ;;
+ *)
+ ;;
+ esac
+ echo "* Running on FreeBSD, adjusting linker flags"
+ echo "LDFLAGS='-L/usr/local/lib'" >> $PLAN9/config
fi
if [ `uname` = DragonFly ]; then
- echo "* Running on DragonFly BSD, adjusting linker flags"
- echo "LDFLAGS='-L/usr/local/lib -pthread'" >> $PLAN9/config
- echo "CFLAGS='-pthread'" >> $PLAN9/config
+ echo "* Running on DragonFly BSD, adjusting linker flags"
+ echo "LDFLAGS='-L/usr/local/lib -pthread'" >> $PLAN9/config
+ echo "CFLAGS='-pthread'" >> $PLAN9/config
fi
if [ `uname` = OpenBSD ]; then
- echo "* Running on OpenBSD, adjusting linker flags"
- echo "LDFLAGS='-L/usr/X11R6/lib -pthread'" >> $PLAN9/config
+ echo "* Running on OpenBSD, adjusting linker flags"
+ echo "LDFLAGS='-L/usr/X11R6/lib -pthread'" >> $PLAN9/config
fi
if [ `uname` = Linux ]; then
@@ -80,8 +84,8 @@ fi
if [ `uname` = SunOS ]; then
# On Solaris x86, uname -p cannot be trusted.
- echo "* Running on Solaris: checking architecture..."
- case "$(isainfo -n)" in
+ echo "* Running on Solaris: checking architecture..."
+ case "$(isainfo -n)" in
*amd64*)
echo " x86-64 found."
echo "OBJTYPE=x86_64" >>$PLAN9/config
@@ -92,7 +96,7 @@ if [ `uname` = SunOS ]; then
echo "OBJTYPE=386" >>$PLAN9/config
echo "CC9=gcc" >>$PLAN9/config # defaults to gcc on Solaris/i386
;;
- *sparc*)
+ *sparc*)
echo " Sparc found."
echo "OBJTYPE=sparc" >>$PLAN9/config
;;
@@ -100,6 +104,7 @@ if [ `uname` = SunOS ]; then
fi
if [ `uname` = Darwin ]; then
+ export NPROC=$(sysctl hw.ncpu | sed 's/hw.ncpu: //')
# On Darwin, uname -m -p cannot be trusted.
echo "* Running on Darwin: checking architecture..."
rm -f ./a.out
@@ -112,13 +117,14 @@ if [ `uname` = Darwin ]; then
*x86_64*)
echo " x86-64 found."
echo "OBJTYPE=x86_64" >>$PLAN9/config
+ echo "CC9='xcrun --sdk macosx clang'" >>$PLAN9/config
;;
*i386*)
echo " i386 found."
echo "OBJTYPE=386" >>$PLAN9/config
;;
*ppc*)
- echo " power found."
+ echo " power found."
echo "OBJTYPE=power" >>$PLAN9/config
;;
esac
@@ -128,7 +134,7 @@ fi
if [ `uname` != Darwin ]; then
# Determine whether fontsrv X11 files are available.
rm -f a.out
- gcc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/local/include/freetype2 \
+ cc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/local/include/freetype2 \
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 src/cmd/fontsrv/x11.c >/dev/null 2>&1
if [ -f a.out ]; then
echo " fontsrv dependencies found."
@@ -147,6 +153,9 @@ if [ -f LOCAL.config ]; then
cat LOCAL.config >>config
fi
+echo "* Compiler version:"
+9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /'
+
cd src
if $dobuild; then
if [ ! -x ../bin/mk ]; then