Skip to content

Commit 5b9905e

Browse files
committed
fix: Fixed PHP build warnings with latest wasi-sdk
1 parent 8894da6 commit 5b9905e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

php/php-8.1.11/wlr-build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1515
########## Setup the flags for php #############
1616
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DWASM_WASI'
1717

18+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Wno-implicit-function-declaration -Wno-incompatible-function-pointer-types'
19+
1820
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
19-
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES}"
21+
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_WARNINGS}"
2022
export CFLAGS="${CFLAGS_CONFIG} ${CFLAGS_WASI} ${CFLAGS_DEPENDENCIES} ${CFLAGS_PHP} ${LDFLAGS}"
2123

2224
cd "${WLR_SOURCE_PATH}"

php/php-8.2.0-slim/wlr-build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1616
########## Setup the flags for php #############
1717
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DWASM_WASI'
1818

19+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration -Wno-incompatible-function-pointer-types'
20+
1921
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
20-
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_SQLITE}"
22+
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_SQLITE} ${LDFLAGS_WARNINGS}"
2123
export CFLAGS="${CFLAGS_CONFIG} ${CFLAGS_WASI} ${CFLAGS_DEPENDENCIES} ${CFLAGS_PHP} ${LDFLAGS}"
2224

2325
logStatus "CFLAGS="${CFLAGS}

php/php-8.2.0/wlr-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export LDFLAGS_WASI="--sysroot=${WASI_SYSROOT} -lwasi-emulated-getpid -lwasi-emu
1717
########## Setup the flags for php #############
1818
export CFLAGS_PHP='-D_POSIX_SOURCE=1 -D_GNU_SOURCE=1 -DHAVE_FORK=0 -DPNG_USER_CONFIG -DWASM_WASI'
1919

20-
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration'
20+
export LDFLAGS_WARNINGS='-Wno-unused-command-line-argument -Werror=implicit-function-declaration -Wno-incompatible-function-pointer-types'
2121

2222
# We need to add LDFLAGS ot CFLAGS because autoconf compiles(+links) to binary when checking stuff
2323
export LDFLAGS="${LDFLAGS_WASI} ${LDFLAGS_DEPENDENCIES} ${LDFLAGS_WARNINGS}"

0 commit comments

Comments
 (0)