kumquat-buildroot/package/noip/noip.mk
Fabrice Fontaine c5ffe830f3 package/noip: fix static build
Pass TARGET_LDFLAGS (which will contain -static) through LIBS (as
LDFLAGS is not supported) to fix the following static build failure
(e.g. with musl):

/home/autobuild/autobuild/instance-15/output-1/host/lib/gcc/microblazeel-buildroot-linux-musl/10.3.0/../../../../microblazeel-buildroot-linux-musl/bin/ld: /home/autobuild/autobuild/instance-15/output-1/host/lib/gcc/microblazeel-buildroot-linux-musl/10.3.0/libgcc.a(unwind-dw2.o): in function `__gthread_once':
/home/autobuild/autobuild/instance-15/output-1/build/host-gcc-final-10.3.0/build/microblazeel-buildroot-linux-musl/libgcc/gthr-default.h:700: undefined reference to `pthread_once'

While at it, also pass TARGET_CFLAGS through LIBS as suggested by Thomas
Petazzoni

Fixes:
 - http://autobuild.buildroot.org/results/5ea9b1b976aecc401e0aff21eef3e31c8ed17181

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Arnout: remove CPPFLAGS, already in CFLAGS]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-06-13 21:58:27 +02:00

27 lines
768 B
Makefile

################################################################################
#
# noip
#
################################################################################
NOIP_VERSION = 2.1.9
NOIP_SITE = http://www.no-ip.com/client/linux
NOIP_SOURCE = noip-duc-linux.tar.gz
NOIP_LICENSE = GPL-2.0+
NOIP_LICENSE_FILES = COPYING
# Pass TARGET_{C,LD}FLAGS through LIBS as noip doesn't rely on implicit
# make rules
define NOIP_BUILD_CMDS
$(SED) "/^#define CONFIG_FILENAME/ s/PREFIX//" $(@D)/noip2.c
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" \
LIBS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
PREFIX=/usr CONFDIR=/etc
endef
define NOIP_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/noip2 $(TARGET_DIR)/usr/sbin/noip2
endef
$(eval $(generic-package))