[LLVMdev] Adding ClamAV to the llvm testsuite (long)

Chris Lattner sabre at nondot.org
Mon Dec 17 17:45:39 PST 2007


On Mon, 17 Dec 2007, [ISO-8859-1] Török Edwin wrote:
> Evan Cheng wrote:
> I could make an clamav-config.h that should work if compiled with llvm-gcc.
> Can I assume <endian.h> exists on all your platforms?
> [or how else can I detect endianness by using only macros from headers?]
>
> I've seen a Makefile having if $(ENDIAN), can I use that to pass
> -DWORDS_BIGENDIAN=... to the compiler?
>
> Or I can create a config.h that assumes the platform is bigendian
> (assuming little-endian would SIGBUS on Sparc).

Assuming endianness or presence of endian.h won't work, however, we 
already have an ENDIAN make flag you can use.  For example see how 
External/SPEC/CINT2000/186.crafty/Makefile handles it.

Thanks, having a better testsuite is very very useful!

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list