samedi 9 janvier 2016

inline assembly error while compiling linux kernel 2.4.0

Vote count: 0

I am trying to compile linux kernel 2.4.0 on Ubuntu 15.10 32-bit. I receive this errors while building:

linux/include/asm/checksum.h:161:2: error: missing terminating " character linux/include/asm/checksum.h:173:3: error: missing terminating " character ...

What gcc is complaining are the quotations in the inline assembly:

static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
                                                     struct in6_addr *daddr,
                                                     __u32 len,
                                                     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
                "
                : "=&r" (sum)
                : "r" (saddr), "r" (daddr),
                  "r"(htonl(len)), "r"(htonl(proto)), "0"(sum));

        return csum_fold(sum);
}

I am not sure why this happens. Is it because incompatible gcc version? My current gcc version is gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010.

asked 37 secs ago

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.



inline assembly error while compiling linux kernel 2.4.0

Aucun commentaire:

Enregistrer un commentaire