-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathstruct_dump.sh
More file actions
executable file
·32 lines (30 loc) · 857 Bytes
/
Copy pathstruct_dump.sh
File metadata and controls
executable file
·32 lines (30 loc) · 857 Bytes
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
#!/bin/bash
this_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)
phpsrc_dir=$1
if [ -z "$phpsrc_dir" ]; then
echo "Required: php-src directory"
exit 1
fi
pushd "$phpsrc_dir" || exit 1
git fetch --tags
for phpv in php-7.0.33 \
php-7.1.33 \
php-7.2.34 \
php-7.3.33 \
php-7.4.33 \
php-8.0.30 \
php-8.1.28 \
php-8.2.18 \
php-8.3.6 \
master
do
git reset --hard HEAD \
&& git clean -fdx \
&& git checkout $phpv \
&& git clean -fdx \
&& ./buildconf --force \
&& ./configure \
&& make -j "$(grep -c '^proc' /proc/cpuinfo)" \
&& gdb -batch -ex "printf \"$phpv\n\n\"" -x "$this_dir/struct_dump.gdb" --args ./sapi/cli/php >"$this_dir/struct_dump.$phpv.out"
done
popd || exit 1