blob: bd1b7bbf6e829aa3922cef63da5451c5bcb98a29 (
plain)
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
|
#!/bin/sh
#######################################################################
# #
# The Compcert verified compiler #
# #
# Xavier Leroy, INRIA Paris-Rocquencourt #
# #
# Copyright Institut National de Recherche en Informatique et en #
# Automatique. All rights reserved. This file is distributed #
# under the terms of the INRIA Non-Commercial License Agreement. #
# #
#######################################################################
cildistrib=cil-1.3.5.tar.gz
prefix=/usr/local
bindir='$(PREFIX)/bin'
libdir='$(PREFIX)/lib/compcert'
# Parse command-line arguments
while : ; do
case "$1" in
"") break;;
-prefix|--prefix)
prefix=$2; shift;;
-bindir|--bindir)
bindir=$2; shift;;
-libdir|--libdir)
libdir=$2; shift;;
*) echo "Unknown option \"$1\"." 1>&2; exit 2;;
esac
shift
done
# Generate Makefile.config
rm -f Makefile.config
cat > Makefile.config <<EOF
PREFIX=$prefix
BINDIR=$bindir
LIBDIR=$libdir
CC=gcc -arch ppc
CPREPRO=gcc -arch ppc -U__GNUC__ -E
CASM=gcc -arch ppc -c
CLINKER=gcc -arch ppc
LIBMATH=
EOF
# Extract and configure Cil
set -e
tar xzf $cildistrib
for i in cil.patch/*; do patch -p1 < $i; done
(cd cil && ./configure)
# Extract 'ARCHOS' info from Cil configuration
grep '^ARCHOS=' cil/config.log >> Makefile.config
|