kumquat-buildroot/package/bdwgc/bdwgc.mk

40 lines
1.2 KiB
Makefile
Raw Normal View History

################################################################################
#
# bdwgc
#
################################################################################
BDWGC_VERSION = 8.0.6
BDWGC_SOURCE = gc-$(BDWGC_VERSION).tar.gz
BDWGC_SITE = https://github.com/ivmai/bdwgc/releases/download/v$(BDWGC_VERSION)
BDWGC_INSTALL_STAGING = YES
BDWGC_LICENSE = bdwgc license
BDWGC_LICENSE_FILES = README.QUICK
BDWGC_CPE_ID_VENDOR = bdwgc_project
BDWGC_DEPENDENCIES = libatomic_ops host-pkgconf
HOST_BDWGC_DEPENDENCIES = host-libatomic_ops host-pkgconf
BDWGC_CONF_OPTS = CFLAGS_EXTRA="$(BDWGC_CFLAGS_EXTRA)"
ifeq ($(BR2_sparc),y)
BDWGC_CFLAGS_EXTRA += -DAO_NO_SPARC_V9
endif
ifeq ($(BR2_STATIC_LIBS),y)
BDWGC_CFLAGS_EXTRA += -DGC_NO_DLOPEN
endif
package/bdwgc: fix build without NPTL Fix the following guile build failure without NPTL raised since the addition of bdwgc in commit b0476427f6c0036b7803d591a5394923c4b07142 and https://github.com/ivmai/bdwgc/commit/7896408d4149347588ed0e36319b53bcea70115b: configure:60776: checking for GC_is_heap_ptr configure:60776: /home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu11 -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O1 -g0 -DHAVE_GC_SET_FINALIZER_NOTIFIER -DHAVE_GC_GET_HEAP_USAGE_SAFE -DHAVE_GC_GET_FREE_SPACE_DIVISOR -DHAVE_GC_SET_FINALIZE_ON_DEMAND -flto -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -latomic_ops -lgc -lpthread -ldl -latomic -lm >&5 /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-uclibcgnueabi/10.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libgc.so: undefined reference to `pthread_getattr_np' [...] In file included from ../libguile/alist.h:26, from ../libguile.h:31, from guile.c:38: ../libguile/pairs.h:205:1: error: conflicting types for 'GC_is_heap_ptr' 205 | GC_is_heap_ptr (void *ptr) | ^~~~~~~~~~~~~~ In file included from ../libguile/bdw-gc.h:48, from ../libguile/gc.h:142, from ../libguile/pairs.h:26, from ../libguile/alist.h:26, from ../libguile.h:31, from guile.c:38: /home/buildroot/autobuild/instance-2/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/gc/gc.h:551:20: note: previous declaration of 'GC_is_heap_ptr' was here 551 | GC_API int GC_CALL GC_is_heap_ptr(const void *); | ^~~~~~~~~~~~~~ Fixes: - http://autobuild.buildroot.org/results/819f231a60fc81f9a8dd07bf5411aa9d8f78c3bb Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-06-26 12:06:17 +02:00
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
BDWGC_CFLAGS_EXTRA += -DNO_PTHREAD_GETATTR_NP
endif
# Ensure we use the system libatomic_ops, and not the internal one.
BDWGC_CONF_OPTS += --with-libatomic-ops=yes
HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes
ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
BDWGC_CONF_OPTS += --enable-cplusplus
else
BDWGC_CONF_OPTS += --disable-cplusplus
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))