POSTGRESQL_INSTALL_STAGING = YES
POSTGRESQL_CONFIG_SCRIPTS = pg_config
+# In most cases, postgresql configure script is able to guess the
+# platform, except for noMMU platforms that use the 'uclinux' host
+# qualifier, as is the case on Blackfin
+POSTGRESQL_CONF_OPTS = --with-template=linux
+
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# overwrite IPV6 detection
ifeq ($(BR2_INET_IPV6),y)
POSTGRESQL_CONF_OPTS += --disable-thread-safety
endif
-ifeq ($(BR2_microblazeel)$(BR2_microblazebe)$(BR2_nios2)$(BR2_xtensa),y)
+ifeq ($(BR2_bfin)$(BR2_microblazeel)$(BR2_microblazebe)$(BR2_nios2)$(BR2_xtensa),y)
POSTGRESQL_CONF_OPTS += --disable-spinlocks
endif