1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

multimedia/gstreamer1-plugins-rust: Fix build on i386

Ring assumes SSE and SSE2 are available on i386. This workaround assumes
the same, so the build will still fail on ancient hardware without these
instruction sets.

error[E0080]: evaluation of constant value failed
  --> /wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9
   |
28 |         assert!(cfg!(target_feature = "sse") && cfg!(target_feature = "sse2"));
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the evaluated program panicked at 'assertion failed: cfg!(target_feature = "sse") && cfg!(target_feature = "sse2")',
/wrkdirs/usr/ports/multimedia/gstreamer1-plugins-rust/work/gst-plugins-rs-0.13.3/cargo-crates/ring-0.17.8/src/cpu/intel.rs:28:9

Reported by:	pkg-fallout
This commit is contained in:
Jason E. Hale 2024-11-14 21:01:28 -05:00
parent 543a744ee1
commit 612c485103

View File

@ -41,6 +41,11 @@ LTO_UNSAFE= yes
CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO=false
.endif
.if ${MACHINE_ARCH} == i386
# https://github.com/briansmith/ring/issues/1832
RUSTFLAGS+= -C target-feature=+sse,+sse2
.endif
OPTIONS_DEFINE= ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
OPTIONS_DEFAULT= ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
OPTIONS_EXCLUDE_aarch64= CSOUND # https://github.com/neithanmo/csound-rs/commit/8962b89d7bda