kumquat-buildroot/package/lmdb/lmdb.mk
Fabrice Fontaine 8b16603aa9 package/lmdb: fix CFLAGS handling
By passing TARGET_CONFIGURE_OPTS to make, the following usptream CFLAGS
are completely overridden:

CFLAGS	= $(THREADS) $(OPT) $(W) $(XCFLAGS)

As a result, setting XCFLAGS is a no-op and -pthread is not passed
resulting in the following build failure since the addition of the
package in commit eb60c4054c:

//binhome//.buildroot.//autobuildlib//rungcc//instancepowerpc64--3buildroot/-outputlinux--1gnu//host9.3.0//opt./.ext/-.toolchain.//bin./../../.lib//powerpc64gcc-/buildrootpowerpc64--linuxbuildroot--gnulinux/-bingnu//ld9.3.0:/ .mdb.c.:/(...text/+.0x1a44.)/:. .undefined/ powerpc64reference- buildrootto `pthread_setspecific'

Fixes: eb60c4054c
 - http://autobuild.buildroot.org/results/d67c5a99b7d58826e544f1210fa36bb3bc180739

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-05-24 14:51:47 +02:00

50 lines
1.2 KiB
Makefile

################################################################################
#
# lmdb
#
################################################################################
LMDB_VERSION = 0.9.31
LMDB_SITE = $(call github,LMDB,lmdb,LMDB_$(LMDB_VERSION))
LMDB_LICENSE = OLDAP-2.8
LMDB_LICENSE_FILES = libraries/liblmdb/LICENSE
LMDB_INSTALL_STAGING = YES
ifeq ($(BR2_STATIC_LIBS),y)
LMDB_ILBIBS += liblmdb.a
else ifeq ($(BR2_SHARED_LIBS),y)
LMDB_ILBIBS += liblmdb.so
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
LMDB_ILBIBS += liblmdb.a liblmdb.so
endif
LMDB_MAKE_OPTS += \
AR="$(TARGET_AR)" \
CC="$(TARGET_CC)" \
ILIBS="$(LMDB_ILBIBS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
OPT="" \
XCFLAGS="$(TARGET_CFLAGS)"
define LMDB_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb $(LMDB_MAKE_OPTS)
endef
define LMDB_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb \
$(LMDB_MAKE_OPTS) \
DESTDIR="$(STAGING_DIR)" \
prefix=/usr \
install
endef
define LMDB_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb \
$(LMDB_MAKE_OPTS) \
DESTDIR="$(TARGET_DIR)" \
prefix=/usr \
install
endef
$(eval $(generic-package))