diff options
| author | Cameron Hart <cameron.hart@gmail.com> | 2016-08-06 15:50:48 +1000 |
|---|---|---|
| committer | Cameron Hart <cameron.hart@gmail.com> | 2016-08-06 15:50:48 +1000 |
| commit | cbb88faad77d2c9d3de07a1e4b676f95c6780727 (patch) | |
| tree | 8f6d010cb4334d31514a08392d784aaecdeae42d /src/liballoc_jemalloc | |
| parent | fc210a8994174d48965453fa6cbeafc8902bd399 (diff) | |
| parent | b30eff7ba72a78e31acd61a2b6931919a0ad62e8 (diff) | |
| download | rust-cbb88faad77d2c9d3de07a1e4b676f95c6780727.tar.gz rust-cbb88faad77d2c9d3de07a1e4b676f95c6780727.zip | |
Merge branch 'master' into issue-30961
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())); |
