From 4a442825567c9423bada46fd16ef9fb1d2029ecf Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Wed, 21 May 2025 20:12:12 +0700 Subject: [PATCH] shoehorn the lot in, I don't know how to fix this otherwise --- src/SPC/builder/extension/pgsql.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/extension/pgsql.php b/src/SPC/builder/extension/pgsql.php index a70c1fb7..a659ae72 100644 --- a/src/SPC/builder/extension/pgsql.php +++ b/src/SPC/builder/extension/pgsql.php @@ -39,9 +39,12 @@ class pgsql extends Extension $libfiles = $this->getLibFilesString(); $libfiles = str_replace(BUILD_LIB_PATH . '/lib', '-l', $libfiles); $libfiles = str_replace('.a', '', $libfiles); + $libfiles = str_replace(' -lpq', '', $libfiles); + $libfiles = str_replace(' -lpgport', '', $libfiles); + $libfiles = str_replace(' -lpgcommon', '', $libfiles); return '--with-pgsql' . ($shared ? '=shared' : '') . ' PGSQL_CFLAGS=-I' . BUILD_INCLUDE_PATH . - ' PGSQL_LIBS="-L' . BUILD_LIB_PATH . ' ' . $libfiles . '"'; + ' PGSQL_LIBS="-L' . BUILD_LIB_PATH . ' -Wl,--whole-archive -lpq -lpgport -lpgcommon -Wl,--no-whole-archive ' . $libfiles . '"'; } return '--with-pgsql=' . ($shared ? 'shared,' : '') . BUILD_ROOT_PATH; }