[Buildroot] [PATCH v2 12/12] package/postgresql: fix BUG_85180 build timeout

Giulio Benetti giulio.benetti at micronovasrl.com
Tue May 21 13:39:32 UTC 2019


With Microblaze Gcc version < 8.x build hangs on compiling last files
before linking.
This is due to bug 85180:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180
Bug shows up building postgresql with optimization but not when building
with -O0.

If BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y force using -O0 passing it to
CFLAGS.

Fixes:
http://autobuild.buildroot.net/results/53c/53c270c696ee999d541da0b09bf6a215e5335e9a/

Signed-off-by: Giulio Benetti <giulio.benetti at micronovasrl.com>
---
 package/postgresql/postgresql.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index 067679bcbd..da49ca755e 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -93,6 +93,10 @@ else
 POSTGRESQL_CONF_OPTS += --without-systemd
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+POSTGRESQL_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
+endif
+
 define POSTGRESQL_USERS
 	postgres -1 postgres -1 * /var/lib/pgsql /bin/sh - PostgreSQL Server
 endef
-- 
2.17.1



More information about the buildroot mailing list