[ros-users] Linker --as-needed
Daniel Stonier
d.stonier at gmail.com
Thu Aug 5 06:02:15 UTC 2010
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100805/f080ec41/attachment-0002.html>
More information about the ros-users
mailing list