Update patch with upstream version
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/rav1e?expand=0&rev=5
This commit is contained in:
parent
24f2913b7e
commit
9a7a883ef9
@ -1,13 +1,74 @@
|
||||
Index: rav1e-0.1.0/build.rs
|
||||
===================================================================
|
||||
--- rav1e-0.1.0.orig/build.rs 2019-11-09 06:20:33.000000000 +0100
|
||||
+++ rav1e-0.1.0/build.rs 2019-12-09 23:45:33.367254150 +0100
|
||||
@@ -56,7 +56,7 @@ fn build_nasm_files() {
|
||||
"src/x86/cdef.asm",
|
||||
"src/x86/tables.asm",
|
||||
],
|
||||
- &[&config_include_arg, "-Isrc/"],
|
||||
+ &[&config_include_arg, "-Isrc/", "-g", "-Fdwarf"],
|
||||
);
|
||||
println!("cargo:rustc-link-lib=static=rav1easm");
|
||||
rerun_dir("src/x86");
|
||||
From 8a04e0f27552adeef428d8abe688c4490e6f663c Mon Sep 17 00:00:00 2001
|
||||
From: Luca Barbato <lu_zero@gentoo.org>
|
||||
Date: Tue, 10 Dec 2019 11:44:19 +0100
|
||||
Subject: [PATCH] nasm_rs: Force the dwarf debug for elf targets
|
||||
|
||||
---
|
||||
crates/nasm_rs/src/lib.rs | 27 ++++++++++++++-------------
|
||||
1 file changed, 14 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/crates/nasm_rs/src/lib.rs b/crates/nasm_rs/src/lib.rs
|
||||
index eb032a0a0..c48a84efc 100644
|
||||
--- a/crates/nasm_rs/src/lib.rs
|
||||
+++ b/crates/nasm_rs/src/lib.rs
|
||||
@@ -9,35 +9,35 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
use std::process::Stdio;
|
||||
|
||||
-fn x86_triple(os: &str) -> &'static str {
|
||||
+fn x86_triple(os: &str) -> (&'static str, &'static str) {
|
||||
match os {
|
||||
- "darwin" => "-fmacho32",
|
||||
- "windows" => "-fwin32",
|
||||
- _ => "-felf32",
|
||||
+ "darwin" => ("-fmacho32", "-g"),
|
||||
+ "windows" => ("-fwin32", "-g"),
|
||||
+ _ => ("-felf32", "-gdwarf"),
|
||||
}
|
||||
}
|
||||
|
||||
-fn x86_64_triple(os: &str) -> &'static str {
|
||||
+fn x86_64_triple(os: &str) -> (&'static str, &'static str) {
|
||||
match os {
|
||||
- "darwin" => "-fmacho64",
|
||||
- "windows" => "-fwin64",
|
||||
- _ => "-felf64",
|
||||
+ "darwin" => ("-fmacho64", "-g"),
|
||||
+ "windows" => ("-fwin64", "-g"),
|
||||
+ _ => ("-felf64", "-gdwarf"),
|
||||
}
|
||||
}
|
||||
|
||||
-fn parse_triple(trip: &str) -> &'static str {
|
||||
+fn parse_triple(trip: &str) -> (&'static str, &'static str) {
|
||||
let parts = trip.split('-').collect::<Vec<_>>();
|
||||
// ARCH-VENDOR-OS-ENVIRONMENT
|
||||
// or ARCH-VENDOR-OS
|
||||
// we don't care about environ so doesn't matter if triple doesn't have it
|
||||
if parts.len() < 3 {
|
||||
- return "";
|
||||
+ return ("", "");
|
||||
}
|
||||
|
||||
match parts[0] {
|
||||
"x86_64" => x86_64_triple(parts[2]),
|
||||
"x86" | "i386" | "i586" | "i686" => x86_triple(parts[2]),
|
||||
- _ => "",
|
||||
+ _ => ("", ""),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,10 +243,11 @@ impl Build {
|
||||
}
|
||||
|
||||
fn get_args(&self, target: &str) -> Vec<&str> {
|
||||
- let mut args = vec![parse_triple(&target)];
|
||||
+ let (arch_flag, debug_flag) = parse_triple(&target);
|
||||
+ let mut args = vec![arch_flag];
|
||||
|
||||
if self.debug {
|
||||
- args.push("-g");
|
||||
+ args.push(debug_flag);
|
||||
}
|
||||
|
||||
for arg in &self.flags {
|
||||
|
Loading…
Reference in New Issue
Block a user