Hello,
I am porting a 2.4 RTAI kernel module to Xenomai 2.0 kernel 2.6. I used some basic math functions in the original module. This is posing problems for me now.
In the module source i include <math.h>. I add -I/usr/include to the compiler flags and also "-ffast-math -mhard-float".
If i compile this, i get warnings about double definitions of "__attribute_pure__" and "__attribute_used__".
If i insert the kernel module, i get an error message :
"Xenomai: Invalid use of FPU in Xenomai context at " + probably the address of the instruction where the math function is called.
Can anyone give me a hint ? Thanks.
This is the makefile :
obj-m := rt_canio.o
XENODIR = /usr/realtime
KDIR := /lib/modules/2.6.13.3/build
PWD := $(shell pwd)
EXTRA_CFLAGS := -I$(XENODIR)/include -I/usr/include -ffast-math -mhard-float
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
I am porting a 2.4 RTAI kernel module to Xenomai 2.0 kernel 2.6. I used some basic math functions in the original module. This is posing problems for me now.
In the module source i include <math.h>. I add -I/usr/include to the compiler flags and also "-ffast-math -mhard-float".
If i compile this, i get warnings about double definitions of "__attribute_pure__" and "__attribute_used__".
If i insert the kernel module, i get an error message :
"Xenomai: Invalid use of FPU in Xenomai context at " + probably the address of the instruction where the math function is called.
Can anyone give me a hint ? Thanks.
This is the makefile :
obj-m := rt_canio.o
XENODIR = /usr/realtime
KDIR := /lib/modules/2.6.13.3/build
PWD := $(shell pwd)
EXTRA_CFLAGS := -I$(XENODIR)/include -I/usr/include -ffast-math -mhard-float
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
Yahoo! FareChase - Search multiple travel sites in one click.
