mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 08:14:09 -09:00
Adding PKGLIBDIR to CFLAGS was necessary to fix the following error
raised during the compilation of the new version:
execute.c: In function ‘set_environ’:
execute.c:107:48: error: ‘PKGLIBDIR’ undeclared (first use in this function)
107 | *ppch++ = setlocalenv("%s=%s", "PATH", PKGLIBDIR ":/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin");
| ^~~~~~~~~
execute.c:107:48: note: each undeclared identifier is reported only once for each function it appears in
execute.c:107:57: error: expected ‘)’ before string constant
107 | *ppch++ = setlocalenv("%s=%s", "PATH", PKGLIBDIR ":/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin");
This PKGLIBDIR define was added upstream in commit [1] in the Makefile
default CFLAGS, but since Buildroot redefines those it needs to be added
back.
Release notes since 0.8.41:
https://salsa.debian.org/debian/ifupdown/-/blob/master/debian/changelog#L1
[1] 1eee7a3040
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
37 lines
1.1 KiB
Makefile
37 lines
1.1 KiB
Makefile
################################################################################
|
|
#
|
|
# ifupdown
|
|
#
|
|
################################################################################
|
|
|
|
IFUPDOWN_VERSION = 0.8.44
|
|
IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
|
|
IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20240917T144520Z/pool/main/i/ifupdown
|
|
IFUPDOWN_LICENSE = GPL-2.0+
|
|
IFUPDOWN_LICENSE_FILES = COPYING
|
|
IFUPDOWN_CPE_ID_VENDOR = debian
|
|
|
|
define IFUPDOWN_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
|
CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -D'PKGLIBDIR=\"/lib/ifupdown\"' -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
|
|
ARCH=linux \
|
|
-C $(@D)
|
|
endef
|
|
|
|
# install doesn't overwrite
|
|
define IFUPDOWN_INSTALL_TARGET_CMDS
|
|
$(RM) $(TARGET_DIR)/sbin/{ifdown,ifquery}
|
|
$(TARGET_MAKE_ENV) $(MAKE) BASEDIR=$(TARGET_DIR) -C $(@D) install
|
|
endef
|
|
|
|
# We need to switch from /bin/ip to /sbin/ip
|
|
IFUPDOWN_DEFN_FILES = can inet inet6 ipx link meta
|
|
define IFUPDOWN_MAKE_IP_IN_SBIN
|
|
for f in $(IFUPDOWN_DEFN_FILES) ; do \
|
|
$(SED) 's,/bin/ip,/sbin/ip,' $(@D)/$$f.defn ; \
|
|
done
|
|
endef
|
|
IFUPDOWN_POST_PATCH_HOOKS += IFUPDOWN_MAKE_IP_IN_SBIN
|
|
|
|
$(eval $(generic-package))
|