https://bugs.winehq.org/show_bug.cgi?id=47218
Bug ID: 47218 Summary: "--rpath" given via LDFLAGS is not honored as wine precedes a "--rpath,$ORIGIN" Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env Assignee: wine-bugs@winehq.org Reporter: mail+wine@m-reimer.de Distribution: ---
I've tried to do a proper fix but gave up after some time.
I want to build wine against a patched glibc to work around https://bugs.winehq.org/show_bug.cgi?id=47198
I thought it should be enough to pass "-Wl,--rpath" via LDFLAGS but this doesn't work as the LDFLAGS are appended *after* Wine adds a "-Wl,--rpath,$ORIGIN".
As rpath's are applied in command line order, my "rpath" isn't applied.
This, for example, happens when "wine64-installed" is built.
My crude fix is:
_RPATH="-rpath=/usr/wine-lol-glibc/lib,-rpath=/usr/wine-lol-glibc/lib32" export LDFLAGS="$LDFLAGS,$_RPATH" sed "s|-Wl,--rpath,|-Wl,$_RPATH,--rpath,|g" -i $pkgname/configure*
Can you fix this order, so your own "rpath" settings is applied *after* supplied LDFLAGS are added?