Magellan Linux

Contents of /trunk/core/glibc/glibc-2.15-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12589 - (show annotations) (download)
Tue Jun 12 15:20:02 2012 UTC (12 years ago) by niro
File size: 17427 byte(s)
-fixed a typo
1 # $Id$
2
3 PNAME="glibc"
4 PVER="2.15"
5 PBUILD="r1"
6
7 PCAT="sys-libs"
8
9 DESCRIPTION="GNU libc6 (also called glibc2) C library with NPTL Threads."
10 HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
11
12 DEPEND=">= sys-apps/base-files-0.1"
13
14 # we force headers to one specific version
15 # (for x86_64 2.6.12.0-r2 bi-arch headers are needed!)
16 SDEPEND="== sys-kernel/linux-libc-headers-3.1.8"
17 PROVIDE="virtual/glibc"
18
19 # functions to include in the mage file
20 SPECIAL_FUNCTIONS="fix_db_files"
21
22 SRCFILE="glibc-${PVER/.0/}.tar.xz"
23 SRCDIR="${BUILDDIR}/glibc-${PVER/.0/}"
24
25 sminclude mtools
26
27 SRC_URI=(
28 ftp://sources.redhat.com/pub/glibc/releases/${SRCFILE}
29 ftp://sources.redhat.com/pub/glibc/snapshots/${SRCFILE}
30 gnu://${PNAME}/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/glibc.envd
33 mirror://${PNAME}/locale.gen-header
34 mirror://${PNAME}/locale-gen
35 mirror://${PNAME}/${PNAME}-2.12.1-bz4781.patch
36 mirror://${PNAME}/${PNAME}-2.12.1-i686.patch
37 mirror://${PNAME}/${PNAME}-2.12.2-ignore-origin-of-privileged-program.patch
38 mirror://${PNAME}/${PNAME}-2.13-dlclose-search-reset.patch
39 mirror://${PNAME}/${PNAME}-2.14-libdl-crash.patch
40 mirror://${PNAME}/${PNAME}-2.14-reexport-rpc-interface.patch
41 mirror://${PNAME}/${PNAME}-2.14-reinstall-nis-rpc-headers.patch
42 mirror://${PNAME}/${PNAME}-${PVER}-fix-res_query-assert.patch
43 mirror://${PNAME}/${PNAME}-${PVER}-lddebug-scopes.patch
44 mirror://${PNAME}/${PNAME}-${PVER}-revert-c5a0802a.patch
45 mirror://${PNAME}/${PNAME}-${PVER}-scanf.patch
46 mirror://${PNAME}/${PNAME}-${PVER}-ifunc.patch
47 mirror://${PNAME}/${PNAME}-${PVER}-avx.patch
48 mirror://${PNAME}/${PNAME}-${PVER}-strcasecmp-disable-avx.patch
49 mirror://${PNAME}/${PNAME}-${PVER}-gb18030.patch
50 mirror://${PNAME}/${PNAME}-${PVER}-revert-netlink-cache.patch
51 mirror://${PNAME}/${PNAME}-${PVER}-arena.patch
52 mirror://${PNAME}/${PNAME}-${PVER}-negative-result-cache.patch
53 mirror://${PNAME}/${PNAME}-${PVER}-multiarch-x86-strcmp.patch
54 mirror://${PNAME}/${PNAME}-${PVER}-vdso.patch
55 mirror://${PNAME}/${PNAME}-${PVER}-feraiseexcept-plt.patch
56 mirror://${PNAME}/${PNAME}-${PVER}-vfprintf-nargs.patch
57 mirror://${PNAME}/${PNAME}-${PVER}-__libc_res_nquerydomain-out-of-bounds.patch
58 mirror://${PNAME}/${PNAME}-${PVER}-fmtmsg-locking.patch
59 mirror://${PNAME}/${PNAME}-${PVER}-non-signalling-comparisons.patch
60 mirror://${PNAME}/${PNAME}-${PVER}-rintf-rounding.patch
61 mirror://${PNAME}/${PNAME}-${PVER}-nearbyintf-rounding.patch
62 mirror://${PNAME}/${PNAME}-${PVER}-confstr-local-buffer-extent.patch
63 mirror://${PNAME}/${PNAME}-${PVER}-testsuite.patch
64 )
65
66 # sed line: on 2 digits add an zero: 2.7 -> 2.7.0
67 UP2DATE="updatecmd_gnu ${PNAME/-nptl/} | sed 's/^\([0-9]\.[0-9]\$\)/\1.0/'"
68
69 # glibc don't like strong CFLAGS
70 export CFLAGS="${CFLAGS//-O?} -O2"
71 # glibc -> nptl thread don't like striping
72 msetfeature "!strip"
73 # gcc 3.0 - 3.3 needs this:
74 export CFLAGS="${CFLAGS} -finline-limit=2000"
75 export CXXFLAGS="${CFLAGS}"
76 export LDFLAGS="${LDFLAGS//-Wl,--relax}"
77
78 # hack to fix NPTL issues with xen, only required on 32bit arches
79 if [[ ${ARCH} = i*86 ]]
80 then
81 export CFLAGS="${CFLAGS} -mno-tls-direct-seg-refs"
82 fi
83
84 # glibc-2.6.1 and above needs march CFLAGS: -march=${ARCH} -mtune=generic
85 # first filter -mtune and -march from flags
86 for flag in ${CFLAGS}
87 do
88 case ${flag} in
89 -mtune=*) continue ;;
90 -march=*) continue ;;
91 esac
92 newflags="${newflags} ${flag}"
93 done
94 export CFLAGS="${newflags}"
95
96 # than add our defaults for glibc
97 [[ ${ARCH} = i*86 ]] && export CFLAGS="${CFLAGS} -march=${ARCH}" # only i*86
98 export CFLAGS="${CFLAGS} -mtune=generic" # all arches
99 export CXXFLAGS="${CFLAGS}"
100
101 # use other linux-headers
102 [[ -z ${ALT_HEADERS} ]] && export ALT_HEADERS="/usr/include"
103
104 # kernel support
105 export ENABLE_KERNEL=2.6.32
106
107 src_prepare()
108 {
109 munpack ${SRCFILE} || die
110 cd ${SRCDIR}
111
112 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
113 mpatch ${PNAME}-2.12.1-bz4781.patch || die
114
115 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
116 # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
117 mpatch ${PNAME}-2.12.1-i686.patch || die
118
119 # security fix, fixes CVE-2010-3847
120 # see: http://www.exploit-db.com/exploits/15274/
121 mpatch ${PNAME}-2.12.2-ignore-origin-of-privileged-program.patch || die
122
123 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (fedora branch)
124 # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
125 mpatch ${PNAME}-2.14-libdl-crash.patch || die
126
127 # re-export RPC interface until libtirpc is ready as a replacement
128 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (fedora branch)
129 mpatch ${PNAME}-2.14-reexport-rpc-interface.patch || die
130 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (fedora branch)
131 mpatch ${PNAME}-2.14-reinstall-nis-rpc-headers.patch || die
132
133 # fix res_query assertion
134 # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
135 mpatch ${PNAME}-${PVER}-fix-res_query-assert.patch || die
136
137 # fix up regcomp/regexec
138 # http://sourceware.org/git/?p=glibc.git;a=commit;h=2ba92745
139 # mpatch ${PNAME}-${PVER}-regex.patch
140
141 # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
142 # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (fedora branch)
143 mpatch ${PNAME}-${PVER}-lddebug-scopes.patch || die
144
145 # revert commit c5a0802a - causes various hangs
146 # https://bugzilla.redhat.com/show_bug.cgi?id=769421
147 # Note: fedora may have actual fix (not submitted upstream yet...)
148 # http://pkgs.fedoraproject.org/gitweb/?p=glibc.git;a=blob_plain;f=glibc-rh552960-2.patch
149 mpatch ${PNAME}-${PVER}-revert-c5a0802a.patch || die
150
151 # fix realloc usage in vfscanf
152 # http://sourceware.org/git/?p=glibc.git;a=commit;h=20b38e03
153 mpatch ${PNAME}-${PVER}-scanf.patch || die
154
155 # fix ifunc relocations
156 # http://sourceware.org/git/?p=glibc.git;a=commit;h=6ee65ed6
157 mpatch ${PNAME}-${PVER}-ifunc.patch || die
158
159 # fix AVX detection
160 # http://sourceware.org/git/?p=glibc.git;a=commit;h=afc5ed09
161 # http://sourceware.org/git/?p=glibc.git;a=commit;h=08cf777f
162 mpatch ${PNAME}-${PVER}-avx.patch || die
163 # and "fix" strcasecmp
164 mpatch ${PNAME}-${PVER}-strcasecmp-disable-avx.patch || die
165
166 # fix GB18030 charmap
167 # http://sourceware.org/bugzilla/show_bug.cgi?id=11837
168 # http://sourceware.org/git/?p=glibc.git;a=commit;h=2a57bd79 (fedora branch)
169 # http://sourceware.org/git/?p=glibc.git;a=commit;h=3d828a61 (fedora branch)
170 mpatch ${PNAME}-${PVER}-gb18030.patch || die
171
172 # fix crash in __nscd_get_mapping if nscd not running
173 # http://sourceware.org/bugzilla/show_bug.cgi?id=13594 (potential fix in comment)
174 # reverts commit 3a2c0242 and other necessary following changes...
175 mpatch ${PNAME}-${PVER}-revert-netlink-cache.patch || die
176
177 # handle ARENA_TEST correctly
178 # http://sourceware.org/git/?p=glibc.git;a=commit;h=41b81892
179 mpatch ${PNAME}-${PVER}-arena.patch || die
180
181 # do not cache negative results in nscd if these are transient
182 # http://sourceware.org/git/?p=glibc.git;a=commit;h=3e1aa84e
183 mpatch ${PNAME}-${PVER}-negative-result-cache.patch || die
184
185 # strcasecmp_l, strncasecmp_l act as strcmp for multiarch x86
186 # http://sourceware.org/git/?p=glibc.git;a=commit;h=0bab47b6
187 mpatch ${PNAME}-${PVER}-multiarch-x86-strcmp.patch || die
188
189 # always set l_used for vDSO.
190 # http://sourceware.org/git/?p=glibc.git;a=commit;h=1f393a11
191 mpatch ${PNAME}-${PVER}-vdso.patch || die
192
193 # fix x86 PLT slot usage for feraiseexcept
194 # http://sourceware.org/git/?p=glibc.git;a=commit;h=7c35ffed
195 mpatch ${PNAME}-${PVER}-feraiseexcept-plt.patch || die
196
197 # vfprintf nargs overflow - CVE-2012-0864
198 # http://sourceware.org/git/?p=glibc.git;a=commit;h=7c1f4834
199 mpatch ${PNAME}-${PVER}-vfprintf-nargs.patch || die
200
201 # avoid out ouf bounds read in __libc_res_nquerydomain
202 # http://sourceware.org/git/?p=glibc.git;a=commit;h=8fdceb2e
203 mpatch ${PNAME}-${PVER}-__libc_res_nquerydomain-out-of-bounds.patch || die
204
205 # make fmtmsg function thread-safe
206 # http://sourceware.org/git/?p=glibc.git;a=commit;h=7724defc
207 mpatch ${PNAME}-${PVER}-fmtmsg-locking.patch || die
208
209 # use non-signaling floating-point comparisons in math functions
210 # http://sourceware.org/git/?p=glibc.git;a=commit;h=92221550
211 mpatch ${PNAME}-${PVER}-non-signalling-comparisons.patch || die
212
213 # fix rintf rounding.
214 # http://sourceware.org/git/?p=glibc.git;a=commit;h=fe45ce09
215 mpatch ${PNAME}-${PVER}-rintf-rounding.patch || die
216
217 # fix nearbyintf rounding
218 # http://sourceware.org/git/?p=glibc.git;a=commit;h=6cbeae47
219 mpatch ${PNAME}-${PVER}-nearbyintf-rounding.patch || die
220
221 # fix varaible scope issue in confstr
222 # http://sourceware.org/git/?p=glibc.git;a=commit;h=ac4c54f0
223 # http://sourceware.org/git/?p=glibc.git;a=commit;h=d6a403f9
224 mpatch ${PNAME}-${PVER}-confstr-local-buffer-extent.patch || die
225
226 # fix testsuite failures with --as-needed
227 # http://sourceware.org/git/?p=glibc.git;a=commit;h=d4c2917f
228 mpatch ${PNAME}-${PVER}-testsuite.patch || die
229
230 # binutils patch needs reconf
231 autoconf --force || die
232
233 # fix permissions on some of the scripts
234 chmod u+x ${SRCDIR}/scripts/*.sh || die
235
236 install -d ${SRCDIR}/build || die
237 cd ${SRCDIR}/build
238
239 if [ ! -f /etc/ld.so.conf ]
240 then
241 touch /etc/ld.so.conf || die
242 fi
243 }
244
245 src_compile()
246 {
247 local myopts
248
249 # generic pathes
250 myopts="--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info"
251 # disable profiling
252 myopts+=" --disable-profile"
253 # enable addons
254 myopts+=" --enable-add-ons=nptl,libidn"
255 # enable tls
256 myopts+=" --with-tls --with-__thread"
257 # supported kernel-release
258 myopts+=" --enable-kernel=${ENABLE_KERNEL}"
259 # disable cvs and gd support
260 myopts+=" --without-cvs --without-gd"
261 # enable bindnow
262 myopts+=" --enable-bind-now"
263
264 # support multilib lib64 dir (x86_64 only)
265 if [[ ${ARCH} = x86_64 ]]
266 then
267 # first build a -m32 version
268 install -d ${SRCDIR}/build-m32
269 cd ${SRCDIR}/build-m32
270
271 CC="gcc -m32" CXX="g++ -m32" \
272 CFLAGS="${CFLAGS//-march=${ARCH}} -march=i686" \
273 CXXFLAGS="${CXXFLAGS//-march=${ARCH}} -march=i686" \
274 ../configure \
275 --build=${CHOST} \
276 --host=i686-pc-linux-gnu \
277 --libdir=/usr/lib \
278 --libexecdir=/usr/lib/glibc \
279 ${myopts} \
280 || die
281
282 make PARALLELMFLAGS="${MAKEOPTS}" || die
283 fi
284
285 cd ${SRCDIR}/build
286
287 if [[ ${ARCH} = x86_64 ]]; then
288 # make sure the -m64 libs goes really to /lib64
289 echo "slibdir=/$(mlibdir)" >> ${SRCDIR}/build/configparms || die
290 fi
291
292 # kernel-2.6 with nptl needs this
293 ../configure \
294 --build=${CHOST} \
295 --host=${CHOST} \
296 --libdir=/usr/$(mlibdir) \
297 --libexecdir=/usr/$(mlibdir)/glibc \
298 ${myopts} \
299 || die
300
301 make PARALLELMFLAGS="${MAKEOPTS}" || die
302 }
303
304 src_install()
305 {
306 if [[ ${ARCH} = x86_64 ]]
307 then
308 # install -m32 libs
309 cd ${SRCDIR}/build-m32
310 make PARALLELMFLAGS="${MAKEOPTS}" install_root=${BINDIR} install || die
311 fi
312
313 cd ${SRCDIR}/build
314 make PARALLELMFLAGS="${MAKEOPTS}" install_root=${BINDIR} install || die
315
316 # do not generate the locales here, let it the user do with the locale-gen tool
317 # make PARALLELMFLAGS="${MAKEOPTS}" install_root=${BINDIR} localedata/install-locales || die
318
319 # install locales list and generate tools
320 # generate locale.gen file from localedata/SUPPORTED file
321 minstalletc locale.gen-header locale.gen || die
322 sed \
323 -e 's:/: :g' \
324 -e 's:\\: :g' \
325 -e 's:SUPPORTED-LOCALES=::' \
326 -e 's:\ \ $::g' \
327 -e '/^#/d' \
328 -e 's:^:#:g' \
329 ${SRCDIR}/localedata/SUPPORTED \
330 >> ${BINDIR}/etc/locale.gen || die
331 minstalldir /usr/sbin || die
332 minstallexec -s locale-gen /usr/sbin || die
333
334 # nsswitch configuration file
335 minstalletc ${SRCDIR}/nss/nsswitch.conf || die
336
337 # nscd configuration file
338 minstalletc ${SRCDIR}/nscd/nscd.conf || die
339
340 # gai configuration file
341 minstalletc ${SRCDIR}/posix/gai.conf || die
342
343 # we use Berlin as default
344 cp --remove-destination ${BINDIR}/usr/share/zoneinfo/Europe/Berlin ${BINDIR}/etc/localtime || die
345 [ -f ${BINDIR}/etc/ld.so.conf ] && { rm -f ${BINDIR}/etc/ld.so.conf || die; }
346 [ -e ${BINDIR}/etc/ld.so.cache ] && { rm -rf ${BINDIR}/etc/ld.so.cache || die; }
347
348 # base environment
349 minstallenv glibc.envd 00glibc || die
350 if [[ ${ARCH} = x86_64 ]]
351 then
352 MCONFIG="/etc/env.d/00glibc"
353 maddconfig "LDPATH=\"/usr/local/$(mlibdir)\"" || die
354 maddconfig "LDPATH=\"/opt/$(mlibdir)\"" || die
355 fi
356
357 # move some libs and tools to proper locations
358 # will suppress some ldconfig errors too
359 mv ${BINDIR}/$(mlibdir)/libmemusage.so ${BINDIR}/usr/$(mlibdir) || die
360 mv ${BINDIR}/$(mlibdir)/libpcprofile.so ${BINDIR}/usr/$(mlibdir) || die
361 mlink ../usr/$(mlibdir)/libmemusage.so /$(mlibdir)/libmemusage.so || die
362 mlink ../usr/$(mlibdir)/libpcprofile.so /$(mlibdir)/libpcprofile.so || die
363
364 # strip all binaries
365 find ${BINDIR} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded || die
366
367 # strip all libraries
368 # want to be safe here; --strip-unneeded seems to cause pthread problems
369 # strip all but libpthread
370 install -d ${BUILDDIR}/thread-backup || die
371 mv ${BINDIR}/$(mlibdir)/lib{pthread,thread_db}* ${BUILDDIR}/thread-backup/ || die
372
373 # now strip
374 find ${BINDIR} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded || die
375 mv -f ${BUILDDIR}/thread-backup/* ${BINDIR}/$(mlibdir)/ || die
376 # remove stale directory
377 rm -rf ${BUILDDIR}/thread-backup || die
378
379 # prepare glibc for installation; slackware method
380 minstalldir /incoming || die
381 mv ${BINDIR}/$(mlibdir)/* ${BINDIR}/incoming || die
382 mv ${BINDIR}/incoming ${BINDIR}/$(mlibdir)/incoming || die
383 mv ${BINDIR}/$(mlibdir)/incoming/libSegFault.so ${BINDIR}/$(mlibdir) || die
384 }
385
386 fix_db_files()
387 {
388 local i
389 local DB_ENTRY="${BUILDDIR}/${PKGNAME}"
390
391 for i in .files .symlinks .dirs
392 do
393 [ ! -f ${DB_ENTRY}/${i} ] && continue
394 [[ -z $(< ${DB_ENTRY}/${i}) ]] && continue
395
396 echo " fixing /$(mlibdir)/incoming from db-entry '${i}' ..."
397
398 # /lib/incoming -> empty line; sed2 removes all empty lines
399 #sed -i -e "s:/$(mlibdir)/incoming.*::g" -e '/^$/d' ${DB_ENTRY}/${i}
400 # do not simply emtpy the line, but change it the the correct path,
401 # so no stale libs are around if the package gets updated!
402 sed -i -e "s:/$(mlibdir)/incoming:/$(mlibdir):g" \
403 -e "s:/$(mlibdir)/incoming.*::g" -e '/^$/d' ${DB_ENTRY}/${i}
404 done
405 }
406
407 preinstall()
408 {
409 # remove libmemusage and libpcprofile as these libs now
410 # resides in /usr/lib and are symlinked to /lib
411 if [[ -f ${MROOT}/$(mlibdir)/libmemusage.so ]]
412 then
413 rm ${MROOT}/$(mlibdir)/libmemusage.so
414 fi
415
416 if [[ -f ${MROOT}/$(mlibdir)/libpcprofile.so ]]
417 then
418 rm ${MROOT}/$(mlibdir)/libpcprofile.so
419 fi
420 }
421
422 postinstall()
423 {
424 # first save the old libpthread.so.0;
425 # it will later used to determinate that there are no stale
426 # libpthreads that breaks ldconfig
427 local OLD_PTHREAD
428 OLD_PTHREAD="$(readlink ${MROOT}/$(mlibdir)/libpthread.so.0)"
429
430 # slackware install method
431
432 # we cannot easily install the glibc libs,
433 # because our tools for cp etc needs them to run
434
435 local file
436
437 echo " Switching to new glibc ..."
438 # swap libraries on the fly:
439 if [ -x /sbin/ldconfig -a -d /$(mlibdir)/incoming ] && [[ -z ${MROOT} ]]
440 then
441 # first create copies of the incoming libraries:
442 cd /$(mlibdir)/incoming
443 for file in $(find /$(mlibdir)/incoming -type f)
444 do
445 if [ ! -r "../$(basename ${file}).incoming" ]
446 then
447 cp -a ${file} ../$(basename ${file}).incoming
448 fi
449 done
450
451 # then switch to them all at once:
452 /sbin/ldconfig -l /$(mlibdir)/*.incoming 2> /dev/null
453
454 # finally, rename them and clean up:
455 cd /$(mlibdir)
456 for file in *.incoming
457 do
458 rm -f $(basename ${file} .incoming)
459 cp -a ${file} $(basename ${file} .incoming)
460 /sbin/ldconfig -l $(basename ${file} .incoming)
461 rm -f ${file}
462 done
463
464 # no ldconfig?
465 # good, it's safe to just jam it on home (and make links below):
466 else
467 (
468 cd ${MROOT}/$(mlibdir)/incoming
469 for file in *
470 do
471 cp -a ${file} ..
472 done
473
474 local my_sym
475 local my_dest
476
477 # rebuild symlinks
478 echo " Recreating Symlinks:"
479 for i in $(find ${MROOT}/$(mlibdir)/incoming -type l)
480 do
481 my_sym="$(readlink ${i})"
482 my_dest="$(basename ${i})"
483
484 echo " ${my_dest} -> ${my_dest}"
485
486 # assure to remove the old ones;
487 [ -L ${MROOT}/$(mlibdir)/"${my_dest}" ] && \
488 rm ${MROOT}/$(mlibdir)/"${my_dest}"
489
490 ln -snf "${my_sym}" ${MROOT}/$(mlibdir)/"${my_dest}"
491 done
492 )
493 fi
494
495 # now, get rid of the temporary directory:
496 rm -rf ${MROOT}/$(mlibdir)/incoming
497
498 # remove stale nptl libpthread-2.?.?.so,
499 # fix only needed for glibc with linuxthreads;
500 # prevent reloc errors such as:
501 # ls: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
502
503 # get our new libpthread.so.0
504 local NEW_PTHREAD
505 NEW_PTHREAD="$(readlink ${MROOT}/$(mlibdir)/libpthread.so.0)"
506
507 if [ "${NEW_PTHREAD}" != "${OLD_PTHREAD}" ]
508 then
509 echo " Removing stale libpthread libraries ..."
510 for file in ${MROOT}/$(mlibdir)/libpthread-*
511 do
512 if [ "$(basename ${file})" != "${NEW_PTHREAD}" ]
513 then
514 rm -f ${file}
515 fi
516 done
517
518 #rm -f /lib/${OLD_PTHREAD}
519
520 ln -snf ${NEW_PTHREAD} ${MROOT}/$(mlibdir)/libpthread.so.0
521 fi
522
523 if [ -x /usr/sbin/iconvconfig ]
524 then
525 # generate fastloading iconv module configuration file.
526 echo " Generate iconv module config ..."
527 /usr/sbin/iconvconfig --prefix=${MROOT}/
528 fi
529
530 # reloading init
531 echo " Reloading init ..."
532 [[ -z ${MROOT} ]] && /sbin/init U &> /dev/null
533
534 # generating user def locales
535 echo " Generating user defined locales ..."
536 [[ -z ${MROOT} ]] && /usr/sbin/locale-gen
537
538 # now we must fix the mage db files
539 # to stop the annoying errors messages
540 fix_db_files
541 }