Skip to content

Commit 2963ced

Browse files
authored
Merge branch 'main' into feat/intl-win
2 parents 6b330fa + 175aafe commit 2963ced

File tree

164 files changed

+3432
-1802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+3432
-1802
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
88
> If a modification is not involved, please skip it directly.
99
10-
- [ ] If you modified `*.php`, run `composer cs-fix` at local machine.
11-
- [ ] If it's an extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
12-
- [ ] If you changed the behavior of static-php-cli, update docs in `./docs/`.
13-
- [ ] If you updated `config/xxx.json` content, run `bin/spc dev:sort-config xxx`.
10+
- If you modified `*.php` or `*.json`, run them locally to ensure your changes are valid:
11+
- [ ] `PHP_CS_FIXER_IGNORE_ENV=1 composer cs-fix`
12+
- [ ] `composer analyse`
13+
- [ ] `composer test`
14+
- [ ] `bin/spc dev:sort-config`
15+
- If it's an extension or dependency update, please ensure the following:
16+
- [ ] Add your test combination to `src/globals/test-extensions.php`.
17+
- [ ] If adding new or fixing bugs, add commit message containing `extension test` or `test extensions` to trigger full test suite.

.github/workflows/ext-matrix-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
name: "Extension matrix tests"
1+
name: "Extension Matrix Tests"
22

33
on:
44
workflow_dispatch:
5-
pull_request:
6-
branches: [ "main" ]
7-
paths:
8-
- '.github/workflows/ext-matrix-tests.yml'
5+
push:
96

107
jobs:
118
test:
129
name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})"
1310
runs-on: ${{ matrix.operating-system }}
11+
if: contains(github.event.head_commit.message, 'extension test') || contains(github.event.head_commit.message, 'test extensions')
1412
strategy:
1513
fail-fast: false
1614
matrix:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ docker/source/
1010
# default source extract directory
1111
/source/**
1212

13+
# built by shared embed tests
14+
/locale/
15+
1316
# default source download directory
1417
/downloads/**
1518

README-zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ bin/spc micro:combine my-app.phar -I "memory_limit=4G" -I "disable_functions=sys
278278

279279
如果你知道 [embed SAPI](https://github.com/php/php-src/tree/master/sapi/embed),你应该知道如何使用它。对于有可能编译用到引入其他库的问题,你可以使用 `buildroot/bin/php-config` 来获取编译时的配置。
280280

281-
另外,有关如何使用此功能的高级示例,请查看[如何使用它构建 FrankenPHP 的静态版本](https://github.com/dunglas/frankenphp/blob/main/docs/static.md)
281+
另外,有关如何使用此功能的高级示例,请查看[如何使用它构建 FrankenPHP 的静态版本](https://github.com/php/frankenphp/blob/main/docs/static.md)
282282

283283
## 贡献
284284

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ If you know [embed SAPI](https://github.com/php/php-src/tree/master/sapi/embed),
302302
You may require the introduction of other libraries during compilation,
303303
you can use `buildroot/bin/php-config` to obtain the compile-time configuration.
304304

305-
For an advanced example of how to use this feature, take a look at [how to use it to build a static version of FrankenPHP](https://github.com/dunglas/frankenphp/blob/main/docs/static.md).
305+
For an advanced example of how to use this feature, take a look at [how to use it to build a static version of FrankenPHP](https://github.com/php/frankenphp/blob/main/docs/static.md).
306306

307307
## Contribution
308308

bin/spc-alpine-docker

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
2+
3+
set -e
24

35
# This file is using docker to run commands
4-
SPC_DOCKER_VERSION=v3
6+
SPC_DOCKER_VERSION=v4
57

68
# Detect docker can run
79
if ! which docker >/dev/null; then
8-
echo "Docker is not installed, please install docker first !"
9-
exit 1
10+
echo "Docker is not installed, please install docker first !"
11+
exit 1
1012
fi
1113
DOCKER_EXECUTABLE="docker"
1214
# shellcheck disable=SC2046
@@ -22,27 +24,48 @@ if [ $(id -u) -ne 0 ]; then
2224
fi
2325
fi
2426

25-
26-
27-
# to check if qemu-docker run
28-
if [ "$SPC_USE_ARCH" = "" ]; then
29-
SPC_USE_ARCH=x86_64
27+
# Convert uname to gnu arch
28+
CURRENT_ARCH=$(uname -m)
29+
if [ "$CURRENT_ARCH" = "arm64" ]; then
30+
CURRENT_ARCH=aarch64
31+
fi
32+
if [ -z "$SPC_USE_ARCH" ]; then
33+
SPC_USE_ARCH=$CURRENT_ARCH
3034
fi
35+
# parse SPC_USE_ARCH
3136
case $SPC_USE_ARCH in
32-
x86_64)
33-
ALPINE_FROM=alpine:edge
37+
x86_64|amd64)
38+
SPC_USE_ARCH=x86_64
39+
if [ "$CURRENT_ARCH" != "x86_64" ]; then
40+
PLATFORM_ARG="--platform linux/amd64"
41+
ALPINE_FROM=multiarch/alpine:x86_64-edge
42+
fi
3443
;;
35-
aarch64)
36-
ALPINE_FROM=multiarch/alpine:aarch64-edge
37-
# shellcheck disable=SC2039
38-
echo -e "\e[033m* Using different arch needs to setup qemu-static for docker !\e[0m"
39-
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static:register --reset > /dev/null
44+
aarch64|arm64)
45+
SPC_USE_ARCH=aarch64
46+
if [ "$CURRENT_ARCH" != "aarch64" ]; then
47+
PLATFORM_ARG="--platform linux/arm64"
48+
ALPINE_FROM=multiarch/alpine:aarch64-edge
49+
fi
4050
;;
4151
*)
4252
echo "Current arch is not supported to run in docker: $SPC_USE_ARCH"
4353
exit 1
4454
;;
4555
esac
56+
# if ALPINE_FROM is not set, use alpine:edge
57+
if [ -z "$ALPINE_FROM" ]; then
58+
ALPINE_FROM=alpine:edge
59+
fi
60+
if [ "$SPC_USE_ARCH" != "$CURRENT_ARCH" ]; then
61+
echo "* Using different arch needs to setup qemu-static for docker !"
62+
ALPINE_FROM=multiarch/alpine:$SPC_USE_ARCH-edge
63+
if [ "$(uname -s)" = "Linux" ]; then
64+
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static:register --reset > /dev/null
65+
fi
66+
else
67+
ALPINE_FROM=alpine:edge
68+
fi
4669

4770
if [ "$SPC_USE_MIRROR" = "yes" ]; then
4871
SPC_USE_MIRROR="RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories"
@@ -53,7 +76,7 @@ fi
5376
# Detect docker env is setup
5477
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION; then
5578
echo "Docker container does not exist. Building docker image ..."
56-
$DOCKER_EXECUTABLE build -t cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
79+
$DOCKER_EXECUTABLE build $PLATFORM_ARG -t cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
5780
FROM $ALPINE_FROM
5881
$SPC_USE_MIRROR
5982
RUN apk update; \
@@ -84,7 +107,8 @@ RUN apk update; \
84107
wget \
85108
xz \
86109
gettext-dev \
87-
binutils-gold
110+
binutils-gold \
111+
patchelf
88112
89113
RUN curl -#fSL https://dl.static-php.dev/static-php-cli/bulk/php-8.4.4-cli-linux-\$(uname -m).tar.gz | tar -xz -C /usr/local/bin && \
90114
chmod +x /usr/local/bin/php
@@ -147,7 +171,7 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
147171
echo "* ./pkgroot: $(pwd)/pkgroot"
148172
echo "*"
149173
set -ex
150-
$DOCKER_EXECUTABLE run --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION
174+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
151175
else
152-
$DOCKER_EXECUTABLE run --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
176+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST $MOUNT_LIST cwcc-spc-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
153177
fi

bin/spc-gnu-docker

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/env bash
22

3+
set -e
4+
5+
# This file is using docker to run commands
6+
SPC_DOCKER_VERSION=v4
7+
38
# Detect docker can run
49
if ! which docker >/dev/null; then
510
echo "Docker is not installed, please install docker first !"
@@ -19,35 +24,47 @@ if [ $(id -u) -ne 0 ]; then
1924
fi
2025
fi
2126

22-
23-
24-
# to check if qemu-docker run
25-
if [ "$SPC_USE_ARCH" = "" ]; then
26-
SPC_USE_ARCH=current
27+
# Convert uname to gnu arch
28+
CURRENT_ARCH=$(uname -m)
29+
if [ "$CURRENT_ARCH" = "arm64" ]; then
30+
CURRENT_ARCH=aarch64
31+
fi
32+
if [ -z "$SPC_USE_ARCH" ]; then
33+
SPC_USE_ARCH=$CURRENT_ARCH
2734
fi
35+
# parse SPC_USE_ARCH
2836
case $SPC_USE_ARCH in
29-
current)
30-
BASE_ARCH=$(uname -m)
31-
if [ "$BASE_ARCH" = "arm64" ]; then
32-
BASE_ARCH=aarch64
37+
x86_64|amd64)
38+
SPC_USE_ARCH=x86_64
39+
SPC_USE_ARCH_DOCKER=amd64
40+
if [ "$CURRENT_ARCH" != "x86_64" ]; then
41+
PLATFORM_ARG="--platform linux/amd64"
3342
fi
3443
;;
35-
aarch64)
36-
BASE_ARCH=aarch64
37-
# shellcheck disable=SC2039
38-
echo -e "\e[033m* Using different arch needs to setup qemu-static for docker !\e[0m"
39-
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static:register --reset > /dev/null
44+
aarch64|arm64)
45+
SPC_USE_ARCH=aarch64
46+
SPC_USE_ARCH_DOCKER=arm64
47+
if [ "$CURRENT_ARCH" != "aarch64" ]; then
48+
PLATFORM_ARG="--platform linux/arm64"
49+
fi
4050
;;
4151
*)
4252
echo "Current arch is not supported to run in docker: $SPC_USE_ARCH"
4353
exit 1
4454
;;
4555
esac
56+
# detect if we need to use qemu-static
57+
if [ "$SPC_USE_ARCH" != "$CURRENT_ARCH" ]; then
58+
if [ "$(uname -s)" = "Linux" ]; then
59+
echo "* Using different arch needs to setup qemu-static for docker !"
60+
$DOCKER_EXECUTABLE run --rm --privileged multiarch/qemu-user-static --reset -p yes > /dev/null
61+
fi
62+
fi
4663

4764
# Detect docker env is setup
48-
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH; then
65+
if ! $DOCKER_EXECUTABLE images | grep -q cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION; then
4966
echo "Docker container does not exist. Building docker image ..."
50-
$DOCKER_EXECUTABLE build -t cwcc-spc-gnu-$SPC_USE_ARCH -f- . <<EOF
67+
$DOCKER_EXECUTABLE buildx build $PLATFORM_ARG --no-cache -t cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION -f- . <<EOF
5168
FROM centos:7
5269
RUN sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/*.repo && \
5370
sed -i 's/^#.*baseurl=http/baseurl=http/g' /etc/yum.repos.d/*.repo && \
@@ -59,7 +76,7 @@ RUN yum clean all && \
5976
6077
RUN yum install -y centos-release-scl
6178
62-
RUN if [ "$BASE_ARCH" = "aarch64" ]; then \
79+
RUN if [ "$SPC_USE_ARCH" = "aarch64" ]; then \
6380
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo ; \
6481
sed -i 's|mirror.centos.org/centos|vault.centos.org/altarch|g' /etc/yum.repos.d/CentOS-SCLo-scl.repo ; \
6582
else \
@@ -72,8 +89,14 @@ RUN yum update -y && \
7289
yum install -y devtoolset-10-gcc-*
7390
RUN echo "source scl_source enable devtoolset-10" >> /etc/bashrc
7491
RUN source /etc/bashrc
92+
RUN yum install -y which
93+
94+
RUN curl -fsSL -o patchelf.tgz https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0-$SPC_USE_ARCH.tar.gz && \
95+
mkdir -p /patchelf && \
96+
tar -xzf patchelf.tgz -C /patchelf --strip-components=1 && \
97+
cp /patchelf/bin/patchelf /usr/bin/
7598
76-
RUN curl -o cmake.tgz -fsSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$BASE_ARCH.tar.gz && \
99+
RUN curl -o cmake.tgz -fsSL https://github.com/Kitware/CMake/releases/download/v3.31.4/cmake-3.31.4-linux-$SPC_USE_ARCH.tar.gz && \
77100
mkdir /cmake && \
78101
tar -xzf cmake.tgz -C /cmake --strip-components 1
79102
@@ -88,7 +111,7 @@ ENV PATH="/app/bin:/cmake/bin:$PATH"
88111
ENV SPC_LIBC=glibc
89112
90113
ADD ./config/env.ini /app/config/env.ini
91-
RUN bin/spc doctor --auto-fix --debug
114+
RUN CC=gcc bin/spc doctor --auto-fix --debug
92115
93116
RUN curl -o make.tgz -fsSL https://ftp.gnu.org/gnu/make/make-4.4.tar.gz && \
94117
tar -zxvf make.tgz && \
@@ -135,7 +158,7 @@ echo 'CC=/opt/rh/devtoolset-10/root/usr/bin/gcc' > /tmp/spc-gnu-docker.env
135158
echo 'CXX=/opt/rh/devtoolset-10/root/usr/bin/g++' >> /tmp/spc-gnu-docker.env
136159
echo 'AR=/opt/rh/devtoolset-10/root/usr/bin/ar' >> /tmp/spc-gnu-docker.env
137160
echo 'LD=/opt/rh/devtoolset-10/root/usr/bin/ld' >> /tmp/spc-gnu-docker.env
138-
echo 'SPC_DEFAULT_C_FLAGS=-fPIE -fPIC' >> /tmp/spc-gnu-docker.env
161+
echo 'SPC_DEFAULT_C_FLAGS=-fPIC' >> /tmp/spc-gnu-docker.env
139162
echo 'SPC_LIBC=glibc' >> /tmp/spc-gnu-docker.env
140163
echo 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-Wl,-O1 -pie"' >> /tmp/spc-gnu-docker.env
141164
echo 'SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm -lresolv -lutil -lrt"' >> /tmp/spc-gnu-docker.env
@@ -167,7 +190,7 @@ if [ "$SPC_DOCKER_DEBUG" = "yes" ]; then
167190
echo "* ./pkgroot: $(pwd)/pkgroot"
168191
echo "*"
169192
set -ex
170-
$DOCKER_EXECUTABLE run --rm -it --privileged $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH
193+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --privileged --rm -it $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION /bin/bash
171194
else
172-
$DOCKER_EXECUTABLE run --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH bin/spc $@
195+
$DOCKER_EXECUTABLE run $PLATFORM_ARG --rm $INTERACT $ENV_LIST --env-file /tmp/spc-gnu-docker.env $MOUNT_LIST cwcc-spc-gnu-$SPC_USE_ARCH-$SPC_DOCKER_VERSION bin/spc $@
173196
fi

config/env.ini

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ SPC_CONCURRENCY=${CPU_COUNT}
4242
SPC_SKIP_PHP_VERSION_CHECK="no"
4343
; Ignore some check item for bin/spc doctor command, comma separated (e.g. SPC_SKIP_DOCTOR_CHECK_ITEMS="if homebrew has installed")
4444
SPC_SKIP_DOCTOR_CHECK_ITEMS=""
45+
; extra modules that xcaddy will include in the FrankenPHP build
46+
SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES="--with github.com/dunglas/frankenphp/caddy --with github.com/dunglas/mercure/caddy --with github.com/dunglas/vulcain/caddy --with github.com/dunglas/caddy-cbrotli"
47+
4548
; EXTENSION_DIR where the built php will look for extension when a .ini instructs to load them
4649
; only useful for builds targeting not pure-static linking
4750
; default paths
@@ -66,10 +69,10 @@ SPC_LIBC=musl
6669
CC=${SPC_LINUX_DEFAULT_CC}
6770
CXX=${SPC_LINUX_DEFAULT_CXX}
6871
AR=${SPC_LINUX_DEFAULT_AR}
69-
LD=ld.gold
72+
LD=${SPC_LINUX_DEFAULT_LD}
7073
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
71-
SPC_DEFAULT_C_FLAGS="-fPIC"
72-
SPC_DEFAULT_CXX_FLAGS=
74+
SPC_DEFAULT_C_FLAGS="-fPIC -Os"
75+
SPC_DEFAULT_CXX_FLAGS="-fPIC -Os"
7376
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
7477
SPC_EXTRA_LIBS=
7578
; upx executable path
@@ -81,7 +84,7 @@ SPC_MICRO_PATCHES=static_extensions_win32,cli_checks,disable_huge_page,vcruntime
8184
; buildconf command
8285
SPC_CMD_PREFIX_PHP_BUILDCONF="./buildconf --force"
8386
; configure command
84-
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --enable-shared=no --enable-static=yes --disable-all --disable-cgi --disable-phpdbg --with-pic"
87+
SPC_CMD_PREFIX_PHP_CONFIGURE="./configure --prefix= --with-valgrind=no --disable-shared --enable-static --disable-all --disable-cgi --disable-phpdbg --with-pic"
8588
; make command
8689
SPC_CMD_PREFIX_PHP_MAKE="make -j${CPU_COUNT}"
8790
; embed type for php, static (libphp.a) or shared (libphp.so)
@@ -97,9 +100,11 @@ SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}"
97100
; LIBS for configuring php
98101
SPC_CMD_VAR_PHP_CONFIGURE_LIBS="-ldl -lpthread -lm"
99102
; EXTRA_CFLAGS for `make` php
100-
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -Os -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-ident -fPIE -fPIC"
103+
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fno-ident -fPIE ${SPC_DEFAULT_C_FLAGS}"
101104
; EXTRA_LIBS for `make` php
102105
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-ldl -lpthread -lm"
106+
; EXTRA_LDFLAGS for `make` php, can use -release to set a soname for libphp.so
107+
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS=""
103108
; EXTRA_LDFLAGS_PROGRAM for `make` php
104109
SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-all-static -Wl,-O1 -pie"
105110

@@ -108,8 +113,8 @@ SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS_PROGRAM="-all-static -Wl,-O1 -pie"
108113
CC=clang
109114
CXX=clang++
110115
; default compiler flags, used in CMake toolchain file, openssl and pkg-config build
111-
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin"
112-
SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin"
116+
SPC_DEFAULT_C_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
117+
SPC_DEFAULT_CXX_FLAGS="--target=${MAC_ARCH}-apple-darwin -Os"
113118
; extra libs for building php executable, used in `make` command for building php (this value may changed by extension build process, space separated)
114119
SPC_EXTRA_LIBS=
115120
; phpmicro patches, for more info, see: https://github.com/easysoft/phpmicro/tree/master/patches
@@ -131,7 +136,7 @@ SPC_CMD_VAR_PHP_CONFIGURE_CPPFLAGS="-I${BUILD_INCLUDE_PATH}"
131136
; LDFLAGS for configuring php
132137
SPC_CMD_VAR_PHP_CONFIGURE_LDFLAGS="-L${BUILD_LIB_PATH}"
133138
; EXTRA_CFLAGS for `make` php
134-
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie -Os -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
139+
SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS="-g -fstack-protector-strong -fpic -fpie ${SPC_DEFAULT_C_FLAGS}"
135140
; EXTRA_LIBS for `make` php
136141
SPC_CMD_VAR_PHP_MAKE_EXTRA_LIBS="-lresolv"
137142
; embed type for php, static (libphp.a) or shared (libphp.dylib)

0 commit comments

Comments
 (0)