forked from openss7/openss7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sh
executable file
·77 lines (72 loc) · 2.46 KB
/
configure.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
#!/bin/bash
# need --enable-maintainer-mode to be able to run in place
# must be disabled to build an installable package
# *FLAGS are what Arch Linux makepkg uses with the exception
# that -Wall -Werror is added
case "`uname -m`" in
i686)
CPPFLAGS="-D_FORTIFY_SOURCE"
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
DEBUG_CFLAGS="-g -ggdb -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -ggdb -fvar-tracking-assignments"
;;
x86_64)
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
DEBUG_CFLAGS="-g -ggdb -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -ggdb -fvar-tracking-assignments"
;;
esac
#_kvr="$(pacman -Qi linux-lts|awk '/^Version/{print$3}')-lts"
_kvr="$(pacman -Qi linux-lts41|awk '/^Version/{print$3}')-lts41"
KCC="gcc"
_kvr="$(pacman -Qi linux-lts44|awk '/^Version/{print$3}')-lts44"
KCC="gcc"
_kvr="$(pacman -Qi linux-lts|awk '/^Version/{print$3}')-lts"
KCC="gcc"
_kvr="$(pacman -Qi linux|awk '/^Version/{print$3}')-ARCH"
KCC="gcc"
_kvr="$(pacman -Qi linux-lts316|awk '/^Version/{print$3}')-lts316"
KCC="gcc-5"
./configure \
KCC="$KCC" \
GCJ="gcj" \
CXX="g++-6" \
CPPFLAGS="$CPPFLAGS" \
CFLAGS="$DEBUG_CFLAGS -Wall -Werror -Wno-missing-braces $CFLAGS" \
CXXFLAGS="$DEBUG_CXXFLAGS -Wall -Werror -Wno-missing-braces $CXXFLAGS" \
GCJFLAGS="$DEBUG_GCJFLAGS -Wall -Wno-suppress -Wno-unused-function $GCJFLAGS" \
LDFLAGS="$LDFLAGS" \
DEBUG_CFLAGS="$DEBUG_CFLAGS" \
DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS" \
MODPOST_DEBUG=5 \
MODPOST_VERBOSE=5 \
syslibdir=/usr/lib \
sysbindir=/usr/bin \
syssbindir=/usr/bin \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib \
--bindir=/usr/bin \
--sbindir=/usr/bin \
--libexecdir=/usr/lib \
--docdir=/usr/share/doc/openss7 \
--enable-maintainer-mode \
--enable-dependency-tracking \
--disable-static \
--disable-sysvinit \
--disable-k-abi-support \
--disable-k-weak-symbols \
--enable-k-weak-modules \
--disable-specfs-lock \
--with-k-release=$_kvr \
--with-k-optimize=speed \
--with-optimize=speed \
--with-gnu-ld
# --disable-docs \
# --disable-tools \
# --disable-java