svn commit: r454995 - in head: Mk lang/rust lang/rust/files textproc/ripgrep www/firefox
Jan Beich
jbeich at FreeBSD.org
Mon Nov 27 22:02:31 UTC 2017
Author: jbeich
Date: Mon Nov 27 22:02:29 2017
New Revision: 454995
URL: https://svnweb.freebsd.org/changeset/ports/454995
Log:
lang/rust: avoid LLVM targeting SSE2 on i386 by default
This may help ports like textproc/ripgrep to run on old hardware.
Rust itself still requires SSE2 until bootstrap is regenerated.
PR: 223415
Approved by: rust (dumbbell)
Added:
head/lang/rust/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs (contents, props changed)
Modified:
head/Mk/bsd.gecko.mk (contents, props changed)
head/lang/rust/Makefile (contents, props changed)
head/textproc/ripgrep/Makefile (contents, props changed)
head/www/firefox/Makefile (contents, props changed)
Modified: head/Mk/bsd.gecko.mk
==============================================================================
--- head/Mk/bsd.gecko.mk Mon Nov 27 21:47:44 2017 (r454994)
+++ head/Mk/bsd.gecko.mk Mon Nov 27 22:02:29 2017 (r454995)
@@ -395,7 +395,7 @@ MOZ_OPTIONS+= --enable-debug --disable-release
STRIP= # ports/184285
.else
MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release
-. if ${MOZILLA_VER:R:R} >= 56
+. if ${MOZILLA_VER:R:R} >= 56 && (${MACHINE_CPU:Msse2} || ${ARCH:Maarch64})
MOZ_OPTIONS+= --enable-rust-simd
. endif
.endif
Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile Mon Nov 27 21:47:44 2017 (r454994)
+++ head/lang/rust/Makefile Mon Nov 27 22:02:29 2017 (r454995)
@@ -3,6 +3,7 @@
PORTNAME= rust
PORTVERSION?= 1.22.1
+PORTREVISION?= 1
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
LOCAL/dumbbell/rust:rust_bootstrap \
Added: head/lang/rust/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/rust/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs Mon Nov 27 22:02:29 2017 (r454995)
@@ -0,0 +1,11 @@
+--- src/librustc_back/target/i686_unknown_freebsd.rs.orig 2017-10-09 20:04:51 UTC
++++ src/librustc_back/target/i686_unknown_freebsd.rs
+@@ -13,7 +13,7 @@ use target::{Target, TargetResult};
+
+ pub fn target() -> TargetResult {
+ let mut base = super::freebsd_base::opts();
+- base.cpu = "pentium4".to_string();
++ base.cpu = "pentiumpro".to_string();
+ base.max_atomic_width = Some(64);
+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string());
+ base.stack_probes = true;
Modified: head/textproc/ripgrep/Makefile
==============================================================================
--- head/textproc/ripgrep/Makefile Mon Nov 27 21:47:44 2017 (r454994)
+++ head/textproc/ripgrep/Makefile Mon Nov 27 22:02:29 2017 (r454995)
@@ -5,7 +5,7 @@
PORTNAME= ripgrep
PORTVERSION= 0.7.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= textproc
MAINTAINER= petteri.valkonen at iki.fi
@@ -68,11 +68,15 @@ PLIST_FILES= bin/rg \
man/man1/rg.1.gz
OPTIONS_DEFINE= BASH FISH ZSH SIMD
-OPTIONS_DEFAULT=BASH FISH ZSH SIMD
+OPTIONS_DEFAULT=BASH FISH ZSH
OPTIONS_DEFINE_amd64= AVX
OPTIONS_DEFINE_i386= AVX
+OPTIONS_DEFAULT_aarch64=SIMD
+OPTIONS_DEFAULT_amd64= ${OPTIONS_DEFAULT_i386}
+OPTIONS_DEFAULT_i386= ${MACHINE_CPU:tu:S/SSE2/SIMD/}
+
AVX_DESC= ${SSE_DESC:S/SSE/AVX/}
FISH_DESC= Install programmable completions for Fish
@@ -86,7 +90,8 @@ FISH_PLIST_FILES= share/fish/completions/rg.fish
# unstable features similar to how lang/rust bootstraps. www/firefox
# uses the same hack when building with --enable-rust-simd.
SIMD_MAKE_ENV= RUSTC_BOOTSTRAP=1
-SIMD_VARS= CARGO_FEATURES+=simd-accel
+SIMD_VARS= CARGO_FEATURES+=simd-accel ${SIMD_VARS_${ARCH}}
+SIMD_VARS_i386= RUSTFLAGS+="-C target-feature=+sse2"
ZSH_PLIST_FILES= share/zsh/site-functions/_rg
Modified: head/www/firefox/Makefile
==============================================================================
--- head/www/firefox/Makefile Mon Nov 27 21:47:44 2017 (r454994)
+++ head/www/firefox/Makefile Mon Nov 27 22:02:29 2017 (r454995)
@@ -3,7 +3,7 @@
PORTNAME= firefox
DISTVERSION= 57.0
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
More information about the svn-ports-all
mailing list