<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/recipes-devtools/rust/rust-common.inc, branch styhead</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=styhead</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=styhead'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2022-07-28T10:07:33+00:00</updated>
<entry>
<title>rust-target-config: Create new class to contain target json config generation</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-07-23T12:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1e04c8aafbe562d2c87ca9de53fbb27703b0c51a'/>
<id>urn:sha1:1e04c8aafbe562d2c87ca9de53fbb27703b0c51a</id>
<content type='text'>
Currently most of the rust recipes use this code but it is all piecemeal.
Turn the code into a class where things can start to be rationalised. Ultimately
some of the data and python code should be moved to a python library but one step
at a time.

No functionality changes.

(From OE-Core rev: 3795285cbf362e13b8151bfdbe1bce999ac28641)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common/rust-cross: Clean up target json generation code</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-07-23T12:25:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a02bb3b794fe97cbd64d6740db494de00c17134b'/>
<id>urn:sha1:a02bb3b794fe97cbd64d6740db494de00c17134b</id>
<content type='text'>
Some of the subtleties in the different codepaths for target rust json generation
were not easy to spot. Start to simplfy the code to make this clearer.

This patch should not have any functionality change although ABIEXTENSION
has to be excluded from the function signature, the triplet would normally
cover anything set there.

(From OE-Core rev: 0f83d959465e0d99f98ade6803281585931d1b02)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-cross: Simplfy the rust_gen_target calls</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-07-23T11:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=97e267f6df6063e1f02a31c68e9f8b0a6dbe2d98'/>
<id>urn:sha1:97e267f6df6063e1f02a31c68e9f8b0a6dbe2d98</id>
<content type='text'>
Match the code in rust-cross-canadian so that further simplifications
can be considered in future.

(From OE-Core rev: 5cb62d0a33777cb9afb1eea5f736a2580ce50dc7)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-cross/rust-common: Merge arm target handling code to fix cross-canadian</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-07-23T11:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1900f5b6078c7ca25c208d1c8230e3074c28425d'/>
<id>urn:sha1:1900f5b6078c7ca25c208d1c8230e3074c28425d</id>
<content type='text'>
rust-cross had special handling for armv7 targets but we also need this
for cross-canadian. Merge the code into the main function so everything is
consistent.

Also then fix the arm definition to be arm-eabi since ABI is correctly
being looked up.

(From OE-Core rev: ff3c3dbbd2bf1bb7bb70b55cca203e9eedcf14a8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common: Set llvm-target correctly for cross SDK targets</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-07-23T10:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d48c7e45494e4a690ef62424f97eb4bb9b1ffa21'/>
<id>urn:sha1:d48c7e45494e4a690ef62424f97eb4bb9b1ffa21</id>
<content type='text'>
When a 'BUILD' target is requested we shouldn't be looking at TARGET_SYS but
at BUILD_SYS. Due to the way rust mangles triplets, we need the HOST_SYS triplet
to work with existing code - fixing that issue is a separate patch.

Also drop the arch_abi argument, it doens't make any sense to a getVar() call
and was a copy and paste error.

Based on a patch from Otavio Salvador &lt;otavio@ossystems.com.br&gt; but separated out
and tweaked.

Fixes: bd36593ba3 ("rust-common: Drop LLVM_TARGET and simplify")

(From OE-Core rev: d554161a045d12411f288394e253c54aa4c1257c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust: fix issue building cross-canadian tools for aarch64 on x86_64</title>
<updated>2022-06-29T15:16:56+00:00</updated>
<author>
<name>Peter Bergin</name>
<email>peter@berginkonsult.se</email>
</author>
<published>2022-06-29T08:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=701ac97c156adb67b367a90adbfeb29cb3019b67'/>
<id>urn:sha1:701ac97c156adb67b367a90adbfeb29cb3019b67</id>
<content type='text'>
Commit bd36593ba3db758b3eacc974e48468a665967961 did introduce a
regression when building package rust-cross-canadian-aarch64
on a x86_64 host. This commit will fix that configuration.

Suggested-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

(From OE-Core rev: ef566af964e9f9d2c440a3b5771ed801216f30f9)

Signed-off-by: Peter Bergin &lt;peter@berginkonsult.se&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common: Fix native signature dependency issues</title>
<updated>2022-05-21T21:20:54+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-05-21T13:12:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=458c70b9128bae5d4c0df6ddc6682f290d4b230b'/>
<id>urn:sha1:458c70b9128bae5d4c0df6ddc6682f290d4b230b</id>
<content type='text'>
The previous changes cause sstatetests.SStateTests.test_sstate_32_64_same_hash
to fail since RUST_XXX_SYS changes depending on the native architecture. This
is correct but these are accounted for in the layout of paths in TMPDIR so
they should be excluded from the task signatures for the correct behaviour.

(From OE-Core rev: 2b9bb4c07d0ab53f58cbdd8a96896780a90be9a8)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common: Drop LLVM_TARGET and simplify</title>
<updated>2022-05-21T21:20:54+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-05-21T13:02:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=781eaa955dce5deab47371c25dae72b36c011900'/>
<id>urn:sha1:781eaa955dce5deab47371c25dae72b36c011900</id>
<content type='text'>
This all seems over complicated for something which is basically always
one of two values. This might even help cross-canadian work on something
which isn't x86-64.

(From OE-Core rev: bd36593ba3db758b3eacc974e48468a665967961)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common: Fix for target definitions returning 'NoneType' for arm</title>
<updated>2022-05-21T21:20:54+00:00</updated>
<author>
<name>Sundeep KOKKONDA</name>
<email>sundeep.kokkonda@gmail.com</email>
</author>
<published>2022-05-13T05:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=66ff1fb3a164fa794ee186960809e3fa9e938b48'/>
<id>urn:sha1:66ff1fb3a164fa794ee186960809e3fa9e938b48</id>
<content type='text'>
[YOCTO #14742]

The build shows below error while building for arm machines.
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Detailed error info :

Steps to reproduce:
1. Set MACHINE ?= "qemuarm" in local.conf &amp; add 'TOOLCHAIN_HOST_TASK:append = " packagegroup-rust-cross-canadian-${MACHINE}"'
2. bitbake core-image-minimal -cpopulate_sdk

Complete Error:
ERROR: rust-cross-canadian-arm-1.59.0-r0 do_rust_gen_targets: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:do_rust_gen_targets(d)
     0003:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-cross-canadian-common.inc', lineno: 31, function: do_rust_gen_targets
     0027:
     0028:LLVM_TARGET[x86_64] = "${RUST_HOST_SYS}"
     0029:python do_rust_gen_targets () {
     0030:    wd = d.getVar('WORKDIR') + '/targets/'
 *** 0031:    rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH'))
     0032:    rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH'))
     0033:    rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH'))
     0034:}
     0035:
File: '/ala-lpggp31/skokkonda/yocto/poky/meta/recipes-devtools/rust/rust-common.inc', lineno: 330, function: rust_gen_target
     0326:    # build tspec
     0327:    tspec = {}
     0328:    tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi)
     0329:    tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi)
 *** 0330:    tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi))
     0331:    tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi)
     0332:    tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi)
     0333:    tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi)
     0334:    tspec['arch'] = arch_to_rust_target_arch(rust_arch)
Exception: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Below are the local variables from rust_gen_target function for arm and
aarch64 targets. Refer below, the tspec varibles for 'arm' generated with NoneType.

(a) Locals at rust_gen_target for arm::
tspec['data-layout'] =  None, Type of tspec['data-layout'] =  &lt;class 'NoneType'&gt;
tspec['data-layout'] =  None, Type of tspec['data-layout'] =  &lt;class 'NoneType'&gt;
DEBUG: Python function do_rust_gen_targets finished
(b) Locals at rust_gen_target  for aarch64::
tspec['data-layout'] =  aarch64-unknown-linux-gnu, Type of tspec['data-layout'] =  &lt;class 'str'&gt;
tspec['max-atomic-width'] =  128, Type of tspec['max-atomic-width'] =  &lt;class 'int'&gt;

Reason for changing arm-eabi to arm: The earlier changes introduced this bug, so reverting the change 'arm-eabi' to 'arm' fixed the issue.

(From OE-Core rev: 8ed000debb026477abd86ea3bf72adaf21d69f39)

Signed-off-by: Sundeep KOKKONDA &lt;sundeep.kokkonda@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust-common: Ensure sstate signatures have correct dependencues for do_rust_gen_targets</title>
<updated>2022-05-21T21:20:54+00:00</updated>
<author>
<name>Sundeep KOKKONDA</name>
<email>sundeep.kokkonda@gmail.com</email>
</author>
<published>2022-05-21T09:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5ad33240d55dc9fddc499ae7957e7b5ea5a42d28'/>
<id>urn:sha1:5ad33240d55dc9fddc499ae7957e7b5ea5a42d28</id>
<content type='text'>
The do_rust_gen_targets task was not rerunning when the configuration variables it
uses were changed. Add the missing variable dependencies to fix this.

[RP: Split to separate patch and add commit message]
(From OE-Core rev: 65ce2d129154d4540cb8ec960971bcf6aa5a9480)

Signed-off-by: Sundeep KOKKONDA &lt;sundeep.kokkonda@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
