From eca8ad823627d3513d3833225891fed971b35ce37052b7481d25145f4d1cbbc8 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 22 Feb 2015 12:13:48 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Base:System/libsmbios?expand=0&rev=18 --- libsmbios-pic-assembler.patch | 28 ++++++++++++++++++++++++++++ libsmbios.spec | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 libsmbios-pic-assembler.patch diff --git a/libsmbios-pic-assembler.patch b/libsmbios-pic-assembler.patch new file mode 100644 index 0000000..001ddee --- /dev/null +++ b/libsmbios-pic-assembler.patch @@ -0,0 +1,28 @@ +Index: libsmbios-2.2.28/src/bin/dellMediaDirectCtl.cpp +=================================================================== +--- libsmbios-2.2.28.orig/src/bin/dellMediaDirectCtl.cpp ++++ libsmbios-2.2.28/src/bin/dellMediaDirectCtl.cpp +@@ -196,17 +196,21 @@ void _callSmi(smiRegs *r, u8 port) + + __asm__ __volatile__ ( + // magic port ++ "push %%ebx\n\t" ++ "mov %0, %%ebx\n\t" + "outb %%al, %%dx \n\t" ++ "mov %%ebx,%1\n\t" ++ "pop %%ebx\n\t" + + : /* output args */ + "=a" (r->eax), +- "=b" (r->ebx), ++ "=g" (r->ebx), + "=c" (r->ecx), + "=S" (r->esi), + "=D" (r->edi) + : /* input args */ + "0" (r->eax), +- "1" (r->ebx), ++ "g" (r->ebx), + "2" (r->ecx), + "3" (r->esi), + "4" (r->edi), diff --git a/libsmbios.spec b/libsmbios.spec index 2a8ec57..b752dcc 100644 --- a/libsmbios.spec +++ b/libsmbios.spec @@ -1,7 +1,7 @@ # # spec file for package libsmbios # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,6 +29,7 @@ Group: System/Management Url: http://linux.dell.com/libsmbios/main/ Source0: http://linux.dell.com/libsmbios/download/libsmbios/libsmbios-%{version}/%{name}-%{version}.tar.bz2 Patch1: %{name}-2.2.28-fix-bashisms.patch +Patch2: %{name}-pic-assembler.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: doxygen @@ -125,6 +126,7 @@ substitutions in yum repository configuration files on Dell systems. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build %configure --disable-rpath