[ewg] how to use /usr/src/ofa_kernel to build with the OFED stack

Brian J. Murrell brian at sun.com
Mon Jan 26 09:53:27 PST 2009


Is there a document that explains exactly what I should do in my kernel
module to have it build with the OFED stack, like in terms of compiler
flags, linker, etc.?

Currently my compiler line looks like this:

gcc ... -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.3.2/include ... \
    -I/usr/src/ofa_kernel/kernel_addons/backport/2.6.18-EL5.2/include/ \
    -I/usr/src/ofa_kernel/include \
    -I/usr/src/ofa_kernel/kernel_addons/backport/2.6.18-EL5.2/include/ \
    -Iinclude -include include/linux/autoconf.h ... \
    -I/usr/src/ofa_kernel/kernel_addons/backport/2.6.18-EL5.2/include/ \
    -I/usr/src/ofa_kernel/include \
    -include /<my_software>/build/HEAD/config.h -c \
    -o /<my_software>/build/HEAD/foo.o /<my_software>/build/HEAD/foo.c

(Not sure why/how the kernel_addons/backport/2.6.18-EL5.2/include/ got
listed three times but it should not make a difference in this case)

I want to be sure I am building my compiler command correctly.

This is in regard to my previous posting, "OFED 1.4's autoconf.h
conflicting with kernel".  I just want to ensure that my basic
understanding is correct.

Thanx,
b.





More information about the ewg mailing list