News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

calling compiler in "commands" section of build options

Started by BrianSidebotham, November 27, 2006, 01:29:40 PM

Previous topic - Next topic

BrianSidebotham

Hi guys,

Is there a variable I can use to call the compiler in the commands (post build) build options dialog for a target? I've tried $cc $(cc) $c $(c) but they all get omitted.

Thanks,

Brian.

thomas

As of revision 3287, you can use TARGET_CC, TARGET_CPP, TARGET_LD, and TARGET_LIB.

EDIT: The "standard" variable $CC was purposely not used, since this might otherwise break builds that depend on $CC being set by the environment.
If you do have $CC on your environment, it will be replaced, by the way.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BrianSidebotham

Hi thomas,

working under windows, so no $cc variable defined.

Either you typed very fast, or my question was extremely well timed. Am updating to svn 3287 now. I updated this morning, and got confused when I couldn't find TARGET_CC in the source when I read your reply.

Thanks very much, that's just what I needed!

thomas

Quote from: BrianSidebotham on November 27, 2006, 04:04:39 PMI updated this morning, and got confused when I couldn't find TARGET_CC in the source when I read your reply.
That must be an interesting physical phenomenon related to electrons travelling faster than light and going back in time, because I posted the above (15:03:01 CET) only after committing the changes (15:01:25 CET) and re-updating. So, at any rate, I don't see how you could have read about TARGET_xxx without them being present in svn :)

Anyway, hope that solves your problem :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BrianSidebotham

I guess you just type fast! ;)

That's sorted everything. Thanks.

I created a compiler for avr-gcc. It could do with a custom project setup as it needs post build steps to extract different code sections to hex files using objcopy and objdump.

c::b doesn't have them setup as compiler programs, so it has to be hardcoded. :(

Maybe the avr-gcc compiler is of use to the c::b project?