Greg Schafer wrote: > Bryan Kadzban wrote: > >> I've been running Alexander's tests >> (http://linuxfromscratch.org/pipermail/lfs-dev/2006-March/056159.html) >> > > I agree with Alexander that every userspace header should be > compilable by itself (at least in an ideal world). Note that current > LLH fails this criteria. Also note there are many kernel headers > simply not shipped with LLH.
I should have been a bit more specific: I wasn't filtering out headers that aren't in LLH (and I wasn't going to compile dosemu either). I was, however, only checking the stuff in include/linux and include/asm-i386. (I've attached the script I run, if anyone's interested. Run it from the same directory you run Jim's script. It takes 2 params, the kernel version to test and the architecture to symlink asm to (it symlinks asm to e.g. asm-i386 so that #include <asm/whatever> from the other headers doesn't pull in stuff from /usr/include/asm).)
#!/bin/bash
if [ -z "$1" -o -z "$2" -o "$1" == "-h" -o "$1" == "-?" ] ; then
echo "Usage: $0 kernel-version arch" 2>&1
exit 1
fi
echo "Starting tests..."
rm -f linux-headers-$1/include/asm
ln -sv asm-$2 linux-headers-$1/include/asm
base=`pwd`
headers=`find linux-headers-$1/include/linux/ linux-headers-$1/include/asm/
-type f -name '*.h'`
gccver=`gcc -dumpversion`
for header in $headers ; do
file=${header##linux-headers-$1/include/}
echo "#include <$file>" >thistest.c
if ! gcc -c -I$base/linux-headers-$1/include -Werror -o thistest.o
thistest.c ; then
echo "$header ($file) failed."
exit 1
fi
if ! gcc -c -I$base/linux-headers-$1/include -Werror -ansi -o
thistest.o thistest.c ; then
echo "$header ($file) failed."
exit 1
fi
done
rm -f thistest.c thistest.o
echo "All headers passed."
signature.asc
Description: OpenPGP digital signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
