From e440bfb992b5dbc6984d129d2b101147a9f02cd3 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 27 Apr 2016 09:18:38 -0700 Subject: [PATCH] Pass -m32/-march=pentium for i586 linux --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d0fbb65..a985793 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -431,7 +431,7 @@ impl Config { if target.contains("-ios") { self.ios_flags(&mut cmd); } else if !msvc { - if target.contains("i686") { + if target.contains("i686") || target.contains("i586") { cmd.args.push("-m32".into()); } else if target.contains("x86_64") || target.contains("powerpc64") { cmd.args.push("-m64".into()); @@ -454,6 +454,9 @@ impl Config { cmd.args.push("-march=armv6".into()); cmd.args.push("-marm".into()); } + if target.starts_with("i586-unknown-linux-") { + cmd.args.push("-march=pentium".into()); + } } if self.cpp && !msvc {