xtest: fix build with GP_PACKAGE and GCC 14

Fix the following build error (QEMU build in this instance):

$ export GP=TEE_Initial_Configuration-Test_Suite_v2_0_0_2-2017_06_09.7z
$ make -j$(nproc) GDBSERVER=y \
    GP_PACKAGE=/home/builder/optee/$GP
[...]
/home/builder/optee/out-br/build/optee_test_ext-1.0/host/xtest/gp_10000.c: In function 'gp_test_teec_10086':
/home/builder/optee/out-br/build/optee_test_ext-1.0/host/xtest/gp/include/xml_client_api.h:162:18: error: allocation of insufficient size '0' for type 'uint8_t' {aka 'unsigned char'} with size '1' [-Werror=alloc-size]
  162 |         temp_mem = malloc(size)
      |                  ^
/home/builder/optee/out-br/build/optee_test_ext-1.0/host/xtest/gp_10000.c:1757:5: note: in expansion of macro 'AllocateTempMemory'
 1757 |     AllocateTempMemory(TEMP_MEM01, ZERO);
      |     ^~~~~~~~~~~~~~~~~~

The root cause is, when GDBSERVER=y the cross compiler is built by
Buildroot and is GCC 14, while the default one is GCC 11.3. GCC 14
reports the additional wrning/error which therefore needs to be
disabled explicitly (we don't want to change the GP test).

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
3 files changed
tree: d551bc9b9dfd9701ee762981d622e118e39c8414
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE-BSD
  11. LICENSE-GPL
  12. LICENSE.md
  13. Makefile
  14. README.md
  15. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers