diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2024-10-22 20:00:55 -0700 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2024-10-22 20:11:24 -0700 |
commit | f99a708957bdb6dbd26af0a561d00589337e0c6e (patch) | |
tree | 55765ea41766a5c7fee291714b3404fa6b2ba4f2 /net-im/fractal/files/patch-scripts_cargo.sh | |
parent | security/weggli: Broken on amd64 (diff) |
Mk/Uses/cargo.mk: Remove cross-compilation options for Rust-based ports
Reasons:
* Port build shouldn't use cross-compilation mode
because it buids for the same architecture.
* RUSTFLAGS isn't passed to the build of all or some Rust ports
in the cross-compilation mode.
Essential changes:
* Remove the CARGO_BUILD_TARGET make variable.
* Remove CARGO_BUILD_TARGET and CARGO_TARGET_* from CARGO_ENV.
* Update many ports that used CARGO_BUILD_TARGET.
* Build paths now don't include the architecture triplet part.
Immadiate benefits:
* Unbreak build on architectures like i386 that sometimes require
special RUSTFLAGS that were not effective in the cross-compilation
mode.
Ports that really need cross-compilation for some reason should
enable it on case-by-case basis. Example: net-p2p/cncli
(Not sure why does net-p2p/cncli actually need it, but it only
builds with these options.)
PR: 280305
Approved by: rust@FreeBSD.org (maintainer's timeout; 98 days)
Diffstat (limited to 'net-im/fractal/files/patch-scripts_cargo.sh')
-rw-r--r-- | net-im/fractal/files/patch-scripts_cargo.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net-im/fractal/files/patch-scripts_cargo.sh b/net-im/fractal/files/patch-scripts_cargo.sh index a602980a268f..6baeeb352406 100644 --- a/net-im/fractal/files/patch-scripts_cargo.sh +++ b/net-im/fractal/files/patch-scripts_cargo.sh @@ -12,9 +12,9 @@ then echo "DEBUG MODE" - cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/debug/fractal-gtk "$OUTPUT" -+ cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/"$CARGO_BUILD_TARGET"/debug/fractal-gtk "$OUTPUT" ++ cargo build --manifest-path $1/Cargo.toml -p fractal-gtk && cp "$CARGO_TARGET_DIR"/debug/fractal-gtk "$OUTPUT" else echo "RELEASE MODE" - cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/release/fractal-gtk "$OUTPUT" -+ cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/"$CARGO_BUILD_TARGET"/release/fractal-gtk "$OUTPUT" ++ cargo build --manifest-path $1/Cargo.toml --release -p fractal-gtk && cp "$CARGO_TARGET_DIR"/release/fractal-gtk "$OUTPUT" fi |