Home
last modified time | relevance | path

Searched hist:ca7065cbd4a2c2c2971a8cddca0c9b04639f23ef (Results 1 – 1 of 1) sorted by relevance

/optee_os/ta/mk/
H A Dbuild-user-ta.mkca7065cbd4a2c2c2971a8cddca0c9b04639f23ef Fri Aug 03 19:45:33 UTC 2018 Jerome Forissier <jerome.forissier@linaro.org> In-tree TAs: prevent double slash in object paths

When processing the source files for an in-tree user TA (ta/*/user_ta.mk),
make sure not to insert a double slash in the object file path.

Fixes the following error:

$ make -s
$ make clean
CLEAN out/arm-plat-vexpress
rmdir: failed to remove 'out/arm-plat-vexpress/ta/avb': No such file or directory
Makefile:98: recipe for target 'clean' failed
make: *** [clean] Error 1

The error results from the fact that we have two kinds of object files in
the in-tree TAs:
- The object files built from ta/*/user_ta.mk. For AVB, we have
out/arm-plat-vexpress/ta/avb//entry.o (notice the repeated slash).
- The object files that correspond to "specified source files", i.e.,
constructed from $(spec-out-dir) and $(spec-srcs). For AVB we have
out/arm-plat-vexpress/ta/avb/user_ta_header.o.
When "make clean" creates the list of directories to be removed, it strips
the /filename part and keeps only the directory part, resulting in:

rmdir ... out/arm-plat-vexpress/ta/avb/ out/arm-plat-vexpress/ta/avb

Trying to remove the same directory twice: "No such file or directory".

Fixes: https://github.com/OP-TEE/optee_os/issues/2484
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>