[opensuse] hwinfo can't be rebuilt at 64bit Linux
I try to rebuild hwinfo at RHEL for 64-bit. But there are some errors: gcc -c -Wall -O2 -pipe -g -fPIC -I../../src/hd cpu.c {standard input}: Assembler messages: {standard input}:368: Error: suffix or operands invalid for `push' {standard input}:373: Error: suffix or operands invalid for `pop' and I found the reason is: Instructions that modify the stack (push, pop, call, ret, enter, and leave) are implicitly 64-bit. I fix the source as the following: --- hwinfo-8.99.old/src/hd/cpu.c 2007-03-28 10:13:42.000000000 +0800 +++ hwinfo-8.99/src/hd/cpu.c 2007-03-28 10:16:57.000000000 +0800 @@ -494,19 +494,30 @@ ADD2LOG("----- /proc/cpuinfo end -----\n"); } - #if defined(__i386__) || defined(__x86_64__) inline unsigned units_per_cpu() { unsigned u; asm( +#if defined(__i386__) "push %%ebx\n\t" +#else + "push %%rbx\n\t" +#endif "mov $1,%%eax\n\t" "cpuid\n\t" +#if defined(__i386__) "shr $8,%%ebx\n\t" +#else + "shr $8,%%rbx\n\t" +#endif "movzx %%bh,%%eax\n\t" +#if defined(__i386__) "pop %%ebx" +#else + "pop %%rbx" +#endif : "=a" (u) :: "%ecx", "%edx" ); Anyone have met this status? Thanks Zhao -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Zhao Shujing <gldyszh@gmail.com> [03-27-07 22:40]:
I try to rebuild hwinfo at RHEL for 64-bit. But there are some errors: [...] Anyone have met this status?
Someone in one of the RH lists may have, but why rebuild? If you are running openSUSE, hwinfo is provided, hwinfo-12.29-3, on the install iso. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 28 Mar 2007, Zhao Shujing wrote:
I try to rebuild hwinfo at RHEL for 64-bit. But there are some errors:
gcc -c -Wall -O2 -pipe -g -fPIC -I../../src/hd cpu.c {standard input}: Assembler messages: {standard input}:368: Error: suffix or operands invalid for `push' {standard input}:373: Error: suffix or operands invalid for `pop'
and I found the reason is:
Instructions that modify the stack (push, pop, call, ret, enter, and leave) are implicitly 64-bit.
I fix the source as the following:
--- hwinfo-8.99.old/src/hd/cpu.c 2007-03-28 10:13:42.000000000 +0800 +++ hwinfo-8.99/src/hd/cpu.c 2007-03-28 10:16:57.000000000 +0800
[...] That's really an old version. You might try the latest from openSUSE instead. The issue you mention has been addressed about 3 years ago! Steffen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Patrick Shanahan
-
Steffen Winterfeldt
-
Zhao Shujing