Making Netgraph compile with LLVM
Ed Schouten
ed at 80386.nl
Sun Mar 1 08:18:30 PST 2009
Hello all,
It turns out Netgraph uses a language construct that is only allowed
with GCC, but not with LLVM. According to the specs, LLVM's behaviour is
correct. It is not allowed to do this:
struct a {
struct {
int i;
char j[];
} b;
char k[20];
};
error: variable sized type 'b' must be at end of struct or class
Diane Bruce and I thought this patch should solve this issue:
http://80386.nl/pub/ng.diff
Yes, I know, the solution isn't really elegant, but I think this is the
only way to do this safely. Diane and I also compared the output of
objdump and they seem to be equivalent, except for some reordering.
Objections before I commit this to SVN?
--
Ed Schouten <ed at 80386.nl>
WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20090301/8e4a4c55/attachment.pgp
More information about the freebsd-net
mailing list