[Pkg-rust-maintainers] Upstream has changed the bootstrap process

Angus Lees gus at debian.org
Fri Jul 8 02:18:40 UTC 2016


Thanks Ximin!  I've been poking at it myself over the last few nights, and
got to roughly where you are.  The big outstanding issue for me is
verifying that we can (re)build with the same release, since this will
require a different path into the build system (aiui).  I think I know how
this needs to work, but I'm only now at the point where I can actually try
it :/

I was also looking around at how we can automatically test the various
bootstrap scenarios:
- build with rustc = $version-1  (for new upstream release)
- build with rustc = $version     (for rebuild of same release)
- build with non-Debian rustc   (for re-bootstrap on upstream supported
arch.  This may or may not download stage0, depending on what we want to
support here)
- cross compile to new arch     (eventually - blocked on llvm multiarch, or
use vendored llvm.  For bootstrapping new arch from an existing arch)

Particularly the first two.  I'm nervous that we'll only routinely use the
first case and find the second case doesn't work when we need it to,
without automated testing.
I _think_ the best option is to develop something ourselves that runs on
https://jenkins.debian.net/ but if there's something better out there,
please mention it.

---

Re add-soname, we need to set the soname every time we're generating a .so
- so I think that means CrateTypeDylib and CrateTypeCdylib.  We
theoretically don't need it for cases where the .so is only going to be
used as a dlopen()ed plugin (and not linked against with gcc/ld), but I
don't think any of those CrateTypes are restricted to only that use case
(and it's harmless in dlopened plugins).  I'll adapt your patch accordingly.

 - Gus

On Fri, 8 Jul 2016 at 07:50 Ximin Luo <infinity0 at debian.org> wrote:

> OK, looks like it's working:
>
> https://anonscm.debian.org/cgit/pkg-rust/rust.git/log/
>
> I've tested this with DEB_BUILD_PROFILES=dlstage0 and also without this;
> both builds work and all tests pass. :D Please review and upload if good!
>
> In particular, @Angus: I updated add-soname.patch - upstream now has a
> CrateType enum to represent the type of library, instead of a "dylib"
> boolean. The values this enum can take are:
>
> src/librustc/session/config.rs:
> pub enum CrateType {
>     CrateTypeExecutable,
>     CrateTypeDylib,
>     CrateTypeRlib,
>     CrateTypeStaticlib,
>     CrateTypeCdylib,
> }
>
> I replaced the "if dylib" check with "crate_type ==
> config::CrateTypeDylib", but I'm not sure if this is entirely correct. If
> you run "git log -p src/librustc_trans/back/link.rs" on the upstream
> repo, you will see that they sometimes did what I did, but sometimes
> replaced it to check "crate_type != config::CrateTypeExecutable" instead.
> Please fix this, if appropriate.
>
> X
>
> --
> GPG: ed25519/56034877E1F87C35
> GPG: rsa4096/1318EFAC5FBBDBCE
> https://github.com/infinity0/pubkeys.git
>
> _______________________________________________
> Pkg-rust-maintainers mailing list
> Pkg-rust-maintainers at lists.alioth.debian.org
> https://lists.alioth.debian.org/mailman/listinfo/pkg-rust-maintainers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-rust-maintainers/attachments/20160708/396b28f0/attachment.html>


More information about the Pkg-rust-maintainers mailing list