Commit Graph

76 Commits

Author SHA1 Message Date
Alex Kiernan
cc9244ca70 rust: Merge all rustc-source patches into rust-source.inc
With the dim-sum approach to patching we had the same patch applied in
many places, but not all, so that there were no guarantees that we were
actually building agaginst the same thing in all recipes.

(From OE-Core rev: 550c273f38d8e6d2d431908023e213c6b018d7ed)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
Khem Raj
a50bad0c58 rust: Fix build with 64bit time_t
The vendored copy of zlib undefines _FILE_OFFSET_BITS when
_LARGEFILE64_SOURCE is defined and enabling 64bit time_t requires 64bit
off_t ( _FILE_OFFSET_BITS=64 ), therefore remove this from the
zlib module

(From OE-Core rev: 73e56624e815c52308a81852430a8bb050a0fc58)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-06 12:03:47 +00:00
Khem Raj
755540ec8f rust,libstd-rs: Fix build with latest musl
newer musl do not provide lfs64 functions anymore since off_t is always
64bit on musl using normal functions would suffice

(From OE-Core rev: f01b2ab83068e4d7f263c31dca2a3fa9ef77a98e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:08:29 +00:00
Khem Raj
96df183b60 rust: Do not use open64 on musl in getrandom crate
LFS64 functions are deprecated in latest musl

(From OE-Core rev: 3b63303c62f9d50d835096602f9e09669779fa3e)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:08:29 +00:00
Alex Kiernan
4323ddb8a1 rust: Move musl-x86 fix for __stack_chk_fail_local to rust-source
Any consumer of rust-source (potentially) needs this, so move to
rust-source.inc

(From OE-Core rev: 3c88cf98361a8f1c6f5183cc8887cccfad9d08ba)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-28 23:59:56 +00:00
Alejandro Hernandez Samaniego
cb33d63060 rust: Enable building rust from stable, beta and nightly channels
Rust follows the train release model via the stable, beta and nightly channels,
by default we build rust from the stable channel, however there are certain
features which are only available in the beta or nightly channels.

Make these channels available by setting a RUST_CHANNEL variable which defaults
to stable making this change transparent to the user.

The snapshot version used by rust during its compilation wont necessarily match
the version being built, specially if were building from an unstable channel,
to avoid confusion rename this to SNAPSHOT_VERSION and use RUST_VERSION for the
version to be built, which is automatically defined to PV.

Append -beta or -nightly to rusts PV for signature awareness.

It is important to note that this does not build rust from the beta/nightly
published tarball (which today build rust v1.67.0 and v1.68.0 respectively),
instead this builds rust from the current selected version (1.66.0) and enables
the beta/nightly features for that version.

Setting the variable RUST_CHANNEL=nightly results in the following:

$ rustc -Vv
rustc 1.66.0-nightly

(From OE-Core rev: 807a52686682d0d0a151ea3dadd99880feb67cc0)

Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-21 10:16:31 +00:00
Alex Kiernan
e55f3f911f rust: update 1.65.0 -> 1.66.0
Drop backported patch ENOTSUP constant for riscv32/musl.

Release notes:
  https://blog.rust-lang.org/2022/12/15/Rust-1.66.0.html

License-Update: Upstream has added Unicode Terms of Use license
  (Unicode-TOU).
(From OE-Core rev: e6a9e1ea7be842dcde109e952fbc7dc08d1577a2)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-17 23:49:56 +00:00
Alex Kiernan
4e16d1c1f6 rust: update 1.64.0 -> 1.65.0
Release notes:
  https://blog.rust-lang.org/2022/11/03/Rust-1.65.0.html

(From OE-Core rev: fa8890188e8971a5707bae1504cb010b54ed3cae)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-07 14:32:42 +00:00
Alex Kiernan
b72193a602 rust: update 1.63.0 -> 1.64.0
Release notes:
  https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html

(From OE-Core rev: 1d81fb264580b96c405075fcfd2a82a6f74b9630)

Signed-off-by: Alex Kiernan <alexk@zuma.ai>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-26 12:28:39 +01:00
Richard Purdie
6323229342 rust: Fix crossbeam-utils for arches without atomics
crossbeam-utils tries to use the triplet to look up whether the target
supports various forms of atomics. We use TARGET_VENDOR and not "-unknown"
in the target case which means this fails and breaks platforms like mips
and powerpc 32 bit. Add a patch to handle TARGET_VENDOR in this case.

(From OE-Core rev: 5d8c01dfed4c82fcc5d504c728a51fb98a262300)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-31 10:40:07 +01:00
Khem Raj
a090aea9a7 rust: Fix build failure on riscv32
Latest rust has started using ENOTSUP define, which is not available in
the older libc that current release of compiler is using therefore
backport the needed patch. Eventually when vendored version of libc
bumps to 1.33+ we should not need this patch.

(From OE-Core rev: 097e38f28990229c3f54f4e6cb74ca8be0b806e6)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-31 10:40:07 +01:00
Randy MacLeod
c2a7fccb57 rust: update from 1.62.1 to 1.63.0
Release notes:
   https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html

This is a standard upgrade aside from the path for the
stage2 tools binaries (clippy, et.al.) changing.

(From OE-Core rev: 9f390accf5fd174c430928cf841728d0456fc1b7)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-31 10:40:07 +01:00
Alexander Kanavin
95832841bf rust: update 1.62.0 -> 1.62.1
(From OE-Core rev: 6baa224158f40b9754c3f10e11966d02e1337ae7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-14 08:13:32 +01:00
Richard Purdie
411304c3e9 rust: Work around reproducibility issues
Add a patch which removes the sections of code which encode buildpaths. Whilst
not ideal, the patches at least show where the problematic data is coming from
and should allow more focused work to resovle it by someone who has a better
understanding of rust and what this code is doing. It does look unlikely we
actually need this code in our usecases anyway.

(From OE-Core rev: c08c522fc29445aef0c64f0dd8df8a3531c04afa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-08 15:44:20 +01:00
Alexander Kanavin
bab6c13913 rust: update 1.60.0 -> 1.62.0
Drop the two libstdc patches as they've finally appeared upstream.

Disable the use of libstdc++.a from the host distributions, as it results
in cross-distro contamination in rust-native.

(From OE-Core rev: 94760bc118952160865352c10ca7693680b5ce7e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-08 00:09:42 +01:00
Pgowda
0bd0012264 rust: update 1.59.0 -> 1.60.0
Rust has been upgraded to rust-1.60.0 that uses LLVM 14.

Please refer the following link for more detailed features.
https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html
https://github.com/rust-lang/rust/blob/master/RELEASES.md

(From OE-Core rev: 786a9a66486cf179ee4c9e295569fcd8c37fef78)

Signed-off-by: pgowda <pgowda.cve@gmail.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-27 23:30:11 +01:00
Alexander Kanavin
9310d1531c rust: update 1.58.1 -> 1.59.0
Drop libstd-rs patches as they're merged upstream.

(From OE-Core rev: 05f4a09899aa8dbb22ef1adb494abac41d5b96b7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:27 +00:00
Alexander Kanavin
f64ac4c918 rust: update 1.58.0 -> 1.58.1
(From OE-Core rev: 855ec0af1b3c7c2664e68ac89cad839d480c43db)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-01 07:31:18 +00:00
Alexander Kanavin
e5ce164931 rust: update 1.57.0 -> 1.58.0
(From OE-Core rev: 43895e2967b2c80f4ee353b33ffe422ea7590ff1)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-20 11:57:29 +00:00
Alexander Kanavin
d1f27ddebb rust: update 1.56.1 -> 1.57.0
(From OE-Core rev: 295b9d51bad0b0da3ba9acec875972bf5e5ca4d7)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-08 20:22:11 +00:00
Alexander Kanavin
259afff652 rust: update 1.56.0 -> 1.56.1
This update includes fixes for the 'trojan source' vulnerability:
https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html

Drop two unused patches.

(From OE-Core rev: 5ff0b0d8c6c37ebf916062f03a378fe0e34b1c53)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-11 17:09:16 +00:00
Khem Raj
dec1a60146 rust: Upgrade to 1.56.0
This is latest major release, changes are here [1]

Forward port libstd-rs patches and refresh musl/rv64 port

[1] https://github.com/rust-lang/rust/releases/tag/1.56.0

(From OE-Core rev: 183204cbc70a4ef418b16df48bc7eb6e3a75a114)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23 22:14:13 +01:00
Alexander Kanavin
5efebf3be0 rust: update 1.54.0 -> 1.55.0
(From OE-Core rev: a21705c33a6a69e9a625b8a75d76b76bd078aba2)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 11:48:45 +01:00
Alexander Kanavin
d91db6917f rust: drop PV from include file names
This complicates (semi) automated upgrades, and isn't necessary
as we carry only a single version of the toolchain.

(From OE-Core rev: f7a6b23d99fba5855cfb34788199877a14206293)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 11:48:45 +01:00
Alexander Kanavin
d2b0f230e0 rust: fix upstream version checks
(From OE-Core rev: e2e87d82ad1ec071077f29613e2e568196912daa)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-01 14:06:17 +01:00
Randy MacLeod
61e1570c6a rust: initial merge of most of meta-rust
In the meta-rust repo at commit:
   448047c Upgrade to 1.54.0 (#359)

Make the required directories:
  mkdir ../oe-core/meta/recipes-devtools/rust
  mkdir ../oe-core/meta/recipes-devtools/cargo
  mkdir ../oe-core/meta/recipes-example
and then:
  cp recipes-devtools/rust/* ../oe-core/meta/recipes-devtools/rust
  cp recipes-devtools/cargo/* ../oe-core/meta/recipes-devtools/cargo
  cp lib/crate.py ../oe-core/meta/lib
  cp recipes-example/* ../oe-core/meta/recipes-example
  cp conf/distro/include/rust_* ../oe-core/meta/conf/distro/include/
  cp classes/* ../oe-core/meta/classes/
  cp recipes-core/packagegroups/packagegroup-rust-cross-canadian.bb ../oe-core/meta/recipes-core/packagegroups

(From OE-Core rev: 3ed57578cca93ff1ba4e0bf3f25566e10659a2f9)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-26 22:09:43 +01:00