On Jul 26, 2007, at 4:19 AM, Ralf S. Engelschall wrote:
> Ok, as in every second mail Jeff already talks about this
> -Wl,--as-needed flag, I got tired and investigated on this stuff ;-)
>
;-) It's actually PLD and ALT linux that want the -Wl,--as-needed
flag. Both are trying
to deploy distros using the option.
> Well, it's just an option which tells ld(1) to leave out any libraries
> which are _not_ really referenced by an object. I'm not sure whether
> I really understand all the commotion about this flag, but AFAIK the
> current internal RPM library dependencies are already correct. Only
> minimalized external dependencies through the bottleneck librpmmisc
> cause trouble under -Wl,--as-needed.
>
> So, I've added a --with-build-maxlibdep which does for the remaining
> librpmxxx the same as --with-build-extlibdep does for librpmisc: it
> links against the $LIBS -- which carries the external third-party
> libraries. This way _TRY_ to link against more libs, but -Wl,--as-
> needed
> reduces automatically again. With the appended patch I was at least
> able
> to build under FreebSD 6 and Fedora 7 with
>
> $ LDFLAGS="-Wl,--as-needed" ./configure --with-build-maxlibdep [...]
>
> So, is this enough to get rid of this topic or do I still miss an
> important point?
Poifect for rpm. Thank you!
The remaining issue(s) are much harder and mostly outside of rpm
development scope:
Adding -Wl,-as-needed to %optflags.
Detecting misuse of -Wl,-as-needed when producing *.rpm packages.
73 de Jeff
Received on Thu Jul 26 13:20:19 2007