Skip to content

Commit ff9c943

Browse files
committed
auto merge of #5537 : yichoi/rust/pull-0325, r=brson
In order to mitigate typo of target-triples, error notification of unsupported target triples which defined in mk/platform.mk added. minor fix for arm-linux-androideabi added.
2 parents 5591d34 + 2911fc2 commit ff9c943

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

configure

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ fi
574574
CFG_PREFIX=${CFG_PREFIX%/}
575575
CFG_HOST_TRIPLES="$(echo $CFG_HOST_TRIPLES | tr ',' ' ')"
576576
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
577+
CFG_SUPPORTED_TARGET_TRIPLES="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed 's,^[^_]*_,,' | sed 's/\([^=]*\).*/\1/' | xargs)"
577578

578579
# copy host-triples to target-triples so that hosts are a subset of targets
579580
V_TEMP=""
@@ -586,8 +587,22 @@ CFG_TARGET_TRIPLES=$V_TEMP
586587
# check target-specific tool-chains
587588
for i in $CFG_TARGET_TRIPLES
588589
do
590+
L_CHECK=false
591+
for j in $CFG_SUPPORTED_TARGET_TRIPLES
592+
do
593+
if [ $i = $j ]
594+
then
595+
L_CHECK=true
596+
fi
597+
done
598+
599+
if [ $L_CHECK = false ]
600+
then
601+
err "unsupported target triples \"$i\" found"
602+
fi
603+
589604
case $i in
590-
arm-unknown-android)
605+
arm-linux-androideabi)
591606

592607
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
593608
then

0 commit comments

Comments
 (0)