@@ -, +, @@ target --- dev-lang/rust/rust-1.36.0.ebuild | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) --- a/dev-lang/rust/rust-1.36.0.ebuild +++ a/dev-lang/rust/rust-1.36.0.ebuild @@ -36,7 +36,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}" +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm thumbv7neon wasm ${ALL_LLVM_TARGETS[*]}" # Please keep the LLVM dependency block separate. Since LLVM is slotted, # we need to *really* make sure we're not pulling one than more slot @@ -140,6 +140,11 @@ src_configure() { if use wasm; then rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" fi + + if use thumbv7neon; then + rust_targets="${rust_targets},\"thumbv7neon-unknown-linux-gnueabihf\"" + fi + rust_targets="${rust_targets#,}" local extended="true" tools="\"cargo\"," @@ -222,6 +227,16 @@ src_configure() { linker = "$(usex system-llvm lld rust-lld)" EOF fi + + if use thumbv7neon; then + cat <<- EOF >> "${S}"/config.toml + [target.thumbv7neon-unknown-linux-gnueabihf] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + EOF + fi } src_compile() { --- dev-lang/rust/metadata.xml | 1 + 1 file changed, 1 insertion(+) --- a/dev-lang/rust/metadata.xml +++ a/dev-lang/rust/metadata.xml @@ -10,6 +10,7 @@ Use the system LLVM install Install rls component Install rustfmt component + Build support for the thumbv7-neon target Build support for the wasm32-unknown-unknown target --- profiles/arch/base/package.use.mask | 4 ++++ 1 file changed, 4 insertions(+) --- a/profiles/arch/base/package.use.mask +++ a/profiles/arch/base/package.use.mask @@ -1,6 +1,10 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +# Steffen Kuhn (17 May 2019) +# thumbv7neon can only be built for armv7 +dev-lang/rust thumbv7neon + # Craig Andrews (2019-07-03) # Raspberry Pi support is only available on arm. # Mask raspberry-pi USE globally, unmask on arm. --- profiles/arch/arm/armv7a/use.mask | 2 ++ 1 file changed, 2 insertions(+) --- a/profiles/arch/arm/armv7a/use.mask +++ a/profiles/arch/arm/armv7a/use.mask @@ -5,6 +5,8 @@ -armv6 -armv6t2 +-thumbv7neon + -cpu_flags_arm_v4 -cpu_flags_arm_v5 -cpu_flags_arm_v6 --- dev-lang/rust/rust-1.36.0.ebuild | 6 ++++++ 1 file changed, 6 insertions(+) --- a/dev-lang/rust/rust-1.36.0.ebuild +++ a/dev-lang/rust/rust-1.36.0.ebuild @@ -112,6 +112,12 @@ pre_build_checks() { pkg_pretend() { pre_build_checks + + use arm && use thumbv7neon && if [[ "$(tc-is-softfloat)" != "no" ]]; then + die "Neon support requires hardfloat system." + else # don't do anything + :; + fi } pkg_setup() {