-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup_build_env.sh
97 lines (73 loc) · 1.83 KB
/
setup_build_env.sh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
function check()
{
if test $? == 1
then
echo Failure: $aarch $arch $variant
exit 1
fi
}
echo XXX BUILD_AND_INSTALL XXX
variant=$1
threebdir=$2
TOON=$3
CVD=$4
GVARS=$5
threebversion=${threebdir}.tar.gz
J=-j8
echo $variant
echo $arch
pwd
CC=gcc
AR=ar
LD=ld
RANLIB=ranlib
PIC=-fPIC
pref=
jni=
generate_arith=0
if [ x$variant == xmingw32 ]
then
host="--host i686-w64-mingw32 --without-pthread"
#Argh, the MingW *environment* provides the microsoft FPU control flags, but
#The cross environment doesn't! Define them here...
CC="i686-w64-mingw32-gcc"
LAPACK_CCFLAGS="-DUSE_CLOCK -D_EM_DENORMAL=0x00080000 -D_EM_UNDERFLOW=0x00000002 -D_EM_INEXACT=0x00000001 -D_MCW_EM=0x0008001F"
AR=i686-w64-mingw32-ar
prefdir=/tmp/mingw32
CVD_LIBS="-L$prefdir/lib -lz"
RANLIB=i686-w64-mingw32-ranlib
pref="--prefix=/tmp/mingw32"
jni=--with-jni=/tmp/java-win
export CPPFLAGS=-I/tmp/mingw32/include
export LDFLAGS=-L/tmp/mingw32/lib
PIC=
generate_arith=1
elif [ x$variant == xmingw64 ]
then
host="--host x86_64-w64-mingw32 --without-pthread"
#Argh, the MingW *environment* provides the microsoft FPU control flags, but
#The cross environment doesn't! Define them here...
CC="x86_64-w64-mingw32-gcc"
LAPACK_CCFLAGS="-DUSE_CLOCK -D_EM_DENORMAL=0x00080000 -D_EM_UNDERFLOW=0x00000002 -D_EM_INEXACT=0x00000001 -D_MCW_EM=0x0008001F"
prefdir=/tmp/mingw64
CVD_LIBS="-L$prefdir/lib -lz"
AR=x86_64-w64-mingw32-ar
RANLIB=x86_64-w64-mingw32-ranlib
pref="--prefix=$prefdir"
jni=--with-jni=/tmp/java-win
export CPPFLAGS=-I/tmp/mingw64/include
export LDFLAGS=-L/tmp/mingw64/lib
PIC=
generate_arith=1
fi
if [ $generate_arith == 1 ]
then
#Machine dependent paramsfor CLAPACK
cat > /tmp/CLAPACK-3.2.1/F2CLIBS/libf2c/arith.h << FOO
#define IEEE_8087
#define Arith_Kind_ASL 1
#define Double_Align
#define QNaN0 0x0
#define QNaN1 0xfff80000
FOO
fi