Re-enable -O3 compilation for PPC 64bit boxes
Related: rhbz#1544349 Version: 10.4-5
This commit is contained in:
parent
12b384bfd8
commit
07daa8e53a
27
postgresql-ppc64-gcc-workaround.patch
Normal file
27
postgresql-ppc64-gcc-workaround.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
This is to workaround GCC optimization bug (rhbz#1544349) on PPC64* boxes.
|
||||||
|
|
||||||
|
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
|
||||||
|
index 2c636ad..833014b 100644
|
||||||
|
--- a/contrib/btree_gist/btree_utils_var.c
|
||||||
|
+++ b/contrib/btree_gist/btree_utils_var.c
|
||||||
|
@@ -230,6 +230,10 @@ gbt_var_node_truncate(const GBT_VARKEY *node, int32 cpf_length, const gbtree_vin
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+#if defined(__ppc64__) || defined(__powerpc64__)
|
||||||
|
+#pragma GCC push_options
|
||||||
|
+#pragma GCC optimize ("no-tree-slp-vectorize")
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
|
||||||
|
@@ -278,6 +282,9 @@ gbt_var_bin_union(Datum *u, GBT_VARKEY *e, Oid collation,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(__ppc64__) || defined(__powerpc64__)
|
||||||
|
+#pragma GCC pop_options
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
GISTENTRY *
|
||||||
|
gbt_var_compress(GISTENTRY *entry, const gbtree_vinfo *tinfo)
|
@ -59,7 +59,7 @@ Summary: PostgreSQL client programs
|
|||||||
Name: postgresql
|
Name: postgresql
|
||||||
%global majorversion 10
|
%global majorversion 10
|
||||||
Version: 10.4
|
Version: 10.4
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
|
||||||
# recognizes it as an independent license, so we do as well.
|
# recognizes it as an independent license, so we do as well.
|
||||||
@ -105,6 +105,7 @@ Patch1: rpm-pgsql.patch
|
|||||||
Patch2: postgresql-logging.patch
|
Patch2: postgresql-logging.patch
|
||||||
Patch5: postgresql-var-run-socket.patch
|
Patch5: postgresql-var-run-socket.patch
|
||||||
Patch6: postgresql-man.patch
|
Patch6: postgresql-man.patch
|
||||||
|
Patch7: postgresql-ppc64-gcc-workaround.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
|
BuildRequires: perl(ExtUtils::MakeMaker) glibc-devel bison flex gawk
|
||||||
@ -381,6 +382,7 @@ benchmarks.
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
# We used to run autoconf here, but there's no longer any real need to,
|
# We used to run autoconf here, but there's no longer any real need to,
|
||||||
# since Postgres ships with a reasonably modern configure script.
|
# since Postgres ships with a reasonably modern configure script.
|
||||||
@ -426,7 +428,7 @@ cd ..
|
|||||||
CFLAGS="${CFLAGS:-%optflags}"
|
CFLAGS="${CFLAGS:-%optflags}"
|
||||||
%ifarch %{power64}
|
%ifarch %{power64}
|
||||||
# See the bug #1051075, ppc64 should benefit from -O3
|
# See the bug #1051075, ppc64 should benefit from -O3
|
||||||
# CFLAGS=`echo $CFLAGS | xargs -n 1 | sed 's|-O2|-O3|g' | xargs -n 100`
|
CFLAGS=`echo $CFLAGS | xargs -n 1 | sed 's|-O2|-O3|g' | xargs -n 100`
|
||||||
%endif
|
%endif
|
||||||
# Strip out -ffast-math from CFLAGS....
|
# Strip out -ffast-math from CFLAGS....
|
||||||
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
|
CFLAGS=`echo $CFLAGS|xargs -n 1|grep -v ffast-math|xargs -n 100`
|
||||||
@ -1195,6 +1197,9 @@ make -C postgresql-setup-%{setup_version} check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 09 2018 Pavel Raiskup <praiskup@redhat.com> - 10.4-5
|
||||||
|
- re-enable -O3 for 64bit PPC boxes
|
||||||
|
|
||||||
* Tue Jul 03 2018 Petr Pisar <ppisar@redhat.com> - 10.4-4
|
* Tue Jul 03 2018 Petr Pisar <ppisar@redhat.com> - 10.4-4
|
||||||
- Perl 5.28 rebuild
|
- Perl 5.28 rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user