Skip to content

Commit

Permalink
workaround for pgsql
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Nov 25, 2024
1 parent e062db5 commit 83b1fde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build-static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ elif [ "${os}" = "linux" ] && [ -z "${DEBUG_SYMBOLS}" ]; then
CGO_LDFLAGS="-Wl,-O1 -pie"
fi
# Temporary workaround for https://github.com/crazywhalecc/static-php-cli/issues/560
if [[ "${PHP_EXTENSIONS}" == *"pgsql"* ]]; then
CGO_LDFLAGS="${CGO_LDFLAGS} ${PWD}/buildroot/lib/libpgcommon.a ${PWD}/buildroot/lib/libpgport.a ${PWD}/buildroot/lib/libpq.a"
fi
CGO_LDFLAGS="${CGO_LDFLAGS} ${PWD}/buildroot/lib/libbrotlicommon.a ${PWD}/buildroot/lib/libbrotlienc.a ${PWD}/buildroot/lib/libbrotlidec.a ${PWD}/buildroot/lib/libwatcher-c.a $(./buildroot/bin/php-config --ldflags || true) $(./buildroot/bin/php-config --libs | sed -e 's/-lgcc_s//g' || true)"
if [ "${os}" = "linux" ]; then
if echo "${PHP_EXTENSIONS}" | grep -qE "\b(intl|imagick|grpc|v8js|protobuf|mongodb|tbb)\b"; then
Expand Down

0 comments on commit 83b1fde

Please sign in to comment.