aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisthios <justwesley@protonmail.com>2021-10-04 09:11:30 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2021-10-18 13:38:04 +0000
commit4be185db91194cfd3fbf6a94a30745e7ae47764f (patch)
tree9897d99559b593a9e1abe72e0fd1ca97ee425216
parent36adf5bae9f33aac09eb088cd96002e4f6b93eaa (diff)
downloadaports-4be185db91194cfd3fbf6a94a30745e7ae47764f.tar.gz
aports-4be185db91194cfd3fbf6a94a30745e7ae47764f.tar.bz2
aports-4be185db91194cfd3fbf6a94a30745e7ae47764f.tar.xz
main/postgresql: rebuild for llvm12
-rw-r--r--main/postgresql/0001-jit-Don-t-use-host-specific-CPU-or-features.patch27
-rw-r--r--main/postgresql/APKBUILD9
2 files changed, 33 insertions, 3 deletions
diff --git a/main/postgresql/0001-jit-Don-t-use-host-specific-CPU-or-features.patch b/main/postgresql/0001-jit-Don-t-use-host-specific-CPU-or-features.patch
new file mode 100644
index 0000000000..94076de622
--- /dev/null
+++ b/main/postgresql/0001-jit-Don-t-use-host-specific-CPU-or-features.patch
@@ -0,0 +1,27 @@
+--- a/src/backend/jit/llvm/llvmjit.c
++++ b/src/backend/jit/llvm/llvmjit.c
+@@ -815,10 +815,20 @@
+ * latter is needed because some CPU architectures default to enabling
+ * features not all CPUs have (weird, huh).
+ */
+- cpu = LLVMGetHostCPUName();
+- features = LLVMGetHostCPUFeatures();
+- elog(DEBUG2, "LLVMJIT detected CPU \"%s\", with features \"%s\"",
+- cpu, features);
++
++ /* FIXME: When compile code to pass to the JIT, we are pulling the
++
++ * datalayout from the llvmjit_types.bc, which is compiled at build
++
++ * type without any specifc CPU or feature flags. This can lead to
++
++ * a mismatch between the JIT's datalayout and the code's datalayout
++
++ * if we initialize the JIT for a specific CPU. So for now don't use
++
++ * any host specific cpu features when creating the JIT.
++
++ */
+
+ opt0_tm =
+ LLVMCreateTargetMachine(llvm_targetref, llvm_triple, cpu, features,
diff --git a/main/postgresql/APKBUILD b/main/postgresql/APKBUILD
index 102b20d0e3..623f6dc6b8 100644
--- a/main/postgresql/APKBUILD
+++ b/main/postgresql/APKBUILD
@@ -3,7 +3,7 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql
pkgver=14.0
-pkgrel=2
+pkgrel=3
pkgdesc="A sophisticated object-relational DBMS"
url="https://www.postgresql.org/"
arch="all"
@@ -12,13 +12,14 @@ depends="postgresql-client tzdata"
install="$pkgname.pre-install $pkgname.pre-upgrade"
pkgusers="postgres"
pkggroups="postgres"
+_llvmver=12
checkdepends="diffutils"
-depends_dev="clang icu-dev llvm openssl1.1-compat-dev"
+depends_dev="clang icu-dev llvm$_llvmver openssl1.1-compat-dev"
makedepends="$depends_dev
icu-dev
libxml2-dev
linux-headers
- llvm-dev
+ llvm$_llvmver-dev
openldap-dev
perl-dev
python3-dev
@@ -49,6 +50,7 @@ source="https://ftp.postgresql.org/pub/source/v$pkgver/postgresql-$pkgver.tar.bz
disable-broken-tests.patch
disable-test-collate.icu.utf8.patch
czech-snowball-stemmer.patch
+ 0001-jit-Don-t-use-host-specific-CPU-or-features.patch
$pkgname.initd
$pkgname.confd
@@ -311,4 +313,5 @@ c4179fcd8b71791cdc41ea7b622cf82e9bd42ac1de66999234b98a83c0c508c79c492a9301274fe8
f5a1cba051e7d846c2d16703514601cb25729ed96b677c9bd0c199d64552120a8b14b238af01917fdb87106681e12dee6fff7447558155ba273e4f96be5e2892 pg-restore.initd
c14a5684e914abb3b0ee71bbf15eed71a9264deacaa404a6e3af6bfc330d93e7598624d0ed11a94263106cc660f7f54c8ff57e759033cf606a795f69ff6c1c7c pg-restore.confd
5c9bfd9e295dcf678298bf0aa974347a7c311d6e7c2aa76a6920fcb751d01fd1ab77abbec11f3c672f927ad9deaa88e04e370c0b5cd1b60087554c474b748731 pltcl_create_tables.sql
+b26d3c528065ff642e88c0616261f8a468904070ae24d52721f9f1f0f1329b3e9ceebfd477a4c40b87f2ae04ab7bb3c99892318b5fda373c90b84ccac06d88f6 0001-jit-Don-t-use-host-specific-CPU-or-features.patch
"