asflags while cross compiling a kernel module (wind river linux v4)

Hello

I am trying to pass certain parameters to the wind river gnu assembler and I want this to apply only while compiling a certain module. Hence in the ma kefile for that module, Ive added the following:

#ppc_TARGET_FUNDAMENTAL_CFLAGS += -Wa,-alh=$

Reply to
aijazbaig1.new
Loading thread data ...

and I want this to apply only while compiling a certain module. Hence in the makefile for that module, Ive added the following:

phase but it didn't work out so I tried to pass them directly to the assembler but this also does NOT seem to work :(.

(or assembly language file) but it looks like it is not getting that message. I had earlier tried adding this to KBUILD_CFLAGS but then in the top level Makefile, it is recommended that one should NOT modify the 'native' Makefile in any way instead play around with the windriver 'enhanced' make variables hence my approach above.

This is basic makefile processing. Try reading the manual.

formatting link

Hint: create specific targets for the .s and .o files that override the default .c.o processing (if you use default processing).

mymodule.o : mymodule.s #commands to assemble .s file

mymodule.s : mymodule.c #commands to compile to assembler

Reply to
George Neuner

nd I want this to apply only while compiling a certain module. Hence in the makefile for that module, Ive added the following:

phase but it didn't work out so I tried to pass them directly to the assemb ler but this also does NOT seem to work :(.

or assembly language file) but it looks like it is not getting that message . I had earlier tried adding this to KBUILD_CFLAGS but then in the top leve l Makefile, it is recommended that one should NOT modify the 'native' Makef ile in any way instead play around with the windriver 'enhanced' make varia bles hence my approach above.

I do know that George. However, as you can see i'm using wind river linux a nd as such, wind river has created wrapper makefiles over and above the top level makefile of the kernel proper.

The primary reason for sticking with the wind river makefile variables (and flag wrappers) is because I do not know what all options are being passed to the compiler via all these wind river specific wrappers. Besides I will then have to invoke the compiler with the very same options that are being passed to the compiler. Perhaps invoke the compiler directly using implicit rules and using CFLAGS, ASFLAGS and LDFLAGs directly in it? I could try do ing that however if someone knows how to use wind river linux variables the n it might be more acceptable to the management folks!

Perhaps only setting the rule to create the assembly file without asking it to create the object file might give a hint to the compiler to do as we sa y and not destroy the intermediate .s file. Is it?

Reply to
aijazbaig1.new

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.