postgresql14/postgresql-llvm-optional.patch
Reinhard Max 9c8647e685 - Upgrade to 14.16:
* bsc#1237093, CVE-2025-1094: Harden PQescapeString and allied
    functions against invalidly-encoded input strings.
  * obsoletes postgresql-tzdata2025a.patch
  * https://www.postgresql.org/docs/release/14.16/
  * https://www.postgresql.org/about/news/-3015/
- Disable LLVM JIT on loongarch64

OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/postgresql14?expand=0&rev=83
2025-02-13 14:50:05 +00:00

17 lines
562 B
Diff

--- src/Makefile.global.in.orig
+++ src/Makefile.global.in
@@ -192,7 +192,12 @@ with_krb_srvnam = @with_krb_srvnam@
with_ldap = @with_ldap@
with_libxml = @with_libxml@
with_libxslt = @with_libxslt@
-with_llvm = @with_llvm@
+# Only build for LLVM, if the core supports it and the llvm and clang packages are installed.
+ifeq (@with_llvm@ $(wildcard /usr/bin/clang /usr/bin/llvm-lto),yes /usr/bin/clang /usr/bin/llvm-lto)
+with_llvm = yes
+else
+with_llvm = no
+endif
with_system_tzdata = @with_system_tzdata@
with_uuid = @with_uuid@
with_zlib = @with_zlib@