[ros-users] Linker --as-needed

Radu Bogdan Rusu rusu at willowgarage.com
Thu Aug 5 07:49:03 UTC 2010


Interesting. I found some discussions about this at:
* http://wiki.mandriva.com/en/Overlinking / http://wiki.mandriva.com/en/Underlinking
* http://www.gentoo.org/proj/en/qa/asneeded.xml

Cheers,
Radu.

On 08/04/2010 11:02 PM, Daniel Stonier wrote:
>
> I didn't know about this linker option until yesterday...turns out to be
> really useful. Setting -Wl,--as-needed in the ROS_LINK_FLAGS variable
>   in rosconfig.cmake, we can drop any unused linking dependencies.
>
> We've been bashing back and forth here at work on how to build our
> packages - ideally we want to be able to build a regular algorithm
> library or device driver with no ros connections so we can use in
> standalone projects, and also an rosnode lib around that, but
> unfortunately the manifest drags in all the ros dependencies into the
> algorithm library/device driver. Up until now, we were splitting into
> separate packages when we really needed to, but is a bit awkward. There
> are other use cases too, simple debugging utilities alongside the main
> library package, or full blown gui tools.
>
> This solves all of that. Would there be any reason/disadvantage to
> having it as a default link flag for gcc in the ros? It's not a big
> issue as its easy enough to enable globally yourself, but it's something
> that could just as easily be 'under the hood' so to speak.
>
> --
> Phone : +82-10-5400-3296 (010-5400-3296)
> Home: http://snorriheim.dnsdojo.com/
> Yujin Robot: http://www.yujinrobot.com/
> Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users

-- 
| Radu Bogdan Rusu | http://rbrusu.com/



More information about the ros-users mailing list