Page MenuHomeFreeBSD

lang/rust: add powerpc64, armv6 and armv7 targets
ClosedPublic

Authored by mikael on Nov 28 2018, 11:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 6, 2:47 PM
Unknown Object (File)
Thu, Jun 6, 2:47 PM
Unknown Object (File)
Thu, Jun 6, 2:43 PM
Unknown Object (File)
Thu, Jun 6, 2:43 PM
Unknown Object (File)
Thu, Jun 6, 2:43 PM
Unknown Object (File)
Thu, Jun 6, 2:43 PM
Unknown Object (File)
Thu, Jun 6, 2:43 PM
Unknown Object (File)
Wed, Jun 5, 3:32 AM

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lang/rust/Makefile
106–107 ↗(On Diff #51284)

These two lines seem to be redundant.

171–172 ↗(On Diff #51284)

Thank you for doing this. We do a similar thing in cargo.mk and I never got around to trying this in lang/rust too.

Can you please delete files/patch-src_vendor_openssl-sys_.cargo-checksum.json too?

I would prefer to see this bootstrapped and only for 12.0

mikael edited the test plan for this revision. (Show Details)

I managed to build cargo with OPENSSL_STATIC=yes

jbeich added a subscriber: jbeich.

Please, land before D18427 if you plan to MFH to 2018Q4.

lang/rust builds on 12.0-RC3, but I have a problem building devel/rust-cbindgen.

error[E0412]: cannot find type `c_long` in the crate root

https://talos.anongoth.pl/data/powerpc64-default/2018-12-05_22h39m09s/logs/errors/rust-cbindgen-0.6.7.log

Is the built rust compiler 100% functional? This port builds on amd64.

@pkubaj_riseup.net, bundled libc-0.2.41 doesn't support powerpc* on FreeBSD. Which version does or which part do you need backported?

libc crate is used by pretty much every lang/rust consumer. If you don't land powerpc64 support upstream maintaining patches in consumers with vendored dependencies (e.g., net-im/fractal, www/firefox) is going to be hard.

Currently there's no support for any powerpc* on FreeBSD (https://github.com/rust-lang/libc/tree/master/src/unix/bsd/freebsdlike/freebsd).

I guess it's better to fix lang/rust alone for now and then take care of libc. Fixing lang/rust will make it much easier to fix other Rust-related ports because of no need to bootstrap on other architecture.

What is needed for this to be moved along?

In D18367#400663, @mikael.urankar_gmail.com wrote:

What is needed for this to be moved along?

A rebase after recent changes and a promise to attempt to upstream the libc crate and other patches.

I've just copied the bootstrap files to LOCAL/tobik/rust, so please add it to MASTER_SITES for {rust,cargo,std}_bootstrap too.

In D18367#400663, @mikael.urankar_gmail.com wrote:

What is needed for this to be moved along?

A rebase after recent changes and a promise to attempt to upstream the libc crate and other patches.

I've just copied the bootstrap files to LOCAL/tobik/rust, so please add it to MASTER_SITES for {rust,cargo,std}_bootstrap too.

I can try to submit my patch upstream if they accept non github submission. It'll also be easier for me if all the aarch64 patches are submitted first.

mikael retitled this revision from lang/rust: add powerpc64 target to lang/rust: add powerpc64, armv6 and armv7 targets.
mikael edited the summary of this revision. (Show Details)
mikael edited the test plan for this revision. (Show Details)
tobik requested changes to this revision.Feb 15 2019, 12:00 PM

Thank you.

I've added the bootstraps to my ~/public_distfiles/rust. Let's wait for it to appear. In the meantime there is a problem with extra-patch-arm-ppc.

lang/rust/Makefile
17 ↗(On Diff #53956)

Drop that one. It isn't used anywhere.

101–102 ↗(On Diff #53956)

USE_GCC=8 ?

106 ↗(On Diff #53956)

This patch has x86 and DragonFly specific things in it. This should

  1. be always applied regardless of architecture,
  2. live as individual patch files under files/ (like before) instead of as one big patch.
This revision now requires changes to proceed.Feb 15 2019, 12:00 PM
lang/rust/Makefile
101–102 ↗(On Diff #53956)

We can use gcc7 or 8 or X to build lang/rust, only the bootstrap requires gcc8

106 ↗(On Diff #53956)

it's a noop for amd64 and dfly, I'm just moving c_char elsewhere.

lang/rust/Makefile
101–102 ↗(On Diff #53956)

Ah, ok.

Can you amend the comment with something like "The bootstrap is hardcoded to use gcc8, but we can build with a newer or older compiler as provided by USE_GCC=yes" ?

106 ↗(On Diff #53956)

Then it should be no problem to always apply it everywhere.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2019, 3:30 PM
This revision was automatically updated to reflect the committed changes.