Created
December 11, 2012 04:40
-
-
Save phalcon/4255921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f Makefile ]; then | |
make clean | |
phpize --clean | |
fi | |
export CC="gcc" | |
export CFLAGS="-march=native -mtune=native -O2 -fno-delete-null-pointer-checks -finline-functions" | |
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 -fno-delete-null-pointer-checks -finline-functions $BFLAGS" | |
gcc $CFLAGS t.c -o t 2> t.t | |
if [ $? != 0 ]; then | |
export CFLAGS="-O2 -fno-delete-null-pointer-checks" | |
fi | |
fi | |
rm -f t.t t.c | |
phpize | |
./configure --enable-phalcon && make && make install && echo "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web browser to complete the installation" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment