]> code.ossystems Code Review - openembedded-core.git/commitdiff
reproducible_build.bbclass: Enable -Wdate-time
authorKhem Raj <raj.khem@gmail.com>
Wed, 28 Apr 2021 20:38:13 +0000 (13:38 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 May 2021 21:46:42 +0000 (22:46 +0100)
This will help identifying packages using __TIME__, __DATE__ and
__TIMESTAMP__ macros in code, its a warning from the compiler and the
packages which use -Werror will break the build with this and where they
don't we will atleast have a warning in the build logs

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/reproducible_build.bbclass

index f06e00d70d7eaf0f8ddc3aa6615d79b549e64c94..9337d791e8c5d74670c7f4ea220cbc412144aa59 100644 (file)
@@ -41,6 +41,9 @@ SDE_DIR = "${WORKDIR}/source-date-epoch"
 SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
 SDE_DEPLOYDIR = "${WORKDIR}/deploy-source-date-epoch"
 
+# Enable compiler warning when the __TIME__, __DATE__ and __TIMESTAMP__ macros are used.
+TARGET_CC_ARCH_append_class-target = " -Wdate-time"
+
 # A SOURCE_DATE_EPOCH of '0' might be misinterpreted as no SDE
 export SOURCE_DATE_EPOCH_FALLBACK ??= "1302044400"