makefile - GNU make is adding white space after -I (shared directory) option -


i'm trying use armclang compiler through gnu makefile, there clash between both tools when using -i option.

for armclang compiler, -i means "adds specified directory list of places searched find included files.syntax -idir" without space.

for gnu makefile ‘-i dir’ has same meaning (but space).

in makefile have following:

$(aarch32_bootobj): %.o: %.s      @echo " [asm ] $<"      @armclang --target=armv8a-arm-none-eabi -icommon/shared -c $< -o $@ 

when running makefile, i'm getting following warning , error :

    armclang: warning: argument unused during compilation: '-i common/shared'     aarch32/shared/bootcode.s:32:10: error: not find include file 'boot_defs.hs' 

where boot_defs.hs exists under common/shared

when running same armclang command outside makefile, works. therefore i'm assuming makefile has formatted -icommon/share option , added automatic space after -i.

is there way run armclang command correctly? in other worlds, possible let makefile parse -icommon/shared without automatic formatting?

i have been trying lot of tricks workaround without success.

thanks lot in advance.

gnu make doesn't split -icommon/shared option, , if did armclang able parse that. if remove @ armclang call in makefile, you'll see make , -icommon/shared parameter remains intact.

your problem armclang; see this bug on tracker. doesn't pass -i flags integrated assembler. workaround, then, should pass -no-integrated-as armclang:

     @armclang -no-integrated-as --target=armv8a-arm-none-eabi -icommon/shared -c $< -o $@ 

if doesn't work, replace .include directive #include , either rename asm files .s (upper-case s), indicates need c preprocessing, or pass armclang -x assembler-with-cpp flag. behavior of documented here.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -