From f2333f50ce112205fe3dfb9c1ef63f383edc05515c99282ffd705d411c7c2885 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 2 Mar 2016 12:39:59 +0000 Subject: [PATCH] Accepting request 364133 from home:michel_mno:branches:devel:tools:compiler - new nasm_change_unused.patch to avoid PowerPC build error OBS-URL: https://build.opensuse.org/request/show/364133 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/nasm?expand=0&rev=25 --- nasm.changes | 5 +++++ nasm.spec | 2 ++ nasm_change_unused.patch | 42 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 nasm_change_unused.patch diff --git a/nasm.changes b/nasm.changes index af8b2be..88f5051 100644 --- a/nasm.changes +++ b/nasm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 2 11:36:33 UTC 2016 - normand@linux.vnet.ibm.com + +- new nasm_change_unused.patch to avoid PowerPC build error + ------------------------------------------------------------------- Tue Mar 1 07:48:37 UTC 2016 - mpluskal@suse.com diff --git a/nasm.spec b/nasm.spec index 535a754..d533573 100644 --- a/nasm.spec +++ b/nasm.spec @@ -24,6 +24,7 @@ License: BSD-2-Clause Group: Development/Languages/Other Url: http://www.nasm.us/ Source: http://www.nasm.us/pub/nasm/releasebuilds/%{version}/nasm-%{version}.tar.xz +Patch1: nasm_change_unused.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: groff @@ -39,6 +40,7 @@ Read the licence agreement in %{_docdir}/nasm/Licence. %prep %setup -q +%patch1 -p1 %package doc Summary: Documentation for Nasm diff --git a/nasm_change_unused.patch b/nasm_change_unused.patch new file mode 100644 index 0000000..cca65c2 --- /dev/null +++ b/nasm_change_unused.patch @@ -0,0 +1,42 @@ +From: Michel Normand +Subject: nasm change unused +Date: Wed, 02 Mar 2016 12:38:37 +0100 + +nasm change _unused to xunused to avoid conflict +when building on PowerPC + +Signed-off-by: Michel Normand +--- + compiler.h | 4 ++-- + output/outmacho.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +Index: nasm-2.12/compiler.h +=================================================================== +--- nasm-2.12.orig/compiler.h ++++ nasm-2.12/compiler.h +@@ -82,9 +82,9 @@ + #endif + + #ifdef __GNUC__ +-# define _unused __attribute__((unused)) ++# define xunused __attribute__((unused)) + #else +-# define _unused ++# define xunused + #endif + + /* Some versions of MSVC have these only with underscores in front */ +Index: nasm-2.12/output/outmacho.c +=================================================================== +--- nasm-2.12.orig/output/outmacho.c ++++ nasm-2.12/output/outmacho.c +@@ -301,7 +301,7 @@ static uint64_t rel_padcnt = 0; + ALIGN(x, fmt.ptrsize) /* align x to output format width */ + + static void debug_reloc (struct reloc *); +-static void debug_section_relocs (struct section *) _unused; ++static void debug_section_relocs (struct section *) xunused; + + static struct section *get_section_by_name(const char *segname, + const char *sectname)