[packages/rpm-pld-macros] handle --target independently for each rust build tool; rel 2

atler atler at pld-linux.org
Tue Dec 6 00:23:42 CET 2022


commit f3c8c6865139ebd94a6b8744996b0329b47eebc2
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Dec 6 00:23:10 2022 +0100

    handle --target independently for each rust build tool; rel 2
    
    let's see which direction cargo issue is gonna take:
    https://github.com/rust-lang/cargo/issues/11452

 macros.pld          | 2 +-
 macros.rust         | 4 +++-
 rpm-pld-macros.spec | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index 0aeb70c..7023b22 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -6,7 +6,7 @@ Summary:	PLD Linux RPM macros
 Summary(pl.UTF-8):	Makra RPM dla Linuksa PLD
 Name:		rpm-pld-macros
 Version:	%{rpm_macros_rev}
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		Development/Building
 Source0:	macros.pld
diff --git a/macros.pld b/macros.pld
index 349821a..9f1f772 100644
--- a/macros.pld
+++ b/macros.pld
@@ -550,7 +550,7 @@ CPPFLAGS="${CPPFLAGS:-%{rpmcppflags}}" \
 CXXFLAGS="${CXXFLAGS:-%{rpmcxxflags}}" \
 LDFLAGS="${LDFLAGS:-%{rpmldflags}}" \
 RUSTC="${RUSTC:-%{__rustc}}" \
-RUSTFLAGS="${RUSTFLAGS:-%{rpmrustflags}}" \
+RUSTFLAGS="${RUSTFLAGS:-%{rpmrustflags} --target %rust_target}" \
 LC_ALL=C.UTF-8 %{__meson} \
 	--buildtype=plain \
 	--bindir=%{_bindir} \
diff --git a/macros.rust b/macros.rust
index bfb937e..7996c4f 100644
--- a/macros.rust
+++ b/macros.rust
@@ -1,5 +1,5 @@
 %debuginforustflags	-C debuginfo=%{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1:2}%{!?__dic_1:0}%{expand:%%undefine __dic_%{?_enable_debug_packages}} -C strip=none
-%rpmrustflags	--target %rust_target %debuginforustflags
+%rpmrustflags	%debuginforustflags
 %rust_arches	%{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
 
 %rust_target	\\\
@@ -48,6 +48,7 @@ thumbv7neon-unknown-linux-gnueabihf\\\
 	RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
 	%{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
 	%{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\
+	--target %rust_target \\\
 	--target-dir %{cargo_targetdir} \\\
 %{nil}
 
@@ -63,5 +64,6 @@ thumbv7neon-unknown-linux-gnueabihf\\\
 	RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
 	%{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
 	%{__cargo} %{__cargo_common_opts} install \\\
+	--target %rust_target \\\
 	--target-dir %{cargo_targetdir} \\\
 %{nil}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/f3c8c6865139ebd94a6b8744996b0329b47eebc2



More information about the pld-cvs-commit mailing list