From ddd2597e2f878bbab8797ea57e9f3ba445a15d30 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 6 Feb 2019 13:42:02 +0000 Subject: [PATCH] Added rebuild-all.sh script, and detect 32bit properly for rebuild.sh --- rebuild-all.sh | 16 ++++++++++++++++ rebuild.sh | 10 +++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 rebuild-all.sh diff --git a/rebuild-all.sh b/rebuild-all.sh new file mode 100755 index 0000000..ea96806 --- /dev/null +++ b/rebuild-all.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +for i in /usr/local/php/*; do + version=`echo $i | sed 's@.*/@@'` + echo -n "Rebuilding for PHP ${version}: " + + export PATH=/usr/local/php/${version}/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin + + ./rebuild.sh >/tmp/vld-for-${version}.log 2>&1 + + if [[ $? == 0 ]]; then + echo "DONE" + else + echo "FAIL" + fi +done diff --git a/rebuild.sh b/rebuild.sh index 5a98d15..4cc8da8 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -1,4 +1,8 @@ -#!/bin/sh +#!/bin/bash -export CFLAGS="-Wall -Wextra -Wdeclaration-after-statement -Wmissing-field-initializers -Wshadow -Wno-unused-parameter -ggdb3" -phpize && ./configure && make clean && make && make install +bit64=`php -r 'echo PHP_INT_SIZE == 8 ? "1" : "0";'` + +if [[ ${bit64} != "1" ]]; then + export CFLAGS="-m32" +fi +phpize && ./configure --enable-xdebug-dev && make clean && make all && make install