commit | 1e8d0b5a2b383834d09e3dfc5a9216fcef557a24 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome@forissier.org> | Wed Dec 11 15:25:39 2019 +0100 |
committer | Jérôme Forissier <jerome@forissier.org> | Tue Dec 17 16:01:33 2019 +0100 |
tree | d3a253d8c057cd6b955991bede3dc02868c2464f | |
parent | 6bbd51177d332ca5adba18f3a2547bab9a12d2ee [diff] |
hikey960: fix EDK2 build with GCC 9.x The current EDK2 code fails to build with GCC 9.x: make[3]: Entering directory '/home/jerome/work/optee_repo_hikey960/edk2/BaseTools/Source/C/GenVtf' gcc -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -O2 GenVtf.c -o GenVtf.o In file included from /usr/include/string.h:494, from ../Common/FvLib.h:21, from GenVtf.c:19: In function ‘strncpy’, inlined from ‘ConvertVersionInfo’ at GenVtf.c:132:7: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GenVtf.c: In function ‘ConvertVersionInfo’: GenVtf.c:130:14: note: length computed here 130 | Length = strlen(Str); | ^~~~~~~~~~~ In file included from /usr/include/string.h:494, from ../Common/FvLib.h:21, from GenVtf.c:19: In function ‘strncpy’, inlined from ‘CreateFitTableAndInitialize’ at GenVtf.c:1532:3: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [../Makefiles/footer.makefile:27: GenVtf.o] Error 1 This error was found with Ubuntu 19.10 (comes with GCC 9.2.1). The HiKey960 EDK2 repository [1] has not received any update in the past year, I am not sure it is still maintained. There is apparently some support for HiKey960 in the upstream EDK2 repositories [2] and [3], but I could not get my board to boot with upstream code. So, a quick fix seems in order. [1] https://github.com/96boards-hikey/edk2.git [2] https://github.com/tianocore/edk2.git [3] https://github.com/tianocore/edk2-platforms.git Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Victor Chong <victor.chong@linaro.org>
This git contains makefiles etc to be able to build a full OP-TEE developer setup for the OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io. The pages that used to be here in this git can be found under build and Device specific information at he new location for the OP-TEE documentation.
// OP-TEE core maintainers