-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
Showing
5 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
lang/rust/files/patch-src_librustc__back_target_i686__unknown__freebsd.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
PORTNAME= ripgrep | ||
PORTVERSION= 0.7.1 | ||
PORTREVISION= 2 | ||
PORTREVISION= 3 | ||
CATEGORIES= textproc | ||
|
||
MAINTAINER= [email protected] | ||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters