094c76a2bc
Fix the following musl static build failure raised because host libtool is not patched to manage "-static" as "-all-static". /home/buildroot/autobuild/instance-2/output-1/host/bin/libtool --mode=link --tag=CC /home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -static -Wall -Wextra -Wshadow -o bin/test_user \ test_user/main.lo lib/libfstrcmp.la -static chmod a+rx bin/test_prelude libtool: link: /home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/test_user test_user/main.o lib/.libs/libfstrcmp.a libtool: link: /home/buildroot/autobuild/instance-2/output-1/host/bin/arm-buildroot-linux-musleabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -Wall -Wextra -Wshadow -o bin/fstrcmp fstrcmp/main.o lib/.libs/libfstrcmp.a /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-musleabihf/10.3.0/libgcc.a(_dvmd_lnx.o): in function `__aeabi_ldiv0': /home/buildroot/autobuild/instance-2/output-1/build/host-gcc-final-10.3.0/build/arm-buildroot-linux-musleabihf/libgcc/../../../libgcc/config/arm/lib1funcs.S:1499: undefined reference to `raise' Fixes: - http://autobuild.buildroot.org/results/ffbee12f13e3d6c180d8891a428c6c490163083d Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
38 lines
1.5 KiB
Makefile
38 lines
1.5 KiB
Makefile
################################################################################
|
|
#
|
|
# fstrcmp
|
|
#
|
|
################################################################################
|
|
|
|
FSTRCMP_VERSION_MAJOR = 0.7
|
|
FSTRCMP_VERSION = $(FSTRCMP_VERSION_MAJOR).D001
|
|
FSTRCMP_SITE = https://sourceforge.net/projects/fstrcmp/files/fstrcmp/$(FSTRCMP_VERSION_MAJOR)
|
|
FSTRCMP_LICENSE = GPL-3.0+
|
|
FSTRCMP_LICENSE_FILES = LICENSE
|
|
FSTRCMP_INSTALL_STAGING = YES
|
|
FSTRCMP_DEPENDENCIES = host-libtool
|
|
FSTRCMP_CONF_ENV = LIBTOOL="$(HOST_DIR)/bin/libtool"
|
|
|
|
FSTRCMP_MAKE_OPTS = all-bin libdir/pkgconfig/fstrcmp.pc
|
|
|
|
# fstrcmp does not carry and use the usual ltmain.sh wrappers, so it does not
|
|
# inherit from our libtool patches to make -static behave like -all-static.
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
FSTRCMP_MAKE_OPTS += LDFLAGS="$(TARGET_LDFLAGS) -all-static"
|
|
endif
|
|
|
|
# We need to install the package files ourselves due to upstream trying
|
|
# to install a .lai file which is missing because of rpath removal
|
|
define FSTRCMP_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install-include
|
|
$(INSTALL) -D -m 755 $(@D)/lib/.libs/libfstrcmp.a $(STAGING_DIR)/usr/lib/libfstrcmp.a
|
|
$(INSTALL) -D -m 755 $(@D)/lib/libfstrcmp.la $(STAGING_DIR)/usr/lib/libfstrcmp.la
|
|
$(INSTALL) -D -m 755 $(@D)/libdir/pkgconfig/fstrcmp.pc $(STAGING_DIR)/usr/lib/pkgconfig/fstrcmp.pc
|
|
endef
|
|
|
|
define FSTRCMP_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m 755 $(@D)/bin/fstrcmp $(TARGET_DIR)/usr/bin/fstrcmp
|
|
endef
|
|
|
|
$(eval $(autotools-package))
|