Quote:
Originally Posted by julio_jeorje
I am using rhel5.Linux kernel in my pc is 2.6.18-128.el5 and on my board is 2.6.12.The cross compiler I am using is gcc-4.1.0-glibc-2.3.2.Now I have char driver code in my pc which is implemented using a makefile.I Know how to crosscompile an ordinary .c file for the arm board. But, I would like to know how to crosscompile the char driver code for arm board.
|
Ok your question is a bit ambiguous but normally you'd have have your compiler say gcc or g++ you need to add the name of the cross compiler you are using rather than just gcc, you may also need to add the path to the cross compiler in you paths.
So to make for a normal file you have just g++ EG
TRGT =
CC =$(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
For the cross you need to add the full name to your compiler, so if you are using a arm compiler call ed arm-linux-g++ EG
TRGT =
arm-linux-
CC =$(TRGT)g++
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
I think we need a lot more information from you, like why doesn't it compile? What errors are you getting? Are you talking about compiling against you boards kernel?