]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust-common: Update to match cross targets
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 Aug 2022 13:04:04 +0000 (14:04 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Aug 2022 14:41:36 +0000 (15:41 +0100)
Tweak the armv7 workaround to work for cross environments and as a host
triplet and not just as a target.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rust-common.bbclass

index f2e99493fef1fcab67f9fb20a7cbcfb67ed959a3..7c432ed131bd696da369e3a92ab37f8c099c28be 100644 (file)
@@ -63,7 +63,7 @@ def rust_base_triple(d, thing):
     '''
 
     # The llvm-target for armv7 is armv7-unknown-linux-gnueabihf
-    if thing == "TARGET" and target_is_armv7(d):
+    if d.getVar('{}_ARCH'.format(thing)) == d.getVar('TARGET_ARCH') and target_is_armv7(d):
         arch = "armv7"
     else:
         arch = oe.rust.arch_to_rust_arch(d.getVar('{}_ARCH'.format(thing)))