Skip to content

Commit

Permalink
mk/compile.mk: remove absolute build time paths
Browse files Browse the repository at this point in the history
Some generated files get a __FILE_ID__ which include absolute
build time paths. Remove the paths and use plain file name.
Fixes yocto QA check.

Problem/bug:

$ strings ../image/lib/firmware/tee.elf | grep mikko
__FILE_ID__
_home_mikko_build_core_ta_pub_key_c
__FILE_ID__
_home_mikko_build_core_ldelf_hex_c
__FILE_ID__
_home_mikko_build_core_early_ta_fd02c9da_306c_48c7_a49c_bbd827ae86ee_c

With this patch:

$ strings ../image/lib/firmware/tee.elf | grep mikko
$ strings ../image/lib/firmware/tee.elf | grep FILE_ID | egrep \
"core_ta_pub_key_c|core_ldelf_hex_c|core_early_ta_fd02c9da_306c_4"
__FILE_ID__ core_ta_pub_key_c
__FILE_ID__ core_ldelf_hex_c
__FILE_ID__ core_early_ta_fd02c9da_306c_48c7_a49c_bbd827ae86ee_c

Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Jerome Forissier <[email protected]>
Signed-off-by: Mikko Rapeli <[email protected]>
  • Loading branch information
mikkorapeli-linaro authored and jforissier committed Jul 30, 2024
1 parent 773d3f8 commit 29b84ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mk/compile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ comp-cppflags-$2 = $$(filter-out $$(CPPFLAGS_REMOVE) $$(cppflags-remove) \
$$(addprefix -I,$$(incdirs-$2)) \
$$(cppflags$$(comp-sm-$2)) \
$$(cppflags-lib$$(comp-lib-$2)) $$(cppflags-$2)) \
-D__FILE_ID__=$$(subst -,_,$$(subst /,_,$$(subst .,_,$1)))
-D__FILE_ID__=$$(subst -,_,$$(subst /,_,$$(subst .,_,$$(patsubst $$(out-dir)/%,%,$1))))

comp-flags-$2 += -MD -MF $$(comp-dep-$2) -MT $$@
comp-flags-$2 += $$(comp-cppflags-$2)
Expand Down

0 comments on commit 29b84ae

Please sign in to comment.