toolchain-external: fix rebuild/reinstall for Linaro toolchains
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 29 Apr 2015 10:28:19 +0000 (12:28 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 May 2015 14:30:13 +0000 (16:30 +0200)
commit22a59e1bc2cf8040fc22facbd70e6c3fb5b72981
tree0f674f8d12c0d4a068a897585c17b7f8f430f467
parent4cc236784e5783fef0fd7bf9437e55a38cc8c291
toolchain-external: fix rebuild/reinstall for Linaro toolchains

For Linaro toolchains, a special post install staging hook is used to
create two symlinks needed for the dynamic loader to find the
libraries. However, the way the link is created prevents a 'make
toolchain-external-reinstall' from succeeding, because the symlink
already exists and points to a directory:

ln -sf . /home/thomas/projets/outputs/training/target/lib/arm-linux-gnueabihf
ln: '/home/thomas/projets/outputs/training/target/lib/arm-linux-gnueabihf/.': cannot overwrite directory

This commit adjust the hook to pass the '-n' option so that the link
name is treated as a normal file if it is a symbolic link to a
directory.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
toolchain/toolchain-external/toolchain-external.mk