Re: Adding default RUNPATH to compiled binaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/12/12 Jonathan Wakely <jwakely.gcc@xxxxxxxxx>:
> Right, that's partly why the best solution for a single-user system
> (where any sane choice is reasonable and can be changed at will) is
> different to the best solution for a firm-wide rollout for hundreds of
> users across multiple continents (where consistency matters and it's
> harder to change once hundreds of makefiles are relying on a certain
> behavour) and different again to a packager distributing GCC to a wide
> variety of users (where noone knows what everyone wants or how they'll
> use it.)

This is a good point.  In this case, I'm working on GCC packages, so I
need to find the balance between flexibility for users, and usability in
a simple case.

> I tend to install it with the default behaviour and leave it to users
> to decide how to link, as that gives the most flexibility, but you
> have to be prepared to repeatedly explain how to solve the runtime
> problems.

The GCC distributed from GCC so far did not set the -R flag by
default.  All our package build recipes add -R/opt/csw/lib to the
RPATH.  Occasionally, there's a software project with a build system
ignoring LDFLAGS, so we need to resort to LD_OPTIONS.

Let's say that what we want, is that --prefix=/opt/csw, and that the
following example works (without making any modifications to the
invocations), meaning that the program finds libstdc++.

echo "int main() {}" > t.c; g++ -o t t.c ; ./t

...and that we don't use crle.  I just polled my peers at #opencsw on
Freenode, and this kind of system-wide modification is a recipe for
things ranging from annoyances to disasters.  I can write more about
this, for now let's just say that this isn't one of the options.

What options do we have now, and what's the best way of implementing them?

Maciej


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux