Define TARGET_CPUARCH and use in libclang_rt as the basis for CRTARCH

When cross-compiling, the wrong architecture was being embedded in the
libclang_rt binary filenames. It should be based on TARGET_ARCH (target), not
MACHINE_ARCH (host).

This is a draft commit against my project branch. Will fix on ^/head soon.

PR:	222925
This commit is contained in:
Enji Cooper 2017-10-22 21:34:37 +00:00
parent 48c54cbc90
commit 69735ece08
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/runtime-coverage/; revision=324873
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
.include <src.opts.mk>
CRTARCH= ${MACHINE_CPUARCH:C/amd64/x86_64/}
CRTARCH= ${TARGET_CPUARCH:C/amd64/x86_64/}
CRTSRC= ${SRCTOP}/contrib/compiler-rt
.PATH: ${CRTSRC}/lib

View File

@ -15,6 +15,7 @@ unix ?= We run FreeBSD, not UNIX.
#
__TO_CPUARCH=C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/
MACHINE_CPUARCH=${MACHINE_ARCH:${__TO_CPUARCH}}
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
.endif