summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/isp-imx
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2021-06-14 10:32:57 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2021-06-14 14:38:13 -0300
commitedab505893d3d8512cf59e6603160bbf36f55d69 (patch)
treeffe2de51f9fa01facca43cac5a4b5f7c8d00b3b8 /recipes-bsp/isp-imx
parenta0ded7c19dc1ae1f55c75bc39004a17e48d6a333 (diff)
downloadmeta-freescale-edab505893d3d8512cf59e6603160bbf36f55d69.tar.gz
isp-imx: fix compiler error with __DATE__, __TIME__
With reproducible build enabled the compiler is configured to throw an error if __TIME__, __DATE__ preprocessor macros are used, replace them. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp/isp-imx')
-rw-r--r--recipes-bsp/isp-imx/isp-imx/0001-isp-imx-drop-use-of-__TIME__-__DATE__.patch72
-rw-r--r--recipes-bsp/isp-imx/isp-imx_4.2.2.11.0.bb6
2 files changed, 76 insertions, 2 deletions
diff --git a/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-drop-use-of-__TIME__-__DATE__.patch b/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-drop-use-of-__TIME__-__DATE__.patch
new file mode 100644
index 00000000..d8d12267
--- /dev/null
+++ b/recipes-bsp/isp-imx/isp-imx/0001-isp-imx-drop-use-of-__TIME__-__DATE__.patch
@@ -0,0 +1,72 @@
1From accaeb1ae77eb40b89e70df3efcb00d0dc2af758 Mon Sep 17 00:00:00 2001
2From: Max Krummenacher <max.krummenacher@toradex.com>
3Date: Mon, 14 Jun 2021 08:20:48 +0000
4Subject: [PATCH] isp-imx: drop use of __TIME__, __DATE__
5
6With reproducible build enabled the compiler is configured to throw
7an error if __TIME__, __DATE__ preprocessor macros are used.
8
9| isp-imx-4.2.2.11.0/mediacontrol/daemon/main_v4l2.cpp:99:44: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
10| 99 | std::cout << "Build Time : "<<__DATE__<<", "<<__TIME__<<std::endl;
11| | ^~~~~~~~
12
13Fix this by replacing __DATE__, __TIME__ with BUILD_DATE and setting
14BUILD_DATE from CMakeLists.txt to either SOURCE_DATE_EPOCH if present
15or the local time otherwise.
16
17Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
18---
19 mediacontrol/CMakeLists.txt | 3 +++
20 mediacontrol/daemon/main_v4l2.cpp | 8 ++++----
21 2 files changed, 7 insertions(+), 4 deletions(-)
22
23diff --git a/mediacontrol/CMakeLists.txt b/mediacontrol/CMakeLists.txt
24index 48cd7633e..f587758e0 100755
25--- a/mediacontrol/CMakeLists.txt
26+++ b/mediacontrol/CMakeLists.txt
27@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1.0)
28
29 project(ISP_MEDIA_CONTROL)
30
31+string(TIMESTAMP BUILD_DATE "%b %d %Y" UTC)
32+add_compile_definitions(BUILD_DATE="${BUILD_DATE}")
33+
34 if( NOT DEFINED APPSHELL_TOP_COMPILE)
35 if(DEFINED PLATFORM)
36 if(${PLATFORM} STREQUAL ARM64)
37diff --git a/mediacontrol/daemon/main_v4l2.cpp b/mediacontrol/daemon/main_v4l2.cpp
38index a3033cf83..d08dee127 100644
39--- a/mediacontrol/daemon/main_v4l2.cpp
40+++ b/mediacontrol/daemon/main_v4l2.cpp
41@@ -96,7 +96,7 @@ int main(int argc, char* argv[]) {
42 if (argc == 2){
43 if(!(string2Version.find(argv[1])==string2Version.end())){
44 std::cout << "Version : "<<MEDIA_SERVER_VERSION<<std::endl;
45- std::cout << "Build Time : "<<__DATE__<<", "<<__TIME__<<std::endl;
46+ std::cout << "Build Time : "<<BUILD_DATE<<std::endl;
47 return 0;
48 }
49 }
50@@ -105,8 +105,8 @@ int main(int argc, char* argv[]) {
51 if(fd_running >= 0)
52 {
53 ALOGI("******************************************************************");
54- ALOGI("VIV ISP Media Control Framework V%s (%s, %s)",
55- MEDIA_SERVER_VERSION, __DATE__, __TIME__);
56+ ALOGI("VIV ISP Media Control Framework V%s (%s)",
57+ MEDIA_SERVER_VERSION, BUILD_DATE);
58 ALOGI("******************************************************************\n");
59
60 if (argc < 2) {
61@@ -123,7 +123,7 @@ int main(int argc, char* argv[]) {
62 while( i < argc ){
63 if(!(string2Version.find(argv[i])==string2Version.end())){
64 std::cout << "Version : "<<MEDIA_SERVER_VERSION<<std::endl;
65- std::cout << "Build Time : "<<__DATE__<<", "<<__TIME__<<std::endl;
66+ std::cout << "Build Time : "<<BUILD_DATE<<std::endl;
67 i++;
68 continue;
69 }
70--
712.20.1
72
diff --git a/recipes-bsp/isp-imx/isp-imx_4.2.2.11.0.bb b/recipes-bsp/isp-imx/isp-imx_4.2.2.11.0.bb
index 3d25229f..3c717c8d 100644
--- a/recipes-bsp/isp-imx/isp-imx_4.2.2.11.0.bb
+++ b/recipes-bsp/isp-imx/isp-imx_4.2.2.11.0.bb
@@ -5,8 +5,10 @@ LICENSE = "Proprietary"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3c3fe2b904fd694f28d2f646ee16dddb" 5LIC_FILES_CHKSUM = "file://COPYING;md5=3c3fe2b904fd694f28d2f646ee16dddb"
6DEPENDS = "python3 libdrm virtual/libg2d" 6DEPENDS = "python3 libdrm virtual/libg2d"
7 7
8SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true \ 8SRC_URI = " \
9 file://0001-start_isp.sh-fix-test-to-be-generic.patch \ 9 ${FSL_MIRROR}/${BP}.bin;fsl-eula=true \
10 file://0001-start_isp.sh-fix-test-to-be-generic.patch \
11 file://0001-isp-imx-drop-use-of-__TIME__-__DATE__.patch \
10" 12"
11 13
12SRC_URI[md5sum] = "75f79ba556c47172b9a0cbc3a877e604" 14SRC_URI[md5sum] = "75f79ba556c47172b9a0cbc3a877e604"