bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] The Hurd can't be compiled with gcc-3.3


From: Ognyan Kulev
Subject: [PATCH] The Hurd can't be compiled with gcc-3.3
Date: Wed, 07 May 2003 09:47:53 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030430 Debian/1.3-5

Hi,

Due to some changes in GCC 3.3[1], Debian's gcc-3.3 package gives errors while compiling some parts of the Hurd. Notice that gcc-3.2_3.2.3-1 will soon enter Debian's archives (according to Michael Banck) and it gives Internal error[2]. This is not reported as probably noone would care to fix 3.2.3 knowing that 3.3 works. So one of the choices would be to switch to gcc-3.3.

[1] http://gcc.gnu.org/gcc-3.3/changes.html
[2] http://mail.gnu.org/archive/html/bug-hurd/2003-05/msg00020.html

Regards
--
Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""
pfinet/ChangeLog:

2003-05-07  Ognyan Kulev  <ogi@fmi.uni-sofia.bg>

        * linux-src/include/asm-i386/checksum.h (ip_fast_csum): Use
        string literals concatenation instead of multi-line string
        literal.
        (csum_fold): Likewise.
        (csum_tcpudp_nofold): Likewise.
        (csum_ipv6_magic): Likewise.

        * linux-src/include/net/sock.h (SOCK_DEBUG): Don't use ## to
        concatenate string literals.

serverboot/ChangeLog:

2003-05-07  Ognyan Kulev  <ogi@fmi.uni-sofia.bg>

        * strfcns.c: #include <stdarg.h> instead of <varargs.h>.
        (strbuild): Use <stdarg.h>-style for handling variable argument
        list.

        * load.c: Don't #include <varargs.h>.

diff -urpN hurd.orig/pfinet/linux-src/include/asm-i386/checksum.h 
hurd/pfinet/linux-src/include/asm-i386/checksum.h
--- hurd.orig/pfinet/linux-src/include/asm-i386/checksum.h      2003-05-07 
12:05:55.000000000 +0300
+++ hurd/pfinet/linux-src/include/asm-i386/checksum.h   2003-05-07 
12:06:33.000000000 +0300
@@ -87,25 +87,24 @@ static inline unsigned short ip_fast_csu
                                          unsigned int ihl) {
        unsigned int sum;
 
-       __asm__ __volatile__("
-           movl (%1), %0
-           subl $4, %2
-           jbe 2f
-           addl 4(%1), %0
-           adcl 8(%1), %0
-           adcl 12(%1), %0
-1:         adcl 16(%1), %0
-           lea 4(%1), %1
-           decl %2
-           jne 1b
-           adcl $0, %0
-           movl %0, %2
-           shrl $16, %0
-           addw %w2, %w0
-           adcl $0, %0
-           notl %0
-2:
-           "
+       __asm__ __volatile__(
+"          movl (%1), %0\n"
+"          subl $4, %2\n"
+"          jbe 2f\n"
+"          addl 4(%1), %0\n"
+"          adcl 8(%1), %0\n"
+"          adcl 12(%1), %0\n"
+"1:        adcl 16(%1), %0\n"
+"          lea 4(%1), %1\n"
+"          decl %2\n"
+"          jne 1b\n"
+"          adcl $0, %0\n"
+"          movl %0, %2\n"
+"          shrl $16, %0\n"
+"          addw %w2, %w0\n"
+"          adcl $0, %0\n"
+"          notl %0\n"
+"2:"
        /* Since the input registers which are loaded with iph and ipl
           are modified, we must also specify them as outputs, or gcc
           will assume they contain their original values. */
@@ -120,10 +119,8 @@ static inline unsigned short ip_fast_csu
 
 static inline unsigned int csum_fold(unsigned int sum)
 {
-       __asm__("
-               addl %1, %0
-               adcl $0xffff, %0
-               "
+       __asm__("addl %1, %0\n"
+               "adcl $0xffff, %0\n"
                : "=r" (sum)
                : "r" (sum << 16), "0" (sum & 0xffff0000)
        );
@@ -136,12 +133,11 @@ static inline unsigned long csum_tcpudp_
                                                   unsigned short proto,
                                                   unsigned int sum) 
 {
-    __asm__("
-       addl %1, %0
-       adcl %2, %0
-       adcl %3, %0
-       adcl $0, %0
-       "
+    __asm__(
+       "addl %1, %0\n"
+       "adcl %2, %0\n"
+       "adcl %3, %0\n"
+       "adcl $0, %0\n"
        : "=r" (sum)
        : "g" (daddr), "g"(saddr), "g"((ntohs(len)<<16)+proto*256), "0"(sum));
     return sum;
@@ -176,19 +172,17 @@ static __inline__ unsigned short int csu
                                                     unsigned short proto,
                                                     unsigned int sum) 
 {
-       __asm__("
-               addl 0(%1), %0
-               adcl 4(%1), %0
-               adcl 8(%1), %0
-               adcl 12(%1), %0
-               adcl 0(%2), %0
-               adcl 4(%2), %0
-               adcl 8(%2), %0
-               adcl 12(%2), %0
-               adcl %3, %0
-               adcl %4, %0
-               adcl $0, %0
-               "
+       __asm__("addl 0(%1), %0\n"
+               "adcl 4(%1), %0\n"
+               "adcl 8(%1), %0\n"
+               "adcl 12(%1), %0\n"
+               "adcl 0(%2), %0\n"
+               "adcl 4(%2), %0\n"
+               "adcl 8(%2), %0\n"
+               "adcl 12(%2), %0\n"
+               "adcl %3, %0\n"
+               "adcl %4, %0\n"
+               "adcl $0, %0\n"
                : "=&r" (sum)
                : "r" (saddr), "r" (daddr), 
                  "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum));
diff -urpN hurd.orig/pfinet/linux-src/include/net/sock.h 
hurd/pfinet/linux-src/include/net/sock.h
--- hurd.orig/pfinet/linux-src/include/net/sock.h       2003-05-07 
12:06:00.000000000 +0300
+++ hurd/pfinet/linux-src/include/net/sock.h    2003-05-07 12:06:41.000000000 
+0300
@@ -349,7 +349,7 @@ struct tcp_opt {
 /* Define this to get the sk->debug debugging facility. */
 #define SOCK_DEBUGGING
 #ifdef SOCK_DEBUGGING
-#define SOCK_DEBUG(sk, msg...) do { if((sk) && ((sk)->debug)) 
printk(KERN_DEBUG ## msg); } while (0)
+#define SOCK_DEBUG(sk, msg...) do { if((sk) && ((sk)->debug)) 
printk(KERN_DEBUG msg); } while (0)
 #else
 #define SOCK_DEBUG(sk, msg...) do { } while (0)
 #endif
diff -urpN hurd.orig/serverboot/load.c hurd/serverboot/load.c
--- hurd.orig/serverboot/load.c 2003-05-07 12:06:04.000000000 +0300
+++ hurd/serverboot/load.c      2003-05-07 12:06:30.000000000 +0300
@@ -27,7 +27,6 @@
 #include <stddef.h>
 #include <assert.h>
 #include <mach/mach_interface.h>
-#include <varargs.h>
 #include "mach-exec.h"
 #include "../boot/boot_script.h"
 
diff -urpN hurd.orig/serverboot/strfcns.c hurd/serverboot/strfcns.c
--- hurd.orig/serverboot/strfcns.c      2003-05-07 12:06:04.000000000 +0300
+++ hurd/serverboot/strfcns.c   2003-05-07 12:06:30.000000000 +0300
@@ -27,7 +27,7 @@
  * Character subroutines
  */
 
-#include <varargs.h>
+#include <stdarg.h>
 
 #define        EXPORT_BOOLEAN
 #include <mach/boolean.h>
@@ -40,21 +40,20 @@
  */
 /*VARARGS1*/
 char *
-strbuild(dest, va_alist)
-       register char * dest;
-       va_dcl
+strbuild(char *dest, ...)
 {
        va_list argptr;
        register char * src;
        register int    c;
 
-       va_start(argptr);
+       va_start(argptr, dest);
        while ((src = va_arg(argptr, char *)) != (char *)0) {
 
            while ((c = *src++) != '\0')
                *dest++ = c;
        }
        *dest = '\0';
+       va_end(argptr);
        return (dest);
 }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]