<div dir="ltr">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 :/<div><br></div><div>I was also looking around at how we can automatically test the various bootstrap scenarios:</div><div>- build with rustc = $version-1 (for new upstream release)</div><div>- build with rustc = $version (for rebuild of same release)</div><div>- 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)</div><div>- cross compile to new arch (eventually - blocked on llvm multiarch, or use vendored llvm. For bootstrapping new arch from an existing arch)</div><div><br></div><div>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.</div><div>I _think_ the best option is to develop something ourselves that runs on <a href="https://jenkins.debian.net/">https://jenkins.debian.net/</a> but if there's something better out there, please mention it.</div><div><br></div><div>---</div><div><br></div><div>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.</div><div><br></div><div> - Gus</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 8 Jul 2016 at 07:50 Ximin Luo <<a href="mailto:infinity0@debian.org">infinity0@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, looks like it's working:<br>
<br>
<a href="https://anonscm.debian.org/cgit/pkg-rust/rust.git/log/" rel="noreferrer" target="_blank">https://anonscm.debian.org/cgit/pkg-rust/rust.git/log/</a><br>
<br>
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!<br>
<br>
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:<br>
<br>
src/librustc/session/<a href="http://config.rs" rel="noreferrer" target="_blank">config.rs</a>:<br>
pub enum CrateType {<br>
CrateTypeExecutable,<br>
CrateTypeDylib,<br>
CrateTypeRlib,<br>
CrateTypeStaticlib,<br>
CrateTypeCdylib,<br>
}<br>
<br>
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/<a href="http://link.rs" rel="noreferrer" target="_blank">link.rs</a>" 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.<br>
<br>
X<br>
<br>
--<br>
GPG: ed25519/56034877E1F87C35<br>
GPG: rsa4096/1318EFAC5FBBDBCE<br>
<a href="https://github.com/infinity0/pubkeys.git" rel="noreferrer" target="_blank">https://github.com/infinity0/pubkeys.git</a><br>
<br>
_______________________________________________<br>
Pkg-rust-maintainers mailing list<br>
<a href="mailto:Pkg-rust-maintainers@lists.alioth.debian.org" target="_blank">Pkg-rust-maintainers@lists.alioth.debian.org</a><br>
<a href="https://lists.alioth.debian.org/mailman/listinfo/pkg-rust-maintainers" rel="noreferrer" target="_blank">https://lists.alioth.debian.org/mailman/listinfo/pkg-rust-maintainers</a><br>
</blockquote></div>