Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead (#642)

* Remove SPC_NO_MUSL_PATH, remove --libc, use SPC_LIBC instead

* Fix tests

* Internally use GNU_ARCH for unified

* Update EXTENSION_DIR comments for env.ini

* Remove redundant -fPIC cflags in curl
This commit is contained in:
Jerry Ma
2025-03-14 18:22:50 +08:00
committed by GitHub
parent 91a3a01c39
commit b4f3657323
32 changed files with 80 additions and 117 deletions

View File

@@ -32,7 +32,7 @@ supporting FFI extensions and loading the `xdebug.so` extension of the same PHP
```bash
bin/spc-gnu-docker download --for-extensions=ffi,xml --with-php=8.4
bin/spc-gnu-docker build --libc=glibc ffi,xml --build-cli --debug
bin/spc-gnu-docker build ffi,xml --build-cli --debug
buildroot/bin/php -d "zend_extension=/path/to/php{PHP_VER}-{ts/nts}/xdebug.so" --ri xdebug
```

View File

@@ -46,10 +46,8 @@ After the image is built, you will see the same command help menu as `bin/spc`,
After the container is ready, you can refer to the [local build](./manual-build) section to build your PHP static binary.
Just replace `bin/spc` or `./spc` with `bin/spc-gnu-docker`.
Unlike the default build, when building in the glibc environment, you **must** add the parameter `--libc=glibc`, such as:
```bash
bin/spc-gnu-docker --libc=glibc build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug
bin/spc-gnu-docker build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug
```
## Notes

View File

@@ -29,7 +29,7 @@ PHP 默认也会从 [其他标准位置](https://www.php.net/manual/zh/configura
```bash
bin/spc-gnu-docker download --for-extensions=ffi,xml --with-php=8.4
bin/spc-gnu-docker build --libc=glibc ffi,xml --build-cli --debug
bin/spc-gnu-docker build ffi,xml --build-cli --debug
buildroot/bin/php -d "zend_extension=/path/to/php{PHP_VER}-{ts/nts}/xdebug.so" --ri xdebug
```

View File

@@ -39,10 +39,8 @@ bin/spc-gnu-docker
在容器准备好后,你可以参考 [本地构建](./manual-build) 章节的内容,构建你的 PHP 静态二进制文件。仅需要把 `bin/spc``./spc` 替换为 `bin/spc-gnu-docker` 即可。
与默认构建不同的是,在 glibc 环境构建时**必须添加**参数 `--libc=glibc`,如:
```bash
bin/spc-gnu-docker --libc=glibc build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug
bin/spc-gnu-docker build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug
```
## 注意事项