Matoro Mahri 869a67efca dev-lang/rust: crossdev support
This allows Rust to be cross-compiled with crossdev.  This is the last
item for bug 680652, closing it.  Note that this is for a foreign CHOST,
i.e., CBUILD != CHOST == CTARGET.  It does not cover the scenario for
CBUILD == CHOST != CTARGET(s), which is tracked separately in bug
679878.

A number of changes were required in order to make this work:

* Force USE=system-bootstrap, since we cannot specify the appropriate
  boostrap URL based on CBUILD in SRC_URI
* LLVm is compiled twice as part of the build, once for host and once
  for target.  However, the rust build uses the same settings from
  config.toml for both builds.  Therefore we cannot override flags nor
  default-linker and must let rust choose them for us.
* Set the appropriate build/host variables which correspond to
  CBUILD/CHOST.  This works as expected.
* Set PKG_CONFIG and OPENSSL_*_DIR variables; cargo needs these for some
  reason.
* Enforce that LLVM_TARGETS is set correctly for both host and target
  arches.  This uses the new llvm_tuple_to_target function, introduced
  in https://github.com/gentoo/gentoo/pull/33996
* Lastly a small patch to rust source is needed, to tell it to link with
  system libz.  It's unclear why this scenario was excluded under
  cross-compile conditions in upstream rust.

See: https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22
Bug: https://bugs.gentoo.org/679878
Closes: https://bugs.gentoo.org/680652
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/35246
Signed-off-by: Sam James <sam@gentoo.org>
2024-02-10 07:49:17 +00:00
2024-02-09 04:35:16 +01:00
2024-02-10 09:28:52 +02:00
2024-02-08 12:32:44 -05:00
2024-02-09 15:03:14 +02:00
2024-01-25 16:16:12 +01:00
2024-02-07 17:11:24 +01:00
2024-02-10 07:49:17 +00:00
2024-02-08 11:31:27 +01:00
2024-02-07 21:35:52 -05:00
2024-02-10 08:14:42 +01:00
2024-02-09 22:03:24 +01:00
2024-02-08 19:52:37 +02:00
2024-02-07 15:59:31 +02:00
2024-02-08 19:29:46 +02:00
2024-02-10 00:25:31 +02:00
2024-01-14 23:27:49 +01:00
2024-02-07 12:45:51 +02:00
2024-02-02 19:40:57 +00:00
2024-02-09 15:47:34 +02:00
2024-02-08 09:56:28 +01:00
2024-02-08 08:15:35 +01:00
2024-02-09 16:08:37 +02:00
2024-02-04 20:28:15 +01:00
2024-01-13 11:07:14 +02:00
2024-02-04 09:14:02 -08:00
2024-02-08 20:25:35 -05:00
2024-01-12 11:07:06 +00:00
2024-02-10 04:48:55 +00:00
2024-02-10 04:48:55 +00:00
2024-01-26 10:15:19 +01:00
2024-02-10 09:28:52 +02:00
2024-02-07 16:53:21 +02:00
S
Description
No description provided
9.8 GiB
Languages
Shell 97.9%
Roff 1.4%
Emacs Lisp 0.2%
C 0.1%