Author Topic: calling compiler in "commands" section of build options  (Read 4373 times)

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
calling compiler in "commands" section of build options
« on: November 27, 2006, 01:29:40 pm »
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.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: calling compiler in "commands" section of build options
« Reply #1 on: November 27, 2006, 03:03:24 pm »
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.
« Last Edit: November 27, 2006, 03:08:09 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: calling compiler in "commands" section of build options
« Reply #2 on: November 27, 2006, 04:04:39 pm »
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!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: calling compiler in "commands" section of build options
« Reply #3 on: November 27, 2006, 04:58:08 pm »
I 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."

Offline BrianSidebotham

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: calling compiler in "commands" section of build options
« Reply #4 on: November 27, 2006, 05:50:58 pm »
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?