Package: hwinfo
Version: 8.38-3
Severity: normal
Tags: patch
When building 'hwinfo' on ppc64/unstable with gcc-4.0,
I get the following error:
make[4]: Entering directory `/hwinfo-8.38/build-tree/hwinfo-8.38/src/ids'
gcc -c -Wall -O2 -pipe -g -I../../src/hd hd_ids.c
In file included from hd_ids.c:5:
hd_ids.h:11: error: non-static declaration of 'hddb_internal_list' follows
static declaration
hd_ids.h:1: error: previous declaration of 'hddb_internal_list' was here
hd_ids.h:11805: error: non-static declaration of 'hddb_internal_ids' follows
static declaration
hd_ids.h:2: error: previous declaration of 'hddb_internal_ids' was here
hd_ids.h:17688: error: non-static declaration of 'hddb_internal_strings'
follows static declaration
hd_ids.h:3: error: previous declaration of 'hddb_internal_strings' was here
make[4]: *** [hd_ids.o] Error 1
make[4]: Leaving directory `/hwinfo-8.38/build-tree/hwinfo-8.38/src/ids'
The attached patch fixes this and also some other ppc64/gcc-4.0 related
problems.
Regards
Andreas Jochens
diff -urN ../tmp-orig/hwinfo-8.38/debian/patches/810_hppa_and_m68k_port
./debian/patches/810_hppa_and_m68k_port
--- ../tmp-orig/hwinfo-8.38/debian/patches/810_hppa_and_m68k_port
2005-04-10 19:43:57.163212998 +0200
+++ ./debian/patches/810_hppa_and_m68k_port 2005-04-10 19:37:45.366436660
+0200
@@ -6,14 +6,14 @@
*/
-#if defined(__i386__) || defined(__x86_64__) || defined(__PPC__) ||
defined(__alpha__) || defined(__ia64__) || defined(__arm__) || defined(__mips__)
-+#if defined(__i386__) || defined(__x86_64__) || defined(__PPC__) ||
defined(__alpha__) || defined(__ia64__) || defined(__arm__) ||
defined(__mips__) || defined(__hppa__) || defined(__mc68000__)
++#if defined(__i386__) || defined(__x86_64__) || defined(__PPC__) ||
defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) ||
defined(__arm__) || defined(__mips__) || defined(__hppa__) ||
defined(__mc68000__)
void hd_scan_kbd(hd_data_t *hd_data)
{
diff -ruN hwinfo-8.38/src/hd/hd.c hwinfo-8.38.new/src/hd/hd.c
--- hwinfo-8.38/src/hd/hd.c 2004-04-06 11:45:52.000000000 +0200
+++ hwinfo-8.38.new/src/hd/hd.c 2004-06-10 21:21:47.000000000 +0200
-@@ -111,6 +111,14 @@
+@@ -111,6 +111,18 @@
#define HD_ARCH "x86-64"
#endif
@@ -25,6 +25,10 @@
+#define HD_ARCH "m68k"
+#endif
+
++#ifdef __powerpc64__
++#define HD_ARCH "ppc64"
++#endif
++
typedef struct disk_s {
struct disk_s *next;
unsigned crc;
diff -urN ../tmp-orig/hwinfo-8.38/debian/patches/820_gcc4_fix
./debian/patches/820_gcc4_fix
--- ../tmp-orig/hwinfo-8.38/debian/patches/820_gcc4_fix 1970-01-01
01:00:00.000000000 +0100
+++ ./debian/patches/820_gcc4_fix 2005-04-10 19:43:52.022198244 +0200
@@ -0,0 +1,83 @@
+diff -urN tmp/src/int10/i10_v86.c hwinfo-8.38/src/int10/i10_v86.c
+--- tmp/src/int10/i10_v86.c 2003-10-28 11:44:31.000000000 +0100
++++ hwinfo-8.38/src/int10/i10_v86.c 2005-04-10 15:16:13.637536983 +0200
+@@ -230,7 +230,8 @@
+
SEG_ADR((CARD8 *),es,di),
+
CPU_REG_LW(eflags)&DF,
+
(is_rep? LWECX:1));
+- if (is_rep) LWECX = 0;
++ if (is_rep) { if (prefix66 ^ prefix67) CPU_REG(ecx) = 0; else
CPU_REG_LW(ecx) = 0;}
++
+ CPU_REG_LW(eip)++;
+ break;
+
+@@ -249,7 +250,7 @@
+
CPU_REG_LW(eflags)&DF,
+
(is_rep? LWECX:1));
+ }
+- if (is_rep) LWECX = 0;
++ if (is_rep) { if (prefix66 ^ prefix67) CPU_REG(ecx) = 0; else
CPU_REG_LW(ecx) = 0;}
+ CPU_REG_LW(eip)++;
+ break;
+
+@@ -259,7 +260,7 @@
+ CPU_REG_LW(esi) +=
port_rep_outb(CPU_REG_LW(edx),(CARD8*)INT2PTR(LIN_PREF_SI),
+
CPU_REG_LW(eflags)&DF,
+
(is_rep? LWECX:1));
+- if (is_rep) LWECX = 0;
++ if (is_rep) { if (prefix66 ^ prefix67) CPU_REG(ecx) = 0; else
CPU_REG_LW(ecx) = 0;}
+ CPU_REG_LW(eip)++;
+ break;
+
+@@ -278,7 +279,7 @@
+
CPU_REG_LW(eflags)&DF,
+
(is_rep? LWECX:1));
+ }
+- if (is_rep) LWECX = 0;
++ if (is_rep) { if (prefix66 ^ prefix67) CPU_REG(ecx) = 0; else
CPU_REG_LW(ecx) = 0;}
+ CPU_REG_LW(eip)++;
+ break;
+
+diff -urN tmp/src/ids/check_hd.c hwinfo-8.38/src/ids/check_hd.c
+--- tmp/src/ids/check_hd.c 2003-09-08 18:30:31.000000000 +0200
++++ hwinfo-8.38/src/ids/check_hd.c 2005-04-10 19:42:41.546703368 +0200
+@@ -2818,7 +2818,7 @@
+ hddb.strings_len, hddb.strings_len
+ );
+
+- fprintf(f, "hddb_list_t hddb_internal_list[%u] = {\n", hddb.list_len);
++ fprintf(f, "static hddb_list_t hddb_internal_list[%u] = {\n",
hddb.list_len);
+ for(u = 0; u < hddb.list_len; u++) {
+ fprintf(f,
+ " { 0x%08x, 0x%08x, 0x%08x, 0x%08x }%s\n",
+@@ -2829,7 +2829,7 @@
+ }
+ fprintf(f, "};\n\n");
+
+- fprintf(f, "unsigned hddb_internal_ids[%u] = {\n", hddb.ids_len);
++ fprintf(f, "static unsigned hddb_internal_ids[%u] = {\n", hddb.ids_len);
+ for(u = 0; u < hddb.ids_len; u++) {
+ if((u % 6) == 0) fputc(' ', f);
+ fprintf(f, " 0x%08x", hddb.ids[u]);
+@@ -2840,7 +2840,7 @@
+
+ qstr = quote_string(hddb.strings, hddb.strings_len);
+ qstr_len = qstr ? strlen(qstr) : 0;
+- fprintf(f, "char hddb_internal_strings[%u] = \"\\\n", hddb.strings_len);
++ fprintf(f, "static char hddb_internal_strings[%u] = \"\\\n",
hddb.strings_len);
+ for(u = 0; u < qstr_len; ) {
+ len = qstr_len - u;
+ if(len > 72) len = 72;
+diff -urN tmp/Makefile hwinfo-8.38/Makefile
+--- tmp/Makefile 2004-03-28 18:27:42.000000000 +0200
++++ hwinfo-8.38/Makefile 2005-04-10 19:41:00.814002994 +0200
+@@ -8,7 +8,7 @@
+
+ include Makefile.common
+
+-SHARED_FLAGS =
++SHARED_FLAGS = -fPIC
+ OBJS_NO_TINY = names.o parallel.o modem.o
+
+ .PHONY: fullstatic static shared tiny doc diet tinydiet uc tinyuc
+
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]