bdwgc: update bdw-gc.pc to fix link with guile
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 6 Nov 2018 19:27:34 +0000 (20:27 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 7 Nov 2018 22:06:32 +0000 (23:06 +0100)
commit406f70416ea464a8b39922d54ae30f8e676a329b
tree6de542ff1ac992464426b3b07a454b1dc0d61cf9
parent955df7463b0747620b744e19a78cfc84e1c99965
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>
package/bdwgc/0001-fix-link-with-of-bdw-gc-with-a-system-atomic_ops.patch [new file with mode: 0644]
package/bdwgc/bdwgc.mk