<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/recipes-devtools/rust/rust-common.inc, branch yocto-4.0.14</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.14</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-4.0.14'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-02-15T21:46:56+00:00</updated>
<entry>
<title>meta: remove True option to getVar and getVarFlag calls (again)</title>
<updated>2023-02-15T21:46:56+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>Martin.Jansa@gmail.com</email>
</author>
<published>2023-02-01T15:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=54d0147307e0fb581db20603cfec58d74343a0de'/>
<id>urn:sha1:54d0147307e0fb581db20603cfec58d74343a0de</id>
<content type='text'>
* True is default since 2016 and most layers were already updated
  not to pass this parameter where not necessary, e.g. oe-core was
  updated couple times, first in:
  https://git.openembedded.org/openembedded-core/commit/?id=7c552996597faaee2fbee185b250c0ee30ea3b5f

  Updated with the same regexp as later oe-core update:
  https://git.openembedded.org/openembedded-core/commit/?id=9f551d588693328e4d99d33be94f26684eafcaba

  with small modification to replace not only d.getVar, but also data.getVar as in e.g.:
  e.data.getVar('ERR_REPORT_USERNAME', True)

  and for getVarFlag:
  sed -e 's|\(d\.getVarFlag \?\)( \?\([^,()]*, \?[^,()]*\), \?True)|\1(\2)|g' \
      -i $(git grep -E 'getVarFlag ?\( ?([^,()]*), ?([^,()]*), ?True\)' \
          | cut -d':' -f1 \
          | sort -u)

(From OE-Core rev: de7bf6689a19dc614ce4b39c84ffd825bee1b962)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 26c74fd10614582e177437608908eb43688ab510)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
(cherry picked from commit 24a86d0c55ee89ae0dc77975e1d0ee02898d2289)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
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-07-08T07:27:16+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=b2dba5ca25a74c5bcc2307c685e9b519fa446afb'/>
<id>urn:sha1:b2dba5ca25a74c5bcc2307c685e9b519fa446afb</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: dc179854b7ac9e19c9fcdb45ac74c6fdeefbe289)

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;
(cherry picked from commit ef566af964e9f9d2c440a3b5771ed801216f30f9)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.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-06-07T10:53:26+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=c29718ee73be8b0a1896df21acf8aed621afb029'/>
<id>urn:sha1:c29718ee73be8b0a1896df21acf8aed621afb029</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: 1887a69a1738cdf34d27f396943bce6a7e4f8e39)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 2b9bb4c07d0ab53f58cbdd8a96896780a90be9a8)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
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-06-07T10:53:26+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=4e05a17616112ba558f0223c13192d11052d535b'/>
<id>urn:sha1:4e05a17616112ba558f0223c13192d11052d535b</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: cf7c1cde3a3949498d0566e1ac524f8468b91380)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit bd36593ba3db758b3eacc974e48468a665967961)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
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-06-07T10:53:26+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=a0d3dde7c0fbc255f062d95743aff48ba5ecedc3'/>
<id>urn:sha1:a0d3dde7c0fbc255f062d95743aff48ba5ecedc3</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: a4886f02dfb78e861fd7afe07b4a25c262bf0421)

Signed-off-by: Sundeep KOKKONDA &lt;sundeep.kokkonda@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 8ed000debb026477abd86ea3bf72adaf21d69f39)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.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-06-07T10:53:26+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=a394d454f8c422ad41e7fc9ce3900c23d15ba435'/>
<id>urn:sha1:a394d454f8c422ad41e7fc9ce3900c23d15ba435</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: 84e891d812874311b4afa20fd7d3dc4c457009f6)

Signed-off-by: Sundeep KOKKONDA &lt;sundeep.kokkonda@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
(cherry picked from commit 65ce2d129154d4540cb8ec960971bcf6aa5a9480)
Signed-off-by: Steve Sakoman &lt;steve@sakoman.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "meta: rust: Bug fix for target definitions returning 'NoneType'"</title>
<updated>2022-04-05T16:41:09+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2022-04-05T16:36:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0bf2fd16273436f1cd9ea2ab99ad882e879f965d'/>
<id>urn:sha1:0bf2fd16273436f1cd9ea2ab99ad882e879f965d</id>
<content type='text'>
This reverts commit ef49f89c89889466ee3696ab680f8e10c961a677.

This appears to cause build failures which didn't originally show up in
testing, reverting for now.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>meta: rust: Bug fix for target definitions returning 'NoneType'</title>
<updated>2022-04-05T09:49:36+00:00</updated>
<author>
<name>Sundeep KOKKONDA</name>
<email>sundeep.kokkonda@gmail.com</email>
</author>
<published>2022-04-04T16:28:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=e4c16d11128f0e9cc2567fc9e3579e9a94988b2e'/>
<id>urn:sha1:e4c16d11128f0e9cc2567fc9e3579e9a94988b2e</id>
<content type='text'>
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 : https://lists.openembedded.org/g/openembedded-core/message/164004

All the target definitions within tspec dictionary are generted as
NoneType. The changes will fix this issue.

(From OE-Core rev: ef49f89c89889466ee3696ab680f8e10c961a677)

Signed-off-by: Sundeep KOKKONDA &lt;sundeep.kokkonda@gmail.com&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: Introduce arch_to_rust_arch()</title>
<updated>2022-03-02T18:44:17+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2022-02-28T14:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=102e4c029e30aba78e4045ae06115096870f036f'/>
<id>urn:sha1:102e4c029e30aba78e4045ae06115096870f036f</id>
<content type='text'>
On modern Power systems `uname -m` yields 'ppc64le' while the toolchain
knows the architecture as 'powerpc64le'. Provide a mapping from one to
the other to integrate with the existing architecture configuration
flags.

arch_to_rust_arch() only exists to map the OE *_ARCH variables before
any further processing, unlike arch_to_rust_target_arch() which is
specific to the internal triple handling of rust.

On Linux ppc64le systems the changes give the following config:

```
$ cat ./tmp/work/ppc64le-linux/rust-native/1.58.0-r0/targets/ppc64le-linux.json
{
    "llvm-target": "powerpc64le-unknown-linux-gnu",
    "data-layout": "e-m:e-i64:64-n32:64-v256:256:256-v512:512:512",
    "max-atomic-width": 64,
    "target-pointer-width": "64",
    "target-c-int-width": "64",
    "target-endian": "little",
    "arch": "powerpc64",
    "os": "linux",
    "env": "gnu",
    "vendor": "unknown",
    "target-family": "unix",
    "linker": "gcc",
    "cpu": "generic",
    "dynamic-linking": true,
    "executables": true,
    "linker-is-gnu": true,
    "linker-flavor": "gcc",
    "has-rpath": true,
    "has-elf-tls": true,
    "position-independent-executables": true,
    "panic-strategy": "unwind"
}
```

Change-Id: Ief0c01189185d7d4da31d307270bec4e1de674ca
(From OE-Core rev: 9ab61e3cfef0157393cb870d606c2f362e190889)

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust: add support for big endian 64-bit PowerPC</title>
<updated>2021-10-27T08:46:41+00:00</updated>
<author>
<name>David Joyner</name>
<email>dbjoyner@amazon.com</email>
</author>
<published>2021-10-25T13:24:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=ec2eaed9016bd62b521ab12169843c2d1339bdfa'/>
<id>urn:sha1:ec2eaed9016bd62b521ab12169843c2d1339bdfa</id>
<content type='text'>
(From OE-Core rev: 91cc84afbfa6aad154f9a6402b538ea1b7c0ecd4)

Signed-off-by: David Joyner &lt;dbjoyner@amazon.com&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>
</feed>
