commit | 064b4b0584a1ce50e533f3174d3e18d273febf90 | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome.forissier@linaro.org> | Wed Jul 05 15:50:03 2023 +0200 |
committer | Jérôme Forissier <jerome@forissier.org> | Thu Jul 06 11:13:46 2023 +0200 |
tree | b688039bf1605978ad8fcd6869290b1ff4aa21bd | |
parent | 9e79ffdd6792ab5489f0b8456f0cd48a04826444 [diff] |
hikey, hikey960: edk2: fix build error with GCC 11.3 EDK2 fails to build when the cross-compiler is GCC 11.3. The error is as follows: /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ‘UsbIoBulkTransfer’: /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:259:12: error: ‘UsbHcBulkTransfer’ accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=] 259 | Status = UsbHcBulkTransfer ( | ^~~~~~~~~~~~~~~~~~~~ 260 | Dev->Bus, | ~~~~~~~~~ 261 | Dev->Address, | ~~~~~~~~~~~~~ 262 | Endpoint, | ~~~~~~~~~ 263 | Dev->Speed, | ~~~~~~~~~~~ 264 | EpDesc->Desc.MaxPacketSize, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 | BufNum, | ~~~~~~~ 266 | &Data, | ~~~~~~ 267 | DataLength, | ~~~~~~~~~~~ 268 | &Toggle, | ~~~~~~~~ 269 | Timeout, | ~~~~~~~~ 270 | &Dev->Translator, | ~~~~~~~~~~~~~~~~~ 271 | UsbStatus | ~~~~~~~~~ 272 | ); | ~ /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:259:12: note: referencing argument 7 of type ‘void **’ In file included from /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h:46, from /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:16: /home/pelops2/hikey960/tee321/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h:200:1: note: in a call to function ‘UsbHcBulkTransfer’ 200 | UsbHcBulkTransfer ( | ^~~~~~~~~~~~~~~~~ ... Let's add -Wno-stringop-overflow to avoid that error. The right place for the fix would obviously be the upstream EDK2 repository [1] but since it does not seem to be maintained anymore, patching the file at build time is good enough. Reported-by: Longlong LIAO <liaoll@hku.hk> Link: https://github.com/96boards-hikey/edk2.git [1] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@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