ipvsadm: Pass build environment cflags to compiler

This helps in avoiding absolute build time paths in binaries debug info

Fixes
WARNING: ipvsadm-1.31-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/ipvsadm in package ipvsadm-dbg contains reference to TMPDIR [buildpaths]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2023-05-26 10:10:44 -07:00
parent db5e11c890
commit 3b73aba951
3 changed files with 69 additions and 3 deletions

View File

@ -0,0 +1,36 @@
From 1bc180ec333d90e1a11deff46b5639ab5d40408d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 26 May 2023 09:29:23 -0700
Subject: [PATCH] Add CCFLAGS to cflags
This is to append the flags from build environment.
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile | 1 +
libipvs/Makefile | 3 +++
2 files changed, 4 insertions(+)
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ else
CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
endif
+CFLAGS += $(CCFLAGS)
#####################################
# No servicable parts below this line
--- a/libipvs/Makefile
+++ b/libipvs/Makefile
@@ -1,6 +1,9 @@
# Makefile for libipvs
CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
+
+CFLAGS += $(CCFLAGS)
+
ifneq (0,$(HAVE_NL))
CFLAGS += -DLIBIPVS_USE_NL
CFLAGS += $(shell \

View File

@ -0,0 +1,28 @@
From 4fc59f5733d187941e9a7ce5e9ea33714d85285c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 26 May 2023 09:30:59 -0700
Subject: [PATCH] libipvs: Include missing sys/types.h
Its needed for u_intXX_t types
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libipvs/ip_vs.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libipvs/ip_vs.h b/libipvs/ip_vs.h
index 2670c23..625b6cd 100644
--- a/libipvs/ip_vs.h
+++ b/libipvs/ip_vs.h
@@ -8,6 +8,7 @@
#include <netinet/in.h>
#include <sys/socket.h>
+#include <sys/types.h>
#include <arpa/inet.h>
#include <linux/types.h> /* For __beXX types in userland */
--
2.40.1

View File

@ -20,6 +20,8 @@ SRC_URI = "https://mirrors.edge.kernel.org/pub/linux/utils/kernel/ipvsadm/${BP}.
file://0001-Modify-the-Makefile-for-cross-compile.patch \
file://0003-ipvsadm-remove-dependency-on-bash.patch \
file://makefile-add-ldflags.patch \
file://0001-Add-CCFLAGS-to-cflags.patch \
file://0001-libipvs-Include-missing-sys-types.h.patch \
"
SRC_URI[md5sum] = "f6d1707c5baf684b58fd33682d67871f"
@ -27,10 +29,10 @@ SRC_URI[sha256sum] = "1a0a5e25b5a1226435d2fb76341656f83a710183aebb0d204db39c0ec3
UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/ipvsadm"
EXTRA_OEMAKE += "CCFLAGS='${CFLAGS}'"
do_compile() {
oe_runmake \
CC="${CC} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/libnl3 -L${STAGING_LIBDIR}" \
all
oe_runmake all
}
do_install() {