http://llvm.org/bugs/show_bug.cgi?id=9254

           Summary: clang can't build iptables in Linux kernel: error:
                    fields must have a constant size: 'variable length
                    array in structure' extension will never be supported
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
        Depends on: 4068


clang doesn't support this, and says it won't:
crypto/hmac.c:57:8: error: fields must have a constant size: 'variable length
array in structure' extension will never be supported
                char ctx[crypto_shash_descsize(hash)];


That part of kernel code should probably be rewritten to not use this, but more
and more kernel code seems to turn up that uses this feature of gcc.
It used to be only the crypto API, now it is iptables too.

Meanwhile I opened this bug to document how to turn off the problematic parts
of the kernel, and its dependencies.
You need to turn off these:
CONFIG_INET_AH
CONFIG_INET_ESP
CONFIG_INET6_AH
CONFIG_INET6_ESP
CONFIG_NETFILTER
CONFIG_LIBCRC32C

The iptables is a problem though, without it we can't really say that "clang
builds a Linux kernel".
How hard would it be to implement this specific case in clang?
And how hard would it be to patch the kernel to not use this feature?

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to