diff options
| author | bors <bors@rust-lang.org> | 2016-07-30 23:21:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-30 23:21:46 -0700 |
| commit | 724f811794bf30141922eb9ff26cd9ce7febe64e (patch) | |
| tree | fd75396b366bee728b0b2036c86170118b991538 /src/liballoc_jemalloc | |
| parent | c267ab4e3b40dddde3804b8b80321049d9879eb9 (diff) | |
| parent | eb6173806d972b839711139ae107dda690febe3a (diff) | |
| download | rust-724f811794bf30141922eb9ff26cd9ce7febe64e.tar.gz rust-724f811794bf30141922eb9ff26cd9ce7febe64e.zip | |
Auto merge of #35060 - japaric:arm-musl, r=alexcrichton
Add ARM MUSL targets Rebase of #33189. I tested this by producing a std for `arm-unknown-linux-musleabi` then I cross compiled Hello world to said target. Checked that the produced binary was statically linked and verified that the binary worked under QEMU. This depends on rust-lang/libc#341. I'll have to update this PR after that libc PR is merged. I'm also working on generating ARM musl cross toolchain via crosstool-ng. Once I verified those work, I'll send a PR to rust-buildbot. r? @alexcrichton cc @timonvo
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/liballoc_jemalloc/Cargo.toml b/src/liballoc_jemalloc/Cargo.toml index 768a0c2c0a5..25b3c8a3a0a 100644 --- a/src/liballoc_jemalloc/Cargo.toml +++ b/src/liballoc_jemalloc/Cargo.toml @@ -16,7 +16,7 @@ libc = { path = "../rustc/libc_shim" } [build-dependencies] build_helper = { path = "../build_helper" } -gcc = "0.3.17" +gcc = "0.3.27" [features] debug = [] diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index d1b3583d256..dc1b8d6ea98 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -73,7 +73,16 @@ fn main() { .replace("\\", "/")) .current_dir(&build_dir) .env("CC", compiler.path()) - .env("EXTRA_CFLAGS", cflags) + .env("EXTRA_CFLAGS", cflags.clone()) + // jemalloc generates Makefile deps using GCC's "-MM" flag. This means + // that GCC will run the preprocessor, and only the preprocessor, over + // jemalloc's source files. If we don't specify CPPFLAGS, then at least + // on ARM that step fails with a "Missing implementation for 32-bit + // atomic operations" error. This is because no "-march" flag will be + // passed to GCC, and then GCC won't define the + // "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4" macro that jemalloc needs to + // select an atomic operation implementation. + .env("CPPFLAGS", cflags.clone()) .env("AR", &ar) .env("RANLIB", format!("{} s", ar.display())); |
