summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110205/19174269/attachment.html
blob: 6ea89d6ce8a4f8c1f6d4d6f915bc8733788679c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[425] merge under/overlinking scripts from rpm-manbo-setup</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>425</dd>
<dt>Author</dt> <dd>tmb</dd>
<dt>Date</dt> <dd>2011-02-05 20:36:23 +0100 (Sat, 05 Feb 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>merge under/overlinking scripts from rpm-manbo-setup</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#rpmrpmsetuptrunkMakefileam">rpm/rpm-setup/trunk/Makefile.am</a></li>
<li><a href="#rpmrpmsetuptrunkNEWS">rpm/rpm-setup/trunk/NEWS</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#rpmrpmsetuptrunkdropldnoundefinedforsharedlibmodulesinlibtool">rpm/rpm-setup/trunk/drop-ld-no-undefined-for-shared-lib-modules-in-libtool</a></li>
<li><a href="#rpmrpmsetuptrunkfixdlsearchpathinlibtoolformultilib">rpm/rpm-setup/trunk/fix-dlsearch-path-in-libtool-for-multilib</a></li>
<li><a href="#rpmrpmsetuptrunkfixlibtoolfrommovingoptionsafterlibs">rpm/rpm-setup/trunk/fix-libtool-from-moving-options-after-libs</a></li>
<li><a href="#rpmrpmsetuptrunkfixlibtoolltmainfromoverlinking">rpm/rpm-setup/trunk/fix-libtool-ltmain-from-overlinking</a></li>
<li><a href="#rpmrpmsetuptrunkforceasneededforsharedlibinlibtool">rpm/rpm-setup/trunk/force-as-needed-for-shared-lib-in-libtool</a></li>
</ul>

</div>
<div id="patch"><pre>
<a id="rpmrpmsetuptrunkMakefileam">Modified: rpm/rpm-setup/trunk/Makefile.am</a>
===================================================================
--- rpm/rpm-setup/trunk/Makefile.am	2011-02-05 18:59:31 UTC (rev 424)
+++ rpm/rpm-setup/trunk/Makefile.am	2011-02-05 19:36:23 UTC (rev 425)
@@ -22,15 +22,20 @@
 
 pkg_scripts = \
 		   brp-compress \
-	       brp-strip \
-	       brp-strip-comment-note \
+		   brp-strip \
+		   brp-strip-comment-note \
 		   brp-strip-static-archive \
-           filter.sh \
-	       find-lang.pl \
-	       find-debuginfo.sh \
-	       gem_helper.rb \
-	        git-repository--after-tarball \
-	        git-repository--apply-patch \
+		   drop-ld-no-undefined-for-shared-lib-modules-in-libtool \
+		   filter.sh \
+		   find-lang.pl \
+		   find-debuginfo.sh \
+		   fix-dlsearch-path-in-libtool-for-multilib \
+		   fix-libtool-from-moving-options-after-libs \
+		   fix-libtool-ltmain-from-overlinking \
+		   force-as-needed-for-shared-lib-in-libtool \
+		   gem_helper.rb \
+	           git-repository--after-tarball \
+	           git-repository--apply-patch \
 		   http.req \
 		   magic.prov \
 		   magic.req \

<a id="rpmrpmsetuptrunkNEWS">Modified: rpm/rpm-setup/trunk/NEWS</a>
===================================================================
--- rpm/rpm-setup/trunk/NEWS	2011-02-05 18:59:31 UTC (rev 424)
+++ rpm/rpm-setup/trunk/NEWS	2011-02-05 19:36:23 UTC (rev 425)
@@ -2,6 +2,7 @@
 - merge rpmrc from rpm-manbo-setup
 - merge manbo.macros from rpm-manbo-setup
 - merge manbo-build.macros from rpm-manbo-setup
+- merge under/overlinking scripts from rpm-manbo-setup
 
 Version 1.115 - 9 January 2011, by Oliver Blin
 - initial Mageia import

<a id="rpmrpmsetuptrunkdropldnoundefinedforsharedlibmodulesinlibtool">Added: rpm/rpm-setup/trunk/drop-ld-no-undefined-for-shared-lib-modules-in-libtool</a>
===================================================================
--- rpm/rpm-setup/trunk/drop-ld-no-undefined-for-shared-lib-modules-in-libtool	                        (rev 0)
+++ rpm/rpm-setup/trunk/drop-ld-no-undefined-for-shared-lib-modules-in-libtool	2011-02-05 19:36:23 UTC (rev 425)
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+# applies patch:
+# --- ltmain.sh.pix       2008-05-23 13:51:52.000000000 +0200
+# +++ ltmain.sh   2008-05-23 13:52:16.000000000 +0200
+# @@ -1948,6 +1948,11 @@
+#        fi
+#      done # argument parsing loop
+#  
+# +    if test &quot;$module&quot; = yes ; then
+# +       # [Manbo-labs] dropping ld option &quot;--no-undefined&quot; which is wrong for plugins
+# +       linker_flags=`echo &quot;X $linker_flags&quot; | $Xsed -e 's/ --no-undefined//'`
+# +       compiler_flags=`echo &quot;X $compiler_flags&quot; | $Xsed -e 's/ -Wl,--no-undefined//'`
+# +    fi
+# +
+#      if test -n &quot;$prev&quot;; then
+#        $echo &quot;$modename: the \`$prevarg' option requires an argument&quot; 1&gt;&amp;2
+#        $echo &quot;$help&quot; 1&gt;&amp;2
+
+# a similar patch has been applied in ltmain.sh in libtool package
+# but this works even if autoreconf is not called
+
+foreach my $ltmain ('ltmain.sh', glob(&quot;*/ltmain.sh&quot;)) {
+    open(my $F, '&lt;', $ltmain) or next;
+
+    print &quot;Modifying $ltmain underlinking for plugins (cf http://wiki.mandriva.com/en/Underlinking)\n&quot;;
+
+    open(my $G, '&gt;', &quot;$ltmain.new&quot;) or exit;
+    while (&lt;$F&gt;) {
+	print $G $_;
+
+	if ($_ eq &quot;    done # argument parsing loop\n&quot;) {
+	    $modified = 1;
+	    print $G &lt;&lt;'EOF';
+
+    if test &quot;$module&quot; = yes ; then
+    	linker_flags=`echo &quot;X $linker_flags&quot; | $Xsed -e 's/ --no-undefined//'`
+    	compiler_flags=`echo &quot;X $compiler_flags&quot; | $Xsed -e 's/ -Wl,--no-undefined//'`
+    fi
+EOF
+	}
+    }
+
+    rename $ltmain, &quot;$ltmain.drop&quot; 
+      and rename &quot;$ltmain.new&quot;, $ltmain or print STDERR &quot;modifying $ltmain failed: $!\n&quot;;
+}
+


Property changes on: rpm/rpm-setup/trunk/drop-ld-no-undefined-for-shared-lib-modules-in-libtool
___________________________________________________________________
<a id="svnexecutable">Added: svn:executable</a>
   + *

<a id="rpmrpmsetuptrunkfixdlsearchpathinlibtoolformultilib">Added: rpm/rpm-setup/trunk/fix-dlsearch-path-in-libtool-for-multilib</a>
===================================================================
--- rpm/rpm-setup/trunk/fix-dlsearch-path-in-libtool-for-multilib	                        (rev 0)
+++ rpm/rpm-setup/trunk/fix-dlsearch-path-in-libtool-for-multilib	2011-02-05 19:36:23 UTC (rev 425)
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# If configure was generated with libtool that did not have support for
+# run-time library search path (sys_lib_dlsearch_path_spec) autodetection,
+# we replace the hardcoded search path with &quot;/usr/%{_lib} /%{_lib}&quot;.
+
+# Our libtool has autodetection in form of lib64.patch, though it does not
+# handle cases (e.g. Debian) where /usr/lib is valid for multilib archs.
+
+# Without the correct search path defined, binaries would wrongly get rpath even
+# when the libraries are located in a standard directory.
+
+CONFIGURE_TOP=&quot;${1:-.}&quot;
+LIB=&quot;${2:-lib}&quot;
+if [ -e $CONFIGURE_TOP/configure ] &amp;&amp; grep -q 'sys_lib_dlsearch_path_spec=&quot;/lib /usr/lib $lt_ld_extra&quot;' $CONFIGURE_TOP/configure; then
+  echo &quot;Forcing run-time library search path definition in configure to prevent libtool from adding rpath for standard directories (configure was generated with libtool without support for autodetection)&quot;
+
+  sed -i \
+   -e &quot;s,^[ \t]*# Append ld.so.conf contents to the search path,  sys_lib_dlsearch_path_spec=\&quot;/usr/${LIB} /${LIB}\&quot;\n\0,&quot; \
+   -e 's,sys_lib_dlsearch_path_spec=&quot;/lib /usr/lib $lt_ld_extra&quot;,sys_lib_dlsearch_path_spec=&quot;$sys_lib_dlsearch_path_spec $lt_ld_extra&quot;,' \
+   $CONFIGURE_TOP/configure
+fi
+

<a id="rpmrpmsetuptrunkfixlibtoolfrommovingoptionsafterlibs">Added: rpm/rpm-setup/trunk/fix-libtool-from-moving-options-after-libs</a>
===================================================================
--- rpm/rpm-setup/trunk/fix-libtool-from-moving-options-after-libs	                        (rev 0)
+++ rpm/rpm-setup/trunk/fix-libtool-from-moving-options-after-libs	2011-02-05 19:36:23 UTC (rev 425)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+CONFIGURE_TOP=&quot;${1:-.}&quot;
+if [ -e $CONFIGURE_TOP/configure ] &amp;&amp; grep -q -F '$deplibs $compiler_flags' $CONFIGURE_TOP/configure; then
+  echo &quot;Fixing libtool inside configure to pass -Wl,xxx options before libraries&quot;
+
+  # a similar patch has been applied in libtool in libtool package (#47273)
+  # but this works even if autoreconf is not called
+
+  sed -i \
+   -e 's,$deplibs $compiler_flags,$compiler_flags $deplibs,' \
+   -e 's,$deplibs $postdep_objects $compiler_flags,$compiler_flags $deplibs $postdep_objects,' \
+   $CONFIGURE_TOP/configure
+fi
+


Property changes on: rpm/rpm-setup/trunk/fix-libtool-from-moving-options-after-libs
___________________________________________________________________
Added: svn:executable
   + *

<a id="rpmrpmsetuptrunkfixlibtoolltmainfromoverlinking">Added: rpm/rpm-setup/trunk/fix-libtool-ltmain-from-overlinking</a>
===================================================================
--- rpm/rpm-setup/trunk/fix-libtool-ltmain-from-overlinking	                        (rev 0)
+++ rpm/rpm-setup/trunk/fix-libtool-ltmain-from-overlinking	2011-02-05 19:36:23 UTC (rev 425)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -e ltmain.sh ]; then
+   echo &quot;Fixing libtool's ltmain.sh to prevent overlinking (cf http://wiki.mandriva.com/en/Overlinking)&quot;
+
+   # a similar patch has been applied in ltmain.sh in libtool package
+   # but this works even if autoreconf is not called
+
+   mv ltmain.sh ltmain.sh.orig
+   echo link_all_deplibs=no &gt; ltmain.sh
+   cat ltmain.sh.orig &gt;&gt; ltmain.sh
+   
+   sed -i -s 's/link) libs=&quot;$deplibs %DEPLIBS% $dependency_libs&quot;/link) libs=&quot;$deplibs %DEPLIBS%&quot;/' ltmain.sh
+fi

<a id="rpmrpmsetuptrunkforceasneededforsharedlibinlibtool">Added: rpm/rpm-setup/trunk/force-as-needed-for-shared-lib-in-libtool</a>
===================================================================
--- rpm/rpm-setup/trunk/force-as-needed-for-shared-lib-in-libtool	                        (rev 0)
+++ rpm/rpm-setup/trunk/force-as-needed-for-shared-lib-in-libtool	2011-02-05 19:36:23 UTC (rev 425)
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# replaces
+#	  tmp_sharedflag='-shared' ;;
+# with
+# 	  tmp_sharedflag='-shared -Wl,--as-needed' ;;
+#
+# since passing -Wl,--as-needed is not enough because libtool moves it
+# after *.o and libs
+
+if [ -e configure ]; then
+   echo &quot;Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html)&quot;
+   sed -i &quot;s/^\([ \t]*tmp_sharedflag\)='-shared'/\1='-shared -Wl,--as-needed'/&quot; configure
+fi


Property changes on: rpm/rpm-setup/trunk/force-as-needed-for-shared-lib-in-libtool
___________________________________________________________________
Added: svn:executable
   + *

</pre></div>

</body>
</html>