OP-TEE / optee_os

Trusted side of the TEE
Other
1.51k stars 1.03k forks source link

checkconf.mk: do not use full path to generate guard symbol in conf.h #6880

Closed Villemoes closed 2 weeks ago

Villemoes commented 3 weeks ago

The combination of building with -g3 (which emits definitions of all defined preprocessor macros to the debug info) and using a full path to define the name of this preprocessor guard means that the output is not binary reproducible across different build hosts. For example, in my Yocto build, the string

__home_ravi_yocto_tmp_glibc_work_stm32mp135fdk_oe_linux_gnueabi_optee_os_stm32mp_3_19_0_stm32mp_r1_1_build_stm32mp135f_dk_include_generated_confh

appears in several build artifacts. Another developer or buildbot would not build in some /home/ravi/... directory.

In order to increase binary reproducibility, only use the path sans the $(out-dir)/ prefix of the conf.h file.

Villemoes commented 2 weeks ago

Thanks. Should I ignore the failing CI test which just complains about the overly long line? That very line is a pretty significant part of the commit log and can for obvious reasons not be broken.

jforissier commented 2 weeks ago

@Villemoes the CI error can be ignored, as you said it makes sense to keep the long line. Please apply Jens' Reviewed-by and I will merge this. Thank you!

jforissier commented 2 weeks ago

It seems that trustedfirmware.org is unreliable (CI shows Git clone errors). I'll restart the jobs again and consider using the GitHub mirror instead.