ipvsadm: Pass build environment cflags to compiler
PATCH 1/5 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]
--- .../ipvsadm/0001-Add-CCFLAGS-to-cflags.patch | 36 +++++++++++++++++++ ...-libipvs-Include-missing-sys-types.h.patch | 28 +++++++++++++++ .../recipes-support/ipvsadm/ipvsadm_1.31.bb | 8 +++-- 3 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Add-CCFLAGS-to-cflags.patch create mode 100644 meta-networking/recipes-support/ipvsadm/ipvsadm/0001-libipvs-Include-missing-sys-types.h.patch
meta-networking/recipes-support/ipvsadm/ipvsadm/0001-Add-CCFLAGS-to-cflags.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 1bc180ec333d90e1a11deff46b5639ab5d40408d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +--- + 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 \
meta-networking/recipes-support/ipvsadm/ipvsadm/0001-libipvs-Include-missing-sys-types.h.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 4fc59f5733d187941e9a7ce5e9ea33714d85285c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +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 <[email protected]> +--- + 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 +
meta-networking/recipes-support/ipvsadm/ipvsadm_1.31.bb +5 -3
@@ -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() {
Signature · 1 line
2.40.1
PATCH 2/5 orrery: Pass OE provided cflags
Drop Makefiles from packaging /usr/share as a result of mass copy
Fixes
WARNING: orrery-2.7-r0 do_package_qa: QA Issue: File /usr/bin/.debug/orrery in package orrery-dbg contains reference to TMPDIR [buildpaths]
--- ...instead-of-overriding-in-Makefile.am.patch | 28 +++++++++++++++++++ .../recipes-navigation/orrery/orrery_2.7.bb | 4 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch
meta-oe/recipes-navigation/orrery/orrery/0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch new file +28 -0
@@ -0,0 +1,28 @@ +From e13f15205425c67e1101031a33107fa9cd2d65f9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 26 May 2023 10:32:53 -0700 +Subject: [PATCH] Append cflags instead of overriding in Makefile.am + +Fixes +WARNING: orrery-2.7-r0 do_package_qa: QA Issue: File /usr/bin/.debug/orrery in package orrery-dbg contains reference to TMPDIR [buildpaths] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index b64449f..23637b3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-CFLAGS = -g -O3 -Wall ++CFLAGS += -g -O3 -Wall + + bin_PROGRAMS = orrery + orrery_SOURCES = planetInfo.c orrery.c orrery.h phaseConstants.h +-- +2.40.1 +
meta-oe/recipes-navigation/orrery/orrery_2.7.bb +3 -1
@@ -13,6 +13,7 @@ SRC_URI = "http://projects.openmoko.org/frs/download.php/923/orrery_2.7_clean.ta file://orrery.png \ file://use.GdkPixbuf.patch \ file://0001-orrery-Fix-sprintf-format.patch \ + file://0001-Append-cflags-instead-of-overriding-in-Makefile.am.patch \ " SRC_URI[md5sum] = "bd62a33e7554ee1030313dfcdefcda8b"
@@ -22,7 +23,7 @@ S = "${WORKDIR}/${BPN}" do_configure:prepend() { # fix DSO issue with binutils-2.22 - sed -i 's/ -lrt/ -lrt -lm/g' ${S}/Makefile.am + sed -i 's/ -lrt$/ -lrt -lm/g' ${S}/Makefile.am } do_install:append() { install -d ${D}${datadir}/orrery
@@ -30,6 +31,7 @@ do_install:append() { chown -R root:root ${D}${datadir}/orrery install -d ${D}${datadir}/icons install -m 0755 ${WORKDIR}/orrery.png ${D}${datadir}/icons + rm -rf ${D}${datadir}/orrery/Makefile* } FILES:${PN} += "${datadir}/icons/orrery.png"
Signature · 1 line
2.40.1
PATCH 3/5 libleak: Upgrade to 0.3.6
In reply to Khem RajDo not overwrite cflags when calling make on libwuya
Fixes
WARNING: libleak-1.0+gitAUTOINC+ea2bb608ae-r0 do_package_qa: QA Issue: File /usr/lib/.debug/libleak.so in package libleak-dbg contains reference to TMPDIR [buildpaths]
---
.../0001-respect-environment-variables.patch | 13 ++++++-------
.../libleak/{libleak_git.bb => libleak_0.3.6.bb} | 5 ++---
2 files changed, 8 insertions(+), 10 deletions(-)
rename meta-oe/recipes-extended/libleak/{libleak_git.bb => libleak_0.3.6.bb} (92%)meta-oe/recipes-extended/libleak/libleak/0001-respect-environment-variables.patch +6 -7
@@ -8,18 +8,17 @@ Signed-off-by: Khem Raj <[email protected]> Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/Makefile b/Makefile -index 1d70f17..c7e726e 100644 --- a/Makefile +++ b/Makefile -@@ -1,5 +1,5 @@ +@@ -1,8 +1,8 @@ -CFLAGS = -g -O2 -Wall -fPIC -Ilibwuya -LDFLAGS = -Llibwuya +CFLAGS += -g -O2 -Wall -fPIC -Ilibwuya +LDFLAGS += -Llibwuya libleak.so: libleak.o - CFLAGS='-fPIC' make -C libwuya --- -2.30.1 - +- CFLAGS='-fPIC' make -C libwuya ++ make -C libwuya + $(CC) -shared -o $@ $^ $(LDFLAGS) -lwuya -lpthread -ldl -lbacktrace + + clean:
meta-oe/recipes-extended/libleak/libleak_0.3.6.bb renamed from meta-oe/recipes-extended/libleak/libleak_git.bb +2 -3
@@ -8,13 +8,12 @@ LIC_FILES_CHKSUM = "file://README.md;beginline=18;endline=21;md5=de4f705f12cdedb DEPENDS += "libbacktrace" +PE = "1" +SRCREV = "1c56b0a2ba643db976f589ec04b246e693b6c0ce" SRC_URI = "gitsm://github.com/WuBingzheng/libleak;protocol=https;branch=master \ file://0001-respect-environment-variables.patch \ " -PV = "1.0+git${SRCPV}" -SRCREV = "ea2bb608ae25701692269a37d39d77e966b887ac" - S = "${WORKDIR}/git" do_configure () {
Signature · 1 line
2.40.1
PATCH 4/5 zeroconf: Pass cflags from environment
In reply to Khem RajFixes
WARNING: zeroconf-0.9-r1 do_package_qa: QA Issue: File /usr/sbin/.debug/zeroconf in package zeroconf-dbg contains reference to TMPDIR [buildpaths]
--- meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-networking/recipes-protocols/zeroconf/zeroconf_0.9.bb +2 -0
@@ -27,6 +27,8 @@ SRC_URI = "http://www.progsoc.org/~wildfire/zeroconf/download/${BPN}-${PV}.tar.g SRC_URI[md5sum] = "bdafb16b008ebb5633e4e581f77821d2" SRC_URI[sha256sum] = "a8c74df127753e2310fa1e072f3c9ca44a404bb0bbce9cfec7a84c6dff8bec7b" +EXTRA_OEMAKE += "CPPFLAGS='${CFLAGS}'" + do_install () { install -d ${D}${sbindir} install -d ${D}${sysconfdir}/network/if-up.d
Signature · 1 line
2.40.1
PATCH 5/5 lshw: Pass OE cflags via RPM_OPT_FLAGS
In reply to Khem RajThese flags are needed to edit absolute build paths which get encoded for debug informaiton etc.
Fixes
WARNING: lshw-02.19.2+gitAUTOINC+42fef56573-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/lshw in package lshw-dbg contains reference to TMPDIR [buildpaths]
--- meta-oe/recipes-devtools/lshw/lshw_02.19.2.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/lshw/lshw_02.19.2.bb +1 -1
@@ -29,7 +29,7 @@ PACKAGECONFIG[sqlite] = "SQLITE=1,SQLITE=0,sqlite3" PACKAGECONFIG[zlib] = "ZLIB=1,ZLIB=0,zlib gzip-native" # use the PACKAGECONFIG configurations arguments -EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS}" +EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} RPM_OPT_FLAGS='${CFLAGS}'" do_compile() { # build core only - don't ship gui
Signature · 1 line
2.40.1