kumquat-buildroot/package/bdwgc/bdwgc.mk
Fabrice Fontaine 406f70416e bdwgc: update bdw-gc.pc to fix link with guile
When bdw-gc is linked with libatomic_ops, bdw-gc.pc must contain the
needed libraries (such as -latomic_ops) otherwise build of applications
such as guile will fail on link stage:

.libs/libguile_2.0_la-posix.o: In function `scm_tmpnam':
posix.c:(.text+0x2080): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
  CCLD     guile
/home/buildroot/autobuild/run/instance-2/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libgc.so: undefined reference to `AO_fetch_compare_and_swap_emulation'
/home/buildroot/autobuild/run/instance-2/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib/libgc.so: undefined reference to `AO_store_full_emulation'

So set ATOMIC_OPS_LIBS to -latomic_ops when a system atomic_ops library
is used and use ATOMIC_OPS_LIBS in bdw-gc.pc.in

Fixes:
 - http://autobuild.buildroot.org/results/2b23d445e57a5e0f417f5cb9417b0a668bb7bf1c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-11-07 23:06:32 +01:00

38 lines
1.1 KiB
Makefile

################################################################################
#
# bdwgc
#
################################################################################
BDWGC_VERSION = 8.0.0
BDWGC_SOURCE = gc-$(BDWGC_VERSION).tar.gz
BDWGC_SITE = http://www.hboehm.info/gc/gc_source
BDWGC_INSTALL_STAGING = YES
BDWGC_LICENSE = bdwgc license
BDWGC_LICENSE_FILES = README.QUICK
BDWGC_DEPENDENCIES = libatomic_ops host-pkgconf
HOST_BDWGC_DEPENDENCIES = host-libatomic_ops host-pkgconf
# We're patching configure.ac
BDWGC_AUTORECONF = YES
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
# 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))