summaryrefslogtreecommitdiffstats
path: root/php-zephir-parser-build.patch
blob: 27c2ef1b1fa9e7bd14584f0f74cd2056d9194b5f (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
diff -up ./install.rpm ./install
--- ./install.rpm	2017-11-09 08:30:30.000000000 +0100
+++ ./install	2017-11-10 06:55:13.646045853 +0100
@@ -50,7 +50,6 @@ fi
 
 # Check best compilation flags for compiler
 export CC=gcc
-export CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer"
 
 # Set defaults
 PHPIZE_BIN=`command -v phpize 2>/dev/null || true`
@@ -91,28 +90,6 @@ if [ "${PHP_FULL_VERSION:0:3}" == "5.4"
 	exit 1
 fi
 
-# Detect possible flags
-echo "int main() {}" > t.c
-gcc ${CFLAGS} t.c -o t 2> t.t
-if [ $? != 0 ]; then
-	chmod +x gcccpuopt
-	BFLAGS=`./gcccpuopt`
-	export CFLAGS="-O2 -fomit-frame-pointer $BFLAGS"
-	gcc ${CFLAGS} t.c -o t 2> t.t
-	if [ $? != 0 ]; then
-		export CFLAGS="-O2"
-	fi
-fi
-
-# Activate some gcc specific optimizations for gcc >= 4
-if [ $(gcc -dumpversion | cut -f1 -d.) -ge 4 ]; then
-	gcc ${CFLAGS} -fvisibility=hidden t.c -o t 2> t.t && export CFLAGS="$CFLAGS -fvisibility=hidden"
-fi
-
-gcc ${CFLAGS} -flto t.c -o t 2> t.t && { export CFLAGS="$CFLAGS -flto"; export LDFLAGS="$LDFLAGS $CFLAGS"; }
-
-rm -f t.t t.c t
-
 cd ${CURRENT_DIR}/parser
 
 # Cleanup
@@ -182,36 +159,3 @@ if [ "$(uname -s 2>/dev/null)" = "Darwin
 	aclocal && ${LIBTOOLIZE_BIN} --force && autoheader && autoconf
 fi
 
-./configure \
-	--silent \
-	--with-php-config=${PHPCONFIG_BIN} \
-	--enable-zephir_parser
-
-# Perform the compilation
-make -s -j"$(getconf _NPROCESSORS_ONLN)"
-make -s install
-
-# Clean current compilation
-if [ -f Makefile ]; then
-	make -s clean
-	${PHPIZE_BIN} --clean
-fi
-
-cd ${CURRENT_DIR}/parser
-
-# Cleanup
-rm -f \
-	*.o \
-	*.lo \
-	lemon \
-	scanner.c \
-	parser.c \
-	parser.php5.c \
-	parser.php5.h \
-	parser.php5.out \
-	parser.php7.c \
-	parser.php7.h \
-	parser.php7.out \
-	config.h.in~
-
-echo -e "\nThanks for compiling Zephir Parser!\nBuild succeed: Please restart your web server to complete the installation\n"