The Samba-Bugzilla – Attachment 9846 Details for
Bug 10548
Samba 4.X fails to build on e.g. FreeBSD due to link flag ordering bug
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for v4-1-test, picked from master
bug-10548.v4-1-test.patch (text/plain), 2.12 KB, created by
Michael Adam
on 2014-04-11 10:47:39 UTC
(
hide
)
Description:
patch for v4-1-test, picked from master
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2014-04-11 10:47:39 UTC
Size:
2.12 KB
patch
obsolete
>From a43b56d5ac0a15f72c5c71684e863a8874786cd2 Mon Sep 17 00:00:00 2001 >From: Michael Adam <obnox@samba.org> >Date: Wed, 16 Oct 2013 15:17:18 +0200 >Subject: [PATCH] build: fix ordering problems with lib-provided and internal > RPATHs > >When a library or system (like cups) provides an RPATH, >e.g. with -Wl,-R or -Wl,-rpath, this was added by waf >to the LINKFLAGS, wich was later prepended to our RPATH. >But if the path by chance contains an older version of >one of our internal libraries like talloc, this would lead >to linking the too old talloc into our binaries. > >This has been observed on, e.g., FreeBSD, but it is a general >problem. > >This patch fixes the problem by specially parsing the RPATH >linker options from the pkg-config(, cups-config, ....) output >and putting the paths into the RPATH_<lib> container, which >is then later correctly appended to our internal RPATH. > >Signed-off-by: Michael Adam <obnox@samba.org> > >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 64f5e24100a764ec198cab9a8d2c43fa86e7027c) > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=10548 >--- > buildtools/wafadmin/Tools/config_c.py | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/buildtools/wafadmin/Tools/config_c.py b/buildtools/wafadmin/Tools/config_c.py >index a32d8aa..d0bc617 100644 >--- a/buildtools/wafadmin/Tools/config_c.py >+++ b/buildtools/wafadmin/Tools/config_c.py >@@ -73,6 +73,19 @@ def parse_flags(line, uselib, env): > app('CCFLAGS_' + uselib, x) > app('CXXFLAGS_' + uselib, x) > app('LINKFLAGS_' + uselib, x) >+ # >+ # NOTE on special treatment of -Wl,-R and -Wl,-rpath: >+ # >+ # It is important to not put a library provided RPATH >+ # into the LINKFLAGS but in the RPATH instead, since >+ # the provided LINKFLAGS get prepended to our own internal >+ # RPATH later, and hence can potentially lead to linking >+ # in too old versions of our internal libs. >+ # >+ elif x.startswith('-Wl,-R'): >+ app('RPATH_' + uselib, x[6:]) >+ elif x.startswith('-Wl,-rpath,'): >+ app('RPATH_' + uselib, x[11:]) > elif x.startswith('-Wl'): > app('LINKFLAGS_' + uselib, x) > elif x.startswith('-m') or x.startswith('-f'): >-- >1.8.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
obnox
:
review+
vl
:
review+
Actions:
View
Attachments on
bug 10548
:
9845
| 9846