new file mode 100644
@@ -0,0 +1,29 @@
+From 5b1b04356f3efc08ae279cafc6ee86df11f10c9a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 15 Aug 2024 23:13:02 -0700
+Subject: [PATCH] configure.ac: Do not emit compiler flags into object files
+
+They contain options which have absolute paths in them e.g. --sysroot
+therefore do not record them and make build reproducible
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fae16f1..677b94a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -904,8 +904,7 @@ if test "$enable_hardening" != no; then
+ "-Wp,-D_FORTIFY_SOURCE=2" \
+ "-fexceptions" \
+ "-fstack-protector-strong" \
+- "--param=ssp-buffer-size=4" \
+- "-grecord-gcc-switches"
++ "--param=ssp-buffer-size=4"
+ do
+ AC_MSG_CHECKING([for $FLAG support])
+ CFLAGS="$CFLAGS $FLAG"
@@ -11,6 +11,7 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "http://www.keepalived.org/software/${BP}.tar.gz \
+ file://0001-configure.ac-Do-not-emit-compiler-flags-into-object-.patch \
"
SRC_URI[sha256sum] = "85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6"
UPSTREAM_CHECK_URI = "https://github.com/acassen/keepalived/releases"
@@ -30,6 +31,10 @@ EXTRA_OEMAKE = "initdir=${sysconfdir}/init.d"
export EXTRA_CFLAGS = "${CFLAGS}"
+do_configure:append() {
+ sed -i -e 's|${WORKDIR}|<scrubbed>|g' ${B}/lib/config.h
+}
+
do_install:append() {
if [ -f ${D}${sysconfdir}/init.d/${BPN} ]; then
chmod 0755 ${D}${sysconfdir}/init.d/${BPN}