Hi
I am having a problem I do not understand. I have linux 2.6.24.3 as the
guest and gcc 4.2.1.
If I compile a kernel driver inside the UML tree using memcpy and including
<linux/string.h> I have no problem. It works.
But I have an SDK which is outside the UML tree and If I try to build a
library that is going to be linked to a kernel module
I got this error.
error: 'memcpy' undeclared here (not in a function)
So I had to get the CFLAGS and includes manually and put them into the
makefiles.
The funny part is that in the .d file I see the dependency correctly but
somehow it is not picking memcpy or even memset:
kernel/linux-2.6.24.3/include/linux/string.h \
kernel/kobjs/include2/asm/string.h \
kernel/kobjs/include/asm/arch/string.h \
kernel/kobjs/include/asm/arch/string_32.h \
So what could I have wrong. My includes as a reference are:
-I$(SW)/kernel/kobjs/include2 \
-I$(SW)/kernel/linux-2.6.24.3/include \
-I$(SW)/kernel/linux-2.6.24.3/arch/um/include \
-I$(SW)/kernel/linux-2.6.24.3/arch/um/include/skas \
-I$(SW)/kernel/kobjs/include \
-I$(SW)/kernel/kobjs/arch/um/include
and my flags are:
-D__KERNEL__ -Iinclude -Os -D__arch_um__ -DSUBARCH=\"i386\"
-fsigned-char -msoft-float -pipe \
-Wno-uninitialized \
-Dvmap=kernel_vmap \
-Din6addr_loopback=kernel_in6addr_loopback \
-Din6addr_any=kernel_in6addr_any -march=i686
-mpreferred-stack-boundary=2 -ffreestanding -D_LARGEFILE64_SOURCE \
-Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask
-Dmktime=kernel_mktime \
-fno-omit-frame-pointer -fno-optimize-sibling-calls -g \
-include $(SW)/kernel/kobjs/include/linux/autoconf.h -DMODULE
-DKBUILD_MODNAME=\"SDK\"
thanks for any input.
David
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user