From 987988cee5aa6e934df7bee0d58ec5a23fffcc5f Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 26 Apr 2022 19:15:59 +0200 Subject: [PATCH] package/libpri: fix static build pritest, rosetest and testprilib needs a static library and pridump needs a dynamic library resulting in the following static build failure since the addition of the package in commit a77f356b78f9134227f9702a1eb09c3203c42d88: /home/autobuild/autobuild/instance-15/output-1/host/bin/aarch64_be-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -static -fPIC -MD -MT pridump.o -MF .pridump.o.d -MP -c -o pridump.o pridump.c /home/autobuild/autobuild/instance-15/output-1/host/bin/aarch64_be-buildroot-linux-uclibc-gcc -static -shared -Wl,-hlibpri.so.1.4 -o libpri.so.1.4 copy_string.o pri.o q921.o prisched.o q931.o pri_aoc.o pri_cc.o pri_facility.o asn1_primitive.o rose.o rose_address.o rose_etsi_aoc.o rose_etsi_cc.o rose_etsi_diversion.o rose_etsi_ect.o rose_etsi_mwi.o rose_other.o rose_q931.o rose_qsig_aoc.o rose_qsig_cc.o rose_qsig_ct.o rose_qsig_diversion.o rose_qsig_mwi.o rose_qsig_name.o version.o /home/autobuild/autobuild/instance-15/output-1/host/lib/gcc/aarch64_be-buildroot-linux-uclibc/10.3.0/../../../../aarch64_be-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-15/output-1/host/aarch64_be-buildroot-linux-uclibc/sysroot/lib/../lib64/libc.a(__uClibc_main.os): in function `__uClibc_fini': __uClibc_main.c:(.text+0xd0): undefined reference to `__fini_array_start' Fixes: - http://autobuild.buildroot.org/results/1217922af3a72646ae242c2c4dec22ead7883b91 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/libpri/libpri.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libpri/libpri.mk b/package/libpri/libpri.mk index e1fa2abcf5..34d84393c4 100644 --- a/package/libpri/libpri.mk +++ b/package/libpri/libpri.mk @@ -17,6 +17,7 @@ LIBPRI_INSTALL_STAGING = YES # So we need to explicitly build only what we can. ifneq ($(BR2_SHARED_LIBS),y) LIBPRI_LIBS = libpri.a +LIBPRI_UTILS += pritest rosetest testprilib define LIBPRI_INSTALL_A $(INSTALL) -D -m 0644 $(@D)/libpri.a $(1)/usr/lib/libpri.a endef @@ -24,14 +25,13 @@ endif ifneq ($(BR2_STATIC_LIBS),y) LIBPRI_LIBS += libpri.so.1.4 +LIBPRI_UTILS += pridump define LIBPRI_INSTALL_SO $(INSTALL) -D -m 0644 $(@D)/libpri.so.1.4 $(1)/usr/lib/libpri.so.1.4 ln -sf libpri.so.1.4 $(1)/usr/lib/libpri.so endef endif -LIBPRI_UTILS = pridump pritest rosetest testprilib - define LIBPRI_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) \