boot/optee-os: use dedicated 3.13.0 patch directory
authorClément Léger <clement.leger@bootlin.com>
Wed, 4 Aug 2021 10:33:53 +0000 (12:33 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 5 Aug 2021 18:56:08 +0000 (20:56 +0200)
Existing patch is for 3.13.0 optee version but is located at the root
of optee-os folder, leading to error when applying it on more recent
version. Move it to a dedicated 3.13.0 folder.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
boot/optee-os/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch [deleted file]
boot/optee-os/3.13.0/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch [new file with mode: 0644]

diff --git a/boot/optee-os/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch b/boot/optee-os/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch
deleted file mode 100644 (file)
index 0ff61dc..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 82becbadd5918ed7ad3c2b651ce479084b5feb2a Mon Sep 17 00:00:00 2001
-From: Etienne Carriere <etienne.carriere@linaro.org>
-Date: Mon, 10 May 2021 15:58:41 +0200
-Subject: core: zlib: fix build warning when _LFS64_LARGEFILE is not defined
-
-In zlib, _LFS64_LARGEFILE is expected to be a boolean directive, either
-1 (true) or 0 (false). Depending on toolchain version and directives
-build may produces warnings (as shown below with gcc 9.3) when the macro
-is not defined hence this change to default it to value 0 (false).
-
-core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
-  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-      |                                       ^~~~~~~~~~~~~~~~
-In file included from core/lib/zlib/adler32.c:9:
-core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
-  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-      |                                       ^~~~~~~~~~~~~~~~
-  CC      out/core/lib/zlib/zutil.o
-In file included from core/lib/zlib/inftrees.c:7:
-core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
-  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-      |                                       ^~~~~~~~~~~~~~~~
-In file included from core/lib/zlib/inflate.c:84:
-core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
-  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-      |                                       ^~~~~~~~~~~~~~~~
-In file included from core/lib/zlib/zutil.c:9:
-core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
-  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-      |                                       ^~~~~~~~~~~~~~~~
-
-Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
-Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
----
- core/lib/zlib/zconf.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/core/lib/zlib/zconf.h b/core/lib/zlib/zconf.h
-index 0bca18be..a7d13741 100644
---- a/core/lib/zlib/zconf.h
-+++ b/core/lib/zlib/zconf.h
-@@ -487,6 +487,11 @@ typedef uLong FAR uLongf;
- #  endif
- #endif
-+/* Other places expect _LFS64_LARGEFILE to be defined with a valid value */
-+#ifndef _LFS64_LARGEFILE
-+#define _LFS64_LARGEFILE      0
-+#endif
-+
- #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
- #  define Z_LFS64
- #endif
--- 
-2.17.1
-
diff --git a/boot/optee-os/3.13.0/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch b/boot/optee-os/3.13.0/0001-core-zlib-fix-build-warning-when-_LFS64_LARGEFILE-is.patch
new file mode 100644 (file)
index 0000000..0ff61dc
--- /dev/null
@@ -0,0 +1,56 @@
+From 82becbadd5918ed7ad3c2b651ce479084b5feb2a Mon Sep 17 00:00:00 2001
+From: Etienne Carriere <etienne.carriere@linaro.org>
+Date: Mon, 10 May 2021 15:58:41 +0200
+Subject: core: zlib: fix build warning when _LFS64_LARGEFILE is not defined
+
+In zlib, _LFS64_LARGEFILE is expected to be a boolean directive, either
+1 (true) or 0 (false). Depending on toolchain version and directives
+build may produces warnings (as shown below with gcc 9.3) when the macro
+is not defined hence this change to default it to value 0 (false).
+
+core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
+  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+      |                                       ^~~~~~~~~~~~~~~~
+In file included from core/lib/zlib/adler32.c:9:
+core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
+  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+      |                                       ^~~~~~~~~~~~~~~~
+  CC      out/core/lib/zlib/zutil.o
+In file included from core/lib/zlib/inftrees.c:7:
+core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
+  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+      |                                       ^~~~~~~~~~~~~~~~
+In file included from core/lib/zlib/inflate.c:84:
+core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
+  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+      |                                       ^~~~~~~~~~~~~~~~
+In file included from core/lib/zlib/zutil.c:9:
+core/lib/zlib/zutil.h:196:39: warning: "_LFS64_LARGEFILE" is not defined, evaluates to 0 [-Wundef]
+  196 |     (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
+      |                                       ^~~~~~~~~~~~~~~~
+
+Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
+Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
+---
+ core/lib/zlib/zconf.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/core/lib/zlib/zconf.h b/core/lib/zlib/zconf.h
+index 0bca18be..a7d13741 100644
+--- a/core/lib/zlib/zconf.h
++++ b/core/lib/zlib/zconf.h
+@@ -487,6 +487,11 @@ typedef uLong FAR uLongf;
+ #  endif
+ #endif
++/* Other places expect _LFS64_LARGEFILE to be defined with a valid value */
++#ifndef _LFS64_LARGEFILE
++#define _LFS64_LARGEFILE      0
++#endif
++
+ #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+ #  define Z_LFS64
+ #endif
+-- 
+2.17.1
+