summaryrefslogtreecommitdiffstats
path: root/php-zephir-parser-build.patch
blob: 6c16bcb4eed062204afec363e6ab9eb116124a03 (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
diff -up ./install.rpm ./install
--- ./install.rpm	2017-10-12 11:26:32.000000000 +0200
+++ ./install	2017-10-12 11:29:16.000000000 +0200
@@ -33,7 +33,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)
@@ -74,28 +73,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
@@ -166,33 +143,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
-
-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"
-