Skip to content

Fallthorugh definition within OP-TEE 3.11-rc1 breaks fTPM compilation #33

@Emantor

Description

@Emantor

OP-TEE introduced a #define fallthrough which is included in OP-TEE 3.11.0-rc1.
However this clashes with WolfSSL, leading to a compilation error:

| /home/phoenix/build/YOCTO.BSP-Pengutronix-Labgrid/build/tmp/work/cortexa7hf-neon-oe-linux-gnueabi/ms-ftpm-ref/1.0+gitAUTOINC+81abeb9fa9-r0/recipe-sysroot/usr/include/optee/export-user_ta/include/compiler.h:257:21: error: expected ')' before '__attribute__'
|   257 | #define fallthrough __attribute__((__fallthrough__))
|       |                     ^~~~~~~~~~~~~
| ./lib/wolf/wolf_symlink/wolfssl/wolfcrypt/types.h:184:50: note: in expansion of macro 'fallthrough'
|   184 |             #define FALL_THROUGH __attribute__ ((fallthrough));
|       |                                                  ^~~~~~~~~~~
| lib/wolf/wolf_symlink/wolfcrypt/src/asn.c:5062:9: note: in expansion of macro 'FALL_THROUGH'
|  5062 |         FALL_THROUGH;
|       |         ^~~~~~~~~~~~
| In file included from ./lib/wolf/wolf_symlink/wolfssl/wolfcrypt/asn.h:26,
|                  from lib/wolf/wolf_symlink/wolfcrypt/src/asn.c:53:
| ./lib/wolf/wolf_symlink/wolfssl/wolfcrypt/types.h:184:62: error: expected identifier or '(' before ')' token
|   184 |             #define FALL_THROUGH __attribute__ ((fallthrough));
|       |                                                              ^
| lib/wolf/wolf_symlink/wolfcrypt/src/asn.c:5062:9: note: in expansion of macro 'FALL_THROUGH'
|  5062 |         FALL_THROUGH;
|       |         ^~~~~~~~~~~~
| make[1]: *** [/home/phoenix/build/YOCTO.BSP-Pengutronix-Labgrid/build/tmp/work/cortexa7hf-neon-oe-linux-gnueabi/ms-ftpm-ref/1.0+gitAUTOINC+81abeb9fa9-r0/recipe-sysroot/usr/include/optee/export-user_ta/mk/compile.mk:159: ../out/AuthVars/./lib/wolf/wolf_symlink/wolfcrypt/src/asn.o] Error 1
| make[1]: Leaving directory '/home/phoenix/build/YOCTO.BSP-Pengutronix-Labgrid/build/tmp/work/cortexa7hf-neon-oe-linux-gnueabi/ms-ftpm-ref/1.0+gitAUTOINC+81abeb9fa9-r0/git/TAs/optee_ta/AuthVars'
| make: *** [Makefile:9: authvars] Error 2
| WARNING: exit code 1 from a shell command.

Relevant PR in OP-TEE can be found here: OP-TEE/optee_os#4125

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions