From 9d3323abff91039587b942c40d00721ec5dd9e24a2333f9a01d5677fb46d66c7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 21 Feb 2015 22:50:57 +0000 Subject: [PATCH] - biosdevname-pic.patch: make cpuid() not expose %ebx out of assembler, so we can build it with -fPIE. OBS-URL: https://build.opensuse.org/package/show/Base:System/biosdevname?expand=0&rev=38 --- biosdevname-pic.patch | 20 ++++++++++++++++++++ biosdevname.changes | 6 ++++++ biosdevname.spec | 4 +++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 biosdevname-pic.patch diff --git a/biosdevname-pic.patch b/biosdevname-pic.patch new file mode 100644 index 0000000..00faa68 --- /dev/null +++ b/biosdevname-pic.patch @@ -0,0 +1,20 @@ +Index: biosdevname-0.5.0/src/bios_dev_name.c +=================================================================== +--- biosdevname-0.5.0.orig/src/bios_dev_name.c ++++ biosdevname-0.5.0/src/bios_dev_name.c +@@ -114,10 +114,13 @@ static u_int32_t + cpuid (u_int32_t eax, u_int32_t ecx) + { + asm volatile ( +- "xor %%ebx, %%ebx; cpuid" ++ "pushl %%ebx\n" ++ "xor %%ebx, %%ebx\n" ++ "cpuid\n" ++ "popl %%ebx\n" + : "=a" (eax), "=c" (ecx) + : "a" (eax) +- : "%ebx", "%edx"); ++ : "%edx"); + return ecx; + } + diff --git a/biosdevname.changes b/biosdevname.changes index be7172b..515f4d7 100644 --- a/biosdevname.changes +++ b/biosdevname.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Feb 21 22:49:47 UTC 2015 - meissner@suse.com + +- biosdevname-pic.patch: make cpuid() not expose %ebx out of + assembler, so we can build it with -fPIE. + ------------------------------------------------------------------- Thu Jan 22 13:02:08 UTC 2015 - trenn@suse.de diff --git a/biosdevname.spec b/biosdevname.spec index 0924757..7041581 100644 --- a/biosdevname.spec +++ b/biosdevname.spec @@ -1,7 +1,7 @@ # # spec file for package biosdevname # -# Copyright (c) 2015 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 @@ -32,6 +32,7 @@ Source0: %{name}-%{version}.tar.bz2 Patch1: ignore-broken-BIOSes Patch2: whitelist-dell Patch3: udev-rule-path.patch +Patch4: biosdevname-pic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: automake BuildRequires: pciutils-devel @@ -62,6 +63,7 @@ You can enable/disable usage of biosdevname with boot option %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build sed -i -e 's#@@BIOSDEVNAME_RULEDEST@@#'%{_udevrulesdir}'/71-biosdevname.rules#' configure.ac