]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: override compiler and linker option strings
authorOleksiy Obitotskyy <oobitots@cisco.com>
Tue, 19 Jan 2021 08:33:06 +0000 (00:33 -0800)
committerVincent Bernat <vincent@bernat.ch>
Wed, 20 Jan 2021 20:49:28 +0000 (21:49 +0100)
Compiler and linker option strings contains absolute path, so
replace them with disclaimer. Thos strings used only as
debug information to show not actual compilation options.

Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
configure.ac

index 627eab45d2346febf598f8ed03031ee6ed07a273..5128569de869c1066e4bb6030867d9f2d2586012 100644 (file)
@@ -382,8 +382,16 @@ fi
 
 AX_BUILD_DATE_EPOCH(BUILD_DATE, "%FT%TZ", [BUILD_DATE="(unknown)"])
 AC_DEFINE_UNQUOTED(BUILD_DATE, "[$BUILD_DATE]", [Build date and time])
+
+dnl per reproducible-builds.org check SOURCE_DATE_EPOCH
+dnl
+if test -z "${SOURCE_DATE_EPOCH+set}" ; then
 AC_DEFINE_UNQUOTED(LLDP_CC, "[$CC $LLDP_CFLAGS $LLDP_CPPFLAGS $CFLAGS $CPPFLAGS]", [C compiler command])
 AC_DEFINE_UNQUOTED(LLDP_LD, "[$LD $LLDP_LDFLAGS $LLDP_BIN_LDFLAGS $LDFLAGS $LIBS]", [Linker compiler command])
+else
+AC_DEFINE_UNQUOTED(LLDP_CC, "[C compiler command is not available for reproducible builds]", [C compiler command])
+AC_DEFINE_UNQUOTED(LLDP_LD, "[Linker compiler command is not available for reproducible builds]", [Linker compiler command])
+fi
 
 #######################
 # Output results