]> xenbits.xensource.com Git - xtf.git/commit
Fix issue with clang --target when cross compiling using LLVM
authorMichal Orzel <michal.orzel@arm.com>
Wed, 5 May 2021 06:34:16 +0000 (08:34 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 6 May 2021 14:21:05 +0000 (15:21 +0100)
commit880092854e5473558af77289bb7c01a9fa9dda5a
tree02dcddad7d0408d5b1ec8c4307cc72540b3ea11d
parent2cf3168661355565e2b80395ef16c5ee3cfc5f55
Fix issue with clang --target when cross compiling using LLVM

When using LLVM and cross compiling, the CC expands to:
clang --target=<target_triple>
Example of target triple: aarch64-linux-gnu.

However the current code assigning --target based on the
cross compiler does not work if we pass the full path to
CROSS_COMPILE. In this case the build fails.

Fix the issue so that when cross compiling using LLVM
only the basename of cross compiler path is used.

Closes #2

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Makefile