-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-setup
More file actions
executable file
·61 lines (55 loc) · 1.15 KB
/
build-setup
File metadata and controls
executable file
·61 lines (55 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This file determins the target list and compilers to use.
# Get the supported targets.
targets=`cat $prefix/targets`
targetlist=`echo $targets | sed -e "s/ /,/g"`
bin=$prefix/bin
bindir=$bin
# Get the build processor. For now it is also the host and target processor.
build=`uname -p`
host=$build
target=$build
os=linux
if [ $# -ge 1 ] ; then
# The first argument is the desired cross host.
host=$1
bindir=$bindir-$host-$os
shift
fi
if [ `which ecc` ] ; then
# ecc exists, and is in the PATH.
ecc=ecc
fi
if [ -e $bin/ecc ]; then
ecc=$bin/ecc
fi
if [ "x$ecc" != "x" ] ; then
# An ecc exists, use it to compile.
if [ -e $prefix/libecc/lib/$target/$os/libc.a ]; then
# To build for $target with libecc:
cc="$ecc -target $host-ellcc-$os"
cxx="$ecc++ -target $host-ellcc-$os"
hcc=$ecc
hcxx=$ecc++
ar=$ecc-ar
builddir="-$host-$os"
haslibs=1
else
# libecc has not been built, use the host's libraries.
cc=$ecc
cxx=$ecc++
hcc=$ecc
hcxx=$ecc++
ar=$ecc-ar
builddir=""
haslibs=0
fi
else
# Build with the gcc compiler
cc=gcc
cxx=g++
hcc=gcc
hcxx=g++
ar=ar
builddir=""
haslibs=0
fi