diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2018-02-24 16:06:01 +0000 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2018-02-24 16:06:01 +0000 |
commit | 1a692c708b9e11e17e0b26dfe969729368dcd2d9 (patch) | |
tree | 58ea87862e9a8d82e0cf7fefa24abc966e4cd232 | |
parent | 54aa2711b8af13726dc0989da700ac568dff1e5c (diff) | |
parent | 71cce632fb6ba4af4640ffc41d39e940298665e2 (diff) |
merge patched into master
-rw-r--r-- | debian/.git-dpm | 4 | ||||
-rw-r--r-- | debian/patches/0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch | 38 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | tccelf.c | 2 |
4 files changed, 43 insertions, 2 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm index 9d48a89..fd7e773 100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm @@ -1,6 +1,6 @@ # see git-dpm(1) from git-dpm package -09f0871781d6462279d3ea97db05b0cc4d77d4d2 -09f0871781d6462279d3ea97db05b0cc4d77d4d2 +71cce632fb6ba4af4640ffc41d39e940298665e2 +71cce632fb6ba4af4640ffc41d39e940298665e2 e2ccf3981d78dfeb390d22c74625b60310100abb e2ccf3981d78dfeb390d22c74625b60310100abb tcc_0.9.27.orig.tar.bz2 diff --git a/debian/patches/0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch b/debian/patches/0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch new file mode 100644 index 0000000..ca2a4ad --- /dev/null +++ b/debian/patches/0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch @@ -0,0 +1,38 @@ +From 71cce632fb6ba4af4640ffc41d39e940298665e2 Mon Sep 17 00:00:00 2001 +From: Thomas Preud'homme <robotux@celest.fr> +Date: Sat, 24 Feb 2018 15:50:14 +0000 +Subject: Prevent dead code on !x86 in prepare_dynamic_rel + +In prepare_dynamic_rel() on non x86 targets the count++ statements +appear before any case label and are therefore dead code. This triggers +build failure when building with -Werror. This patch adds an extra guard +around all the x86 case labels and their associated action, leaving just +the default case label for non x86 targets which builds fine. + +Origin: vendor +Forwarded: no +Last-Updated: 2018-02-24 +--- + tccelf.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tccelf.c b/tccelf.c +index 70d47e15..be540d51 100644 +--- a/tccelf.c ++++ b/tccelf.c +@@ -873,6 +873,7 @@ static int prepare_dynamic_rel(TCCState *s1, Section *sr) + sym_index = ELFW(R_SYM)(rel->r_info); + type = ELFW(R_TYPE)(rel->r_info); + switch(type) { ++#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) + #if defined(TCC_TARGET_I386) + case R_386_32: + if (!get_sym_attr(s1, sym_index, 0)->dyn_index +@@ -896,6 +897,7 @@ static int prepare_dynamic_rel(TCCState *s1, Section *sr) + if (get_sym_attr(s1, sym_index, 0)->dyn_index) + count++; + break; ++#endif + default: + break; + } diff --git a/debian/patches/series b/debian/patches/series index 43899e0..5f5e7e2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Disable-test-not-working-on-i386.patch 0002-Disable-stack-protector-in-runtime-library.patch +0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch @@ -873,6 +873,7 @@ static int prepare_dynamic_rel(TCCState *s1, Section *sr) sym_index = ELFW(R_SYM)(rel->r_info); type = ELFW(R_TYPE)(rel->r_info); switch(type) { +#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64) #if defined(TCC_TARGET_I386) case R_386_32: if (!get_sym_attr(s1, sym_index, 0)->dyn_index @@ -896,6 +897,7 @@ static int prepare_dynamic_rel(TCCState *s1, Section *sr) if (get_sym_attr(s1, sym_index, 0)->dyn_index) count++; break; +#endif default: break; } |