Message ID | 20240521182559.5676-1-fontaine.fabrice@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/lmdb: fix CFLAGS handling | expand |
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > By passing TARGET_CONFIGURE_OPTS to make, the following usptream CFLAGS > are completely overriden: > 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 eb60c4054c25129d78651a66d1e7554aff04767f: > //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: eb60c4054c25129d78651a66d1e7554aff04767f > - http://autobuild.buildroot.org/results/d67c5a99b7d58826e544f1210fa36bb3bc180739 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Committed, thanks.
diff --git a/package/lmdb/lmdb.mk b/package/lmdb/lmdb.mk index 06c8f6bbb1..86d72e1abc 100644 --- a/package/lmdb/lmdb.mk +++ b/package/lmdb/lmdb.mk @@ -18,15 +18,21 @@ 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) $(TARGET_CONFIGURE_OPTS) -C $(@D)/libraries/liblmdb \ - ILIBS="$(LMDB_ILBIBS)" \ - XCFLAGS="$(TARGET_CFLAGS)" + $(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 \ - ILIBS="$(LMDB_ILBIBS)" \ + $(LMDB_MAKE_OPTS) \ DESTDIR="$(STAGING_DIR)" \ prefix=/usr \ install @@ -34,7 +40,7 @@ endef define LMDB_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb \ - ILIBS="$(LMDB_ILBIBS)" \ + $(LMDB_MAKE_OPTS) \ DESTDIR="$(TARGET_DIR)" \ prefix=/usr \ install
By passing TARGET_CONFIGURE_OPTS to make, the following usptream CFLAGS are completely overriden: 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 eb60c4054c25129d78651a66d1e7554aff04767f: //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: eb60c4054c25129d78651a66d1e7554aff04767f - http://autobuild.buildroot.org/results/d67c5a99b7d58826e544f1210fa36bb3bc180739 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/lmdb/lmdb.mk | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)