diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-03 21:19:56 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-03 21:19:56 +0000 |
commit | 1463ae147942c367db2888bd64adde4f9293af64 (patch) | |
tree | ad6b772fedb225fd1102f796be39f499737b06bf /sys-apps/lshw | |
parent | Keyworded ~sparc wrt #76093 (Manifest recommit) (diff) | |
download | gentoo-2-1463ae147942c367db2888bd64adde4f9293af64.tar.gz gentoo-2-1463ae147942c367db2888bd64adde4f9293af64.tar.bz2 gentoo-2-1463ae147942c367db2888bd64adde4f9293af64.zip |
Add patch to enable PIC building #61947.
Diffstat (limited to 'sys-apps/lshw')
-rw-r--r-- | sys-apps/lshw/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/lshw/files/02.00b-cpuid-PIC.patch | 40 | ||||
-rw-r--r-- | sys-apps/lshw/lshw-01.08a.ebuild | 4 | ||||
-rw-r--r-- | sys-apps/lshw/lshw-02.00b.ebuild | 5 |
4 files changed, 51 insertions, 6 deletions
diff --git a/sys-apps/lshw/ChangeLog b/sys-apps/lshw/ChangeLog index 36634158c5a4..7698a0810796 100644 --- a/sys-apps/lshw/ChangeLog +++ b/sys-apps/lshw/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-apps/lshw -# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.14 2004/12/21 22:15:01 vapier Exp $ +# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.15 2005/01/03 21:19:56 vapier Exp $ + + 03 Jan 2005; Mike Frysinger <vapier@gentoo.org> + +files/02.00b-cpuid-PIC.patch, lshw-02.00b.ebuild: + Add patch to enable PIC building #61947. 21 Dec 2004; Mike Frysinger <vapier@gentoo.org> +files/02.00b-dev.patch, lshw-02.00b.ebuild: diff --git a/sys-apps/lshw/files/02.00b-cpuid-PIC.patch b/sys-apps/lshw/files/02.00b-cpuid-PIC.patch new file mode 100644 index 000000000000..1223660668ea --- /dev/null +++ b/sys-apps/lshw/files/02.00b-cpuid-PIC.patch @@ -0,0 +1,40 @@ +The 'cpuid' assembly instruction is notorious for hating PIC. + +Here we code two different versions of the cpuid instruction ... +the first will work when dealing with PIC, while the second is +slightly faster and can be used with non-PIC. + +http://bugs.gentoo.org/show_bug.cgi?id=61947 + +--- src/core/cpuid.cc.orig 2005-01-03 15:21:57.034862112 -0500 ++++ src/core/cpuid.cc 2005-01-03 16:07:00.131928896 -0500 +@@ -68,9 +68,6 @@ + + #ifdef __i386__ + +-#define cpuid_up(in,a,b,c,d)\ +- asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in)); +- + static void cpuid(int cpunumber, + unsigned long idx, + unsigned long &eax, +@@ -96,7 +93,18 @@ + edx = (*(unsigned long *) (buffer + 12)); + } + else +- cpuid_up(idx, eax, ebx, ecx, edx); ++ asm( ++#ifdef __PIC__ ++ "pushl %%ebx\n" ++ "cpuid\n" ++ "movl %%ebx,%3\n" ++ "popl %%ebx\n" ++ : "=a" (eax), "=c" (ecx), "=d" (edx), "=m" (ebx) ++#else ++ "cpuid\n" ++ : "=a" (eax), "=c" (ecx), "=d" (edx), "=b" (ebx) ++#endif ++ : "a" (idx)); + } + + /* Decode Intel TLB and cache info descriptors */ diff --git a/sys-apps/lshw/lshw-01.08a.ebuild b/sys-apps/lshw/lshw-01.08a.ebuild index 82fa0979622e..7ea3976c156c 100644 --- a/sys-apps/lshw/lshw-01.08a.ebuild +++ b/sys-apps/lshw/lshw-01.08a.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-01.08a.ebuild,v 1.2 2004/12/20 15:44:26 matsuu Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-01.08a.ebuild,v 1.3 2005/01/03 21:19:56 vapier Exp $ inherit flag-o-matic diff --git a/sys-apps/lshw/lshw-02.00b.ebuild b/sys-apps/lshw/lshw-02.00b.ebuild index 76cda61f6817..3f7a339d0f21 100644 --- a/sys-apps/lshw/lshw-02.00b.ebuild +++ b/sys-apps/lshw/lshw-02.00b.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-02.00b.ebuild,v 1.2 2004/12/21 22:15:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-02.00b.ebuild,v 1.3 2005/01/03 21:19:56 vapier Exp $ inherit flag-o-matic eutils toolchain-funcs @@ -34,6 +34,7 @@ src_unpack() { || die "sed failed" epatch ${FILESDIR}/${PV}-dev.patch #75168 + epatch ${FILESDIR}/${PV}-cpuid-PIC.patch #61947 # cpuid.cc uses inline asm and can not be linked when # position independent code is desired. |