[ros-users] Linker --as-needed
Kurt Konolige
konolige at willowgarage.com
Thu Aug 5 19:05:40 UTC 2010
Daniel, if this solution works out, it will be a real boon. In the
perception group, our typical development strategy is to make a
library independent of ROS (and with as few outside dependencies as
possible), then wrap that in different ways for ROS, testing,
visualization, etc. Eliminating unneeded link libs in a painless way
would be great.
There's another issue which is the build system, that some folks here
are looking into, namely, being able to extract a useful standalone
build from the ROS package.
Cheers --Kurt
On Wed, Aug 4, 2010 at 11:02 PM, Daniel Stonier <d.stonier at gmail.com> 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
>
>
More information about the ros-users
mailing list