summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-04-28 13:38:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-01 22:46:42 +0100
commit20335cd89001f5fb159f5f1b0c3bd5e40b8b2fb5 (patch)
tree2f760bc06c9390a57015a4d1e6842b8ed74ebd07
parent972c50d6e46ee9dfba8b8ea3867ebdbf24001e6e (diff)
downloadopenembedded-core-20335cd89001f5fb159f5f1b0c3bd5e40b8b2fb5.tar.gz
reproducible_build.bbclass: Enable -Wdate-time
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>
-rw-r--r--meta/classes/reproducible_build.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/reproducible_build.bbclass b/meta/classes/reproducible_build.bbclass
index f06e00d70d..9337d791e8 100644
--- a/meta/classes/reproducible_build.bbclass
+++ b/meta/classes/reproducible_build.bbclass
@@ -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"