c19cca0452
Now that we document _CPE_ID_VALID, and that it shall be used instead of setting a default value to one of the other _CPE_ID_* variables, change all of the existing packages to use it, to avoid any error when we later extend check-package to validate the sanity ofthe _CPE_ID_* variables. Mechanical change done within the reference container, running the new check in check-package, to report the CPE_ID errors: $ make check-package 2>/dev/null \ |awk '{ split($(1), a, ":"); fname = a[1] split($(2), a, "'\''"); val = a[2] new_var = $(8); gsub("_CPE_ID_.*", "_CPE_ID_VALID", new_var) printf("%s %s %s %s\n", fname, $(8), val, new_var) }' \ |while read fname var val new_var; do sed -r -i -e "s/${var}[[:space:]]*=[[:space:]]*${val}/${new_var} = YES/" "${fname}" done $ git diff -I'CPE_ID_(VENDOR|VALID)' [empty] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
49 lines
1.7 KiB
Makefile
49 lines
1.7 KiB
Makefile
################################################################################
|
|
#
|
|
# libbpf
|
|
#
|
|
################################################################################
|
|
|
|
LIBBPF_VERSION = 1.1.0
|
|
LIBBPF_SITE = $(call github,libbpf,libbpf,v$(LIBBPF_VERSION))
|
|
LIBBPF_LICENSE = GPL-2.0, LGPL-2.1, BSD-2-Clause
|
|
LIBBPF_LICENSE_FILES = LICENSE LICENSE.BSD-2-Clause LICENSE.LGPL-2.1
|
|
LIBBPF_CPE_ID_VALID = YES
|
|
LIBBPF_DEPENDENCIES = host-bison host-flex host-pkgconf elfutils zlib
|
|
HOST_LIBBPF_DEPENDENCIES = host-bison host-flex host-pkgconf host-elfutils host-zlib
|
|
LIBBPF_INSTALL_STAGING = YES
|
|
|
|
define LIBBPF_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
|
-C $(@D)/src
|
|
endef
|
|
|
|
# bpf/bpf.h installed by libbpf uses bpf_iter_link_info that was added since
|
|
# kernel 5.9, so we need to update some uapi headers in STAGING_DIR if the
|
|
# toolchain is build with linux-headers < 5.9.
|
|
# Otherwise bpf/bpf.h is broken due to out of date linux/bpf.h installed by the
|
|
# toolchain.
|
|
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a5cbe05a6673b85bed2a63ffcfea6a96c6410cff
|
|
ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_9),)
|
|
LIBBPF_UPDATE_UAPI_HEADERS = install_uapi_headers
|
|
endif
|
|
|
|
define LIBBPF_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
|
-C $(@D)/src install $(LIBBPF_UPDATE_UAPI_HEADERS) \
|
|
DESTDIR=$(STAGING_DIR)
|
|
endef
|
|
|
|
define LIBBPF_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
|
|
-C $(@D)/src install DESTDIR=$(TARGET_DIR)
|
|
endef
|
|
|
|
define HOST_LIBBPF_INSTALL_CMDS
|
|
$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
|
|
-C $(@D)/src install install_uapi_headers DESTDIR=$(HOST_DIR)
|
|
endef
|
|
|
|
$(eval $(generic-package))
|
|
$(eval $(host-generic-package))
|