Skip to content

Commit 48b37fe

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: [ci skip] Make build command for program using embed portable
2 parents db54a83 + ce322fd commit 48b37fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/embed/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ To compile this, we must point the compiler to the PHP header files. The paths t
3636
We must also point the linker and the runtime loader to the `libphp.so` shared lib for linking PHP (`-lphp`) which is located at `$(php-config --prefix)/lib`. So the complete command to compile ends up being:
3737
3838
```bash
39-
$ gcc \
39+
$ cc \
4040
$(php-config --includes) \
4141
-L$(php-config --prefix)/lib \
4242
embed_sapi_basic_example.c \
4343
-lphp \
44-
-Wl,-rpath=$(php-config --prefix)/lib
44+
-Wl,-rpath,$(php-config --prefix)/lib
4545
```
4646

4747
> :memo: The embed SAPI is disabled by default. In order for the above example to compile, PHP must be built with the embed SAPI enabled. To see what SAPIs are installed, run `php-config --php-sapis`. If you don't see `embed` in the list, you'll need to rebuild PHP with `./configure --enable-embed`. The PHP shared library `libphp.so` is built when the embed SAPI is enabled.

0 commit comments

Comments
 (0)