Fix build on riscv64gc-unknown-linux-gnu#40
Conversation
This works around the mismatch between the GNU target and rustc target. Fixes tikv#36 Signed-off-by: Amanieu d'Antras <[email protected]>
106882b to
210c4eb
Compare
|
It seems there still be issues jemalloc/jemalloc#2323. /cc @bnoctis can you verify whether this works for you? |
|
@BusyJay AFAICT this masks itself as riscv64, which is what vanilla jemalloc currently does. I don't know if there's any difference between it and riscv64gc. Upstream has a separate riscv64be, I think it's better to have a separate gc too. |
54645c9 to
971bc9f
Compare
|
The GNU toolchain prefix for RV64GC is riscv64-linux-gnu-. This is what the configure script is looking for. If you pass in riscv64gc- then it will fail to find the GCC binary. |
|
At the very least this PR fixes the build for me when cross compiling from x86_64 to RV64. |
971bc9f to
d44ba2c
Compare
jemalloc-sys/build.rs
Outdated
|
|
||
| if let Ok(malloc_conf_opts) = read_and_watch_env("JEMALLOC_SYS_WITH_MALLOC_CONF") { | ||
| malloc_conf += &format!( | ||
| malloc_conf.push_str(&format!( |
There was a problem hiding this comment.
Oh, what I mean is actually:
if !malloc_conf.is_empty() {
malloc_conf.push(',');
}
malloc_conf.push_str(&malloc_conf_opts);
Signed-off-by: Amanieu d'Antras <[email protected]>
d44ba2c to
677b4a2
Compare
|
I'm not sure why CI is failing, it works fine on my machine. Can we try a re-run? |
|
Thank you @Amanieu @bnoctis |
|
Could you publish a new version with this fix? Thanks! |
|
Published as 0.5.2 |
`jemalloc-sys` patch based on: tikv/jemallocator#40. Regenerate checksums with sed after patching.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
`jemalloc-sys-pick.patch` is based on: tikv/jemallocator#40. Regenerated checksums using `sed` after patching vendors.
This works around the mismatch between the GNU target and rustc target.
Fixes #36