Author Topic: GNU ARm support change  (Read 4888 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
GNU ARm support change
« on: October 11, 2006, 02:34:25 pm »
Dear All,

I recently discovered a short-coming in out GnuArm support.

When you create a static library, the command was like this :
Code
$lib_linker -r $static_output $link_objects
ranlib $static_output

Now there's a problem with this, ranlib is not the actual command on gnu-arm, one should call it's wrapper : arm-elf-ranlib. But CB does not know that one.


The solution is extremely easy, ranlib is no longer needed for this (it adds an index to the library), the same can be achieved with the -s option to the archiver "arm-elf-ar")
so the new command is now :

Code
$lib_linker -r -s $static_output $link_objects

Wil be available in tonight's nightly.

Note : that your default.conf will remain containing the old situation (either manually change it, or remove you default.con :-(  )

PS : the same is applied to the MinGW GCC.


[EDIT] :
Can someone confirm me that this also applies (or not ) for :
 1) GDC
 2) ICC
 3) SDCC

« Last Edit: October 11, 2006, 02:36:31 pm by killerbot »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: GNU ARm support change
« Reply #1 on: October 11, 2006, 03:01:47 pm »
... the same is applied to the MinGW GCC.

what's the benefit of this change ?
everything is working fine as it is

brgds, tiwag

edit:
which binutils version is AT LEAST necessary that this will work ?
remind that not everybody is addicted for updating always to the very last brandnew buggy version

edit2:
i found 'ar -s' now in the docs for binutils 2.15

don't understand the ranlib index completely  :roll:
« Last Edit: October 11, 2006, 03:09:26 pm by tiwag »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: GNU ARm support change
« Reply #2 on: October 11, 2006, 03:09:03 pm »
... the same is applied to the MinGW GCC.

what's the benefit of this change ?
everything is working fine as it is

brgds, tiwag

edit:
which binutils version is AT LEAST necessary that this will work ?
remind that not everybody is addicted for updating always to the very last brandnew buggy version


CB can't 100% guarantee the correct ranlib will be used, it has no direct path to it.

It's not that this is a new feature, it's probably already very old ;-)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: GNU ARm support change
« Reply #3 on: October 11, 2006, 03:13:37 pm »
it's written in the binutils doc's, that the ranlib's generated index speeds up linking to such a library ...

could be interesting for BIG libs like monolithic wxWidgets libs etc...

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: GNU ARm support change
« Reply #4 on: October 11, 2006, 03:26:17 pm »
yes, absolutely correct, and that;s exactly the same that the -s option does for the archiver ;-)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: GNU ARm support change
« Reply #5 on: October 11, 2006, 03:30:22 pm »
yes, absolutely correct, and that;s exactly the same that the -s option does for the archiver ;-)

thanks for the info - found it too in the docs, but had to search a while ...