Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-tree TAs: prevent double slash in object paths #2485

Merged
merged 1 commit into from
Aug 6, 2018

Conversation

jforissier
Copy link
Contributor

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: #2484
Signed-off-by: Jerome Forissier jerome.forissier@linaro.org

@jforissier jforissier mentioned this pull request Aug 3, 2018
@glneo
Copy link
Contributor

glneo commented Aug 3, 2018

Tested-by: Andrew F. Davis <afd@ti.com>

@jbech-linaro
Copy link
Contributor

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

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: OP-TEE#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>
@jforissier jforissier merged commit ca7065c into OP-TEE:master Aug 6, 2018
@jforissier jforissier deleted the fix-make-clean branch August 6, 2018 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants