[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 05/06: gnu: rust: Don't build for "native" arch on ARM.
From: |
Joshua Branson |
Subject: |
Re: 05/06: gnu: rust: Don't build for "native" arch on ARM. |
Date: |
Tue, 17 Apr 2018 16:49:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Mark H Weaver <address@hidden> writes:
> Hi Efraim and Danny,
>
> address@hidden (Danny Milosavljevic) writes:
>
>> dannym pushed a commit to branch master
>> in repository guix.
>>
>> commit 67ca98ec7818f5b63fe041bfee4ef10826635685
>> Author: Efraim Flashner <address@hidden>
>> Date: Thu Mar 22 09:14:53 2018 +0200
>>
>> gnu: rust: Don't build for "native" arch on ARM.
>>
>> * gnu/packages/rust.scm (rust-1.23)<#:phases>[dont-build-native]: New
>> phase.
>> ---
>> gnu/packages/rust.scm | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
>> index 8c5abfc..0df649c 100644
>> --- a/gnu/packages/rust.scm
>> +++ b/gnu/packages/rust.scm
>> @@ -351,6 +351,12 @@ safety and thread safety guarantees.")
>> (substitute-keyword-arguments (package-arguments rust-1.19)
>> ((#:phases phases)
>> `(modify-phases ,phases
>> + (add-after 'unpack 'dont-build-native
>> + (lambda _
>> + ;; XXX: Revisit this when we use gcc 6.
>> + (substitute* "src/binaryen/CMakeLists.txt"
>> + (("ADD_COMPILE_FLAG\\(\\\"-march=native\\\"\\)") ""))
>> + #t))
>> (add-after 'patch-tests 'patch-cargo-tests
>> (lambda _
>> (substitute* "src/tools/cargo/tests/build.rs"
>
> If it would be beneficial, you might consider using gcc-7 to compile
> 'rust', by adding 'gcc-7' to native-inputs. We're already using gcc-7
> to compile a few other packages, including linux-libre on x86_64.
Maybe this is a silly question, but I thought that gcc couldn't compile
rust code? I thought LLVM was the only compiler that could compile rust?
>
> Mark