Repair glibc make check with -Wformat options enabled.
[platform/upstream/glibc.git] / packaging / glibc.spec
1 #
2 # spec file for package glibc
3 #
4 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # This will avoid building some parts of glibc
16 %define asan_arch x86_64 armv7l aarch64
17 %bcond_with    fast_build
18 Name:           glibc
19 Summary:        Standard Shared Libraries (from the GNU C Library)
20 License:        LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
21 Group:          Base/Libraries
22 BuildRequires:  fdupes
23 BuildRequires:  makeinfo
24 BuildRequires:  xz
25 BuildRequires:  gcc-c++
26 BuildRequires:  gettext-tools
27 BuildRequires:  libstdc++-devel
28 %{?asan:
29 %ifarch %asan_arch
30 #BuildRequires:  python
31 BuildRequires:  glibc-devel-static
32 %endif
33 }
34 #BuildRequires:  pkgconfig(systemd)
35 %define _filter_GLIBC_PRIVATE 1
36 %if %_target_cpu == "i686"
37 # For i686 let's only build what's different from i586, so
38 # no need to build documentation
39 %define build_profile 1
40 %define build_locales 0
41 %define build_html 0
42 %else
43 %if %{with fast_build}
44 %define build_profile 0
45 %define build_locales 0
46 %define build_html 0
47 %else
48 # Default:
49 %define build_profile 1
50 %define build_locales 0
51 %define build_html 1
52 %endif
53 %endif
54
55 %define disable_assert 0
56 %define enable_stackguard_randomization 1
57 %define multiarcharches %{ix86} x86_64
58
59 %ifarch x86_64
60 %define enablekernel 2.6.16
61 %else
62 %define enablekernel 2.6.16
63 %endif
64 Conflicts:      kernel < %{enablekernel}
65 %ifarch armv7l armv7hl
66 # The old runtime linker link gets not provided by rpm find.provides, but it exists
67 Provides:       ld-linux.so.3
68 Provides:       ld-linux.so.3(GLIBC_2.4)
69 %endif
70 Version:        2.24
71 Release:        0
72 %define glibc_major_version 2.24
73 %define git_id 4e42b5b8f89f
74
75 Url:            http://www.gnu.org/software/libc/libc.html
76 Source:         glibc-%{version}.tar.xz
77 Source5:        nsswitch.conf
78 Source7:        bindresvport.blacklist
79 Source8:        glibc_post_upgrade.c
80 Source9:        glibc.rpmlintrc
81 Source10:       baselibs.conf
82 # For systemd 
83 Source1001:     glibc.manifest
84
85 Requires(pre):  filesystem
86 Provides:       rtld(GNU_HASH)
87
88 %description
89 The GNU C Library provides the most important standard libraries used
90 by nearly all programs: the standard C library, the standard math
91 library, and the POSIX thread library. A system is not functional
92 without these libraries.
93
94 %package info
95 Summary:        Info Files for the GNU C Library
96 License:        GFDL-1.1
97 Group:          Documentation
98 BuildArch:      noarch
99
100 %description info
101 This package contains the documentation for the GNU C library stored as
102 info files. Due to a lack of resources, this documentation is not
103 complete and is partially out of date.
104
105 %package html
106 Summary:        HTML Documentation for the GNU C Library
107 License:        GFDL-1.1
108 Group:          Documentation
109 BuildArch:      noarch
110
111 %description html
112 This package contains the HTML documentation for the GNU C library. Due
113 to a lack of resources, this documentation is not complete and is
114 partially out of date.
115
116 %package i18ndata
117 Summary:        Database Sources for 'locale'
118 License:        GPL-2.0+ and MIT
119 Group:          Base/Libraries
120 BuildArch:      noarch
121
122 %description i18ndata
123 This package contains the data needed to build the locale data files to
124 use the internationalization features of the GNU libc. It is normally
125 not necessary to install this packages, the data files are already
126 created.
127
128 %package locale
129 Summary:        Locale Data for Localized Programs
130 License:        GPL-2.0+ and MIT and LGPL-2.1+
131 Requires(post): /usr/bin/cat
132 Requires:       glibc = %{version}
133 %description locale
134 Locale data for the internationalisation features of the GNU C library.
135
136 %package profile
137 Summary:        Libc Profiling and Debugging Versions
138 License:        LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
139 Group:          Base/Utilities
140 Requires:       glibc = %{version}
141
142 %description profile
143 This package contains special versions of the GNU C library which are
144 necessary for profiling and debugging.
145
146 %package devel
147 Summary:        Include Files and Libraries Mandatory for Development
148 License:        BSD-3-Clause and LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
149 Requires:       glibc = %{version}
150 Requires:       linux-kernel-headers
151
152 %description devel
153 These libraries are needed to develop programs which use the standard C
154 library.
155
156 %package devel-static
157 Summary:        C library static libraries for -static linking
158 License:        BSD-3-Clause and LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
159 Requires:       %{name}-devel = %{version}
160 # Provide Fedora name for package to make packaging easier
161 Provides:       %{name}-static = %version
162
163 %description devel-static
164 The glibc-devel-static package contains the C library static libraries
165 for -static linking.  You don't need these, unless you link statically,
166 which is highly discouraged.
167
168 %package devel-utils
169 Summary:        Development utilities from GNU C library
170 License:        LGPL-2.1+
171 Requires:       glibc = %{version}
172
173 %description devel-utils
174 The glibc-devel-utils package contains various binaries which can be helpful during program
175 debugging.
176
177 If you are unsure if you need this, don't install this package.
178
179 %package extra
180 Summary:        Extra binaries from GNU C Library
181 License:        LGPL-2.1+
182 Requires:       glibc = %{version}
183
184 %description extra
185 The glibc-extra package contains some extra binaries for glibc that
186 are not essential but recommend to use.
187
188 makedb: A program to create a database for nss
189
190 %package obsolete
191 Summary:        Obsolete Shared Libraries from the GNU C Library
192 License:        LGPL-2.0+
193 Requires:       glibc = %{version}
194
195 %description obsolete
196 This package provides some old libraries from the GNU C Library which
197 are no longer supported. Additional it provides a compatibility library
198 for old binaries linked against glibc 2.0.
199
200 Install this package if you need one of this libraries to get old
201 binaries working, but since this libraries are not supported and there
202 is no gurantee that they work for you, you should try to get newer
203 versions of your software.
204
205 %{?asan:
206 %ifarch %asan_arch
207 %package asan
208 Summary:     glibc with ASan instrumentation
209 License:     LGPL-2.1+ and LGPL-2.1+-with-GCC-exception and GPL-2.0+
210 Requires:    glibc = %{version}
211
212 %description asan
213 This package provides glibc with ASan instrumentation
214
215 %post asan
216 ln -s --force /%{_lib}/libc-2.24-asan.so /%{_lib}/libc.so.6
217
218 %preun asan
219 ln -s --force /%{_lib}/libc-2.24.so /%{_lib}/libc.so.6
220
221 %endif
222 }
223
224 %prep
225 %setup -n glibc-%{version} -q 
226 cp %{SOURCE1001} .
227
228 %build
229 %{?asan:%gcc_unforce_options}
230 if [ -x /bin/uname.bin ]; then
231         /bin/uname.bin -a
232 else
233         uname -a
234 fi
235 uptime || :
236 ulimit -a
237 nice
238 # We do not want configure to figure out the system its building one
239 # to support a common ground and thus set build and host to the
240 # target_cpu.
241 %ifarch %arm
242 %define target %{_target_cpu}-tizen-linux-gnueabi
243 %else
244 %define target %{_target_cpu}-tizen-linux
245 %endif
246 # Don't use as-needed, it breaks glibc assumptions
247 # Before enabling it, run the testsuite and verify that it
248 # passes completely
249 export LD_AS_NEEDED=0
250 # Adjust glibc version.h
251 echo "#define CONFHOST \"%{target}\"" >> version.h
252 echo "#define GITID \"%{git_id}\"" >> version.h
253 #
254 # Default CFLAGS and Compiler
255 #
256 BuildFlags=$(echo %{optflags} | sed -e "s/-Wp,-D_FORTIFY_SOURCE=2//g" | sed -e "s/-ffast-math//" | sed -e "s/atom/i686/g" | sed -e "s/-fexceptions//" | sed -e "s/-fno-omit-frame-pointer//" )
257 BuildFlags="$BuildFlags -O2 -g -U_FORTIFY_SOURCE"
258 BuildFlags="$(echo $BuildFlags | sed -e 's#-fstack-protector##' -e 's#-ffortify=[0-9]*##')"
259 BuildFlags="$(echo $BuildFlags | sed -e 's/-Wa,-mimplicit-it=thumb//g' | sed -e 's/-mthumb//g')"
260 # Turn off all -Wformat enable flags as there are glibc tests that explicitly
261 # append -Wno-format and with enabled Wformat options that produced warnings
262 # that turns into errors. Remove -Wformat=1|2 or -Wformat-..-arg
263 BuildFlags="$(echo $BuildFlags | sed -re 's/-Wformat((=[1-2])|((-\w+)+))?(\s|$)//g')"
264
265 BuildCC="%__cc"
266 BuildCCplus="%__cxx"
267 add_ons=",libidn"
268
269 BuildFlags="$BuildFlags -g"
270 %if %{disable_assert}
271         BuildFlags="$BuildFlags -DNDEBUG=1"
272 %endif
273 %ifarch %ix86
274         add_ons=$add_ons
275 %endif
276 %ifarch %arm aarch64
277         add_ons=$add_ons
278 %endif
279 %ifarch mipsel
280         # fails to build otherwise - need to recheck and fix
281         %define enable_stackguard_randomization 0
282 %endif
283
284 configure_and_build_glibc() {
285         local dirname="$1"; shift
286         local cflags="$1"; shift
287         local addons="$1"; shift
288         mkdir "cc-$dirname"
289         cd "cc-$dirname"
290         conf_cflags="$cflags -funwind-tables -fPIC"
291         %{?asan: conf_cflags="$conf_cflags -DASAN_INIT_FIRST "}
292
293         profile="--disable-profile"
294 %if %{build_profile}
295         if [ "$dirname" = "base" ] ; then
296             profile="--enable-profile"
297         fi
298 %endif
299         CFLAGS="$conf_cflags" BUILD_CFLAGS="$conf_cflags" \
300         CC="$BuildCC" CXX="$BuildCCplus"  ../configure \
301                 --prefix=%{_prefix} \
302                 --libexecdir=%{_libexecdir} --infodir=%{_infodir} \
303                 --enable-add-ons=$addons \
304                 $profile \
305                 "$@" \
306 %if %{enable_stackguard_randomization}
307                 --enable-stackguard-randomization \
308 %endif
309                 --build=%{target} --host=%{target} \
310 %ifnarch %{multiarcharches}
311                 --disable-multi-arch \
312 %endif
313 %ifarch %{ix86} x86_64 
314                 --disable-mathvec \
315 %endif
316                 --enable-kernel=%{enablekernel} \
317                 --enable-bind-now  --enable-obsolete-rpc \
318                 --disable-nscd \
319                 libc_cv_pie_default=yes
320         # explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
321         make %{?_smp_mflags} #CFLAGS="$cflags" BUILD_CFLAGS="$cflags"
322         cd ..
323 }
324
325 configure_flags="--prefix=/usr --without-cvs --without-selinux --enable-stackguard-randomization --enable-obsolete-rpc --disable-mathvec"
326
327 configure_flags="$configure_flags --disable-sanity-checks"
328
329 build_asan() {
330   HERE=%{_builddir}/%{name}-%{version}
331   J=${J:-32}
332   GLIBC=$HERE
333   ASAN_BUILD=$HERE/asan-build
334   unset CXXFLAGS
335   unset CFLAGS
336   unset LDFLAGS
337   #chmod +x $HERE/asan-glibc-gcc-wrapper.py
338   #build static wrapper, because we don't want asan to intercept allocators
339   g++ -o gcc-wrapper gcc-wrapper.cc -O3 -funroll-loops -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-exceptions -static
340
341   rm -rf $ASAN_BUILD
342   mkdir -p $ASAN_BUILD
343   cd $ASAN_BUILD
344 #  CC=$HERE/asan-glibc-gcc-wrapper.py $GLIBC/configure $configure_flags
345   CC=$HERE/gcc-wrapper $GLIBC/configure $configure_flags
346
347   # Quick build - builds only libraries, but does not create symlinks.
348   make -r -j $J -C $GLIBC objdir=`pwd` subdir_lib
349   #make -r -j $J -C $GLIBC objdir=`pwd` install_root=$ASAN_INST install-lib
350   cd $HERE
351 }
352
353         #
354         # Build base glibc
355         #
356         configure_and_build_glibc base "$BuildFlags" "$add_ons"
357
358 %{?asan:
359 %ifarch %{asan_arch}
360 build_asan
361 %endif
362 }
363 #
364 # Build html documentation
365 #
366 %if %{build_html}
367 make -C cc-base html
368 %endif
369
370 #
371 # Build glibc_post_upgrade binary
372 #
373 $BuildCC -static %{optflags} -Os $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \
374      -Lcc-base -Bcc-base/csu \
375     '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \
376     '-DLIBDIR="/%{_lib}"' '-DGCONV_MODULES_DIR="%{_libdir}/gconv"'
377
378
379 #######################################################################
380 ###
381 ### CHECK
382 ###
383 #######################################################################
384
385 %check
386 # The testsuite will fail if asneeded is used
387 export LD_AS_NEEDED=0
388 # This has to pass on all platforms!
389 # Exceptions:
390 # None!
391 make %{?_smp_mflags} -C cc-base check-abi
392
393 #######################################################################
394 ###
395 ### INSTALL
396 ###
397 #######################################################################
398
399 %install
400 # We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
401 # certainly not from libpthread.so.* because it is used by libthread_db to find
402 # some non-exported symbols in order to detect if threading support
403 # should be enabled.  These symbols are _not_ exported, and we can't easily
404 # export them retroactively without changing the ABI.  So we have to
405 # continue to "export" them via .symtab, instead of .dynsym :-(
406 # But we also want to keep .symtab and .strtab of other libraries since some
407 # debugging tools currently require these sections directly inside the main
408 # files - specifically valgrind and PurifyPlus.
409 export STRIP_KEEP_SYMTAB=*.so*
410
411 # Make sure we will create the gconv-modules.cache
412 mkdir -p %{buildroot}%{_libdir}/gconv
413 touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
414
415 # Install base glibc
416 make %{?_smp_mflags} install_root=%{buildroot} install -C cc-base
417
418 install_optimized_variant() {
419         local dirname="$1"; shift
420         local subdir="$1"; shift
421         local subdir_up="$1"; shift
422
423 cd "cc-$dirname"
424 destdir=$RPM_BUILD_ROOT/%{_lib}/$subdir
425 mkdir -p $destdir
426 # Don't run a complete make install, we know which libraries
427 # we want
428 for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
429 do
430   libbase=${lib#*/}
431   libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
432   # Only install if different from base lib
433   if cmp -s ${lib}.so ../cc-base/${lib}.so; then
434     ln -sf $subdir_up/$libbaseso $destdir/$libbaseso
435   else
436     cp -a ${lib}.so $destdir/$libbaseso
437   fi
438   # Emulate ldconfig
439   ln -sf $libbaseso $destdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
440 done
441 cd ..
442 }
443
444
445 # Install locales
446 %if %{build_locales}
447         # XXX Do not install locales in parallel!
448         cd cc-base
449         # localedef creates hardlinks to other locales if possible
450         # this will not work if we generate them in parallel.
451         # thus we need to run fdupes on  /usr/lib/locale/
452         # Still, on my system this is a speed advantage:
453         # non-parallel build for install-locales: 9:34mins
454         # parallel build with fdupes: 7:08mins
455         make %{?_smp_mflags} install_root=%{buildroot} localedata/install-locales
456         %fdupes %{buildroot}/usr/lib/locale
457         cd ..
458 %endif
459 # Create file list for glibc-locale package
460 %{find_lang} libc
461
462 # Prepare obsolete/, used only on some architectures:
463 export RPM_BUILD_ROOT
464 %ifarch %ix86
465 mkdir -p %{buildroot}/%{_lib}/obsolete
466 %endif
467
468 # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
469 # the generic one (RH#162634)
470 # cp -av bits/stdio-lock.h %{buildroot}%{_includedir}/bits/stdio-lock.h
471
472
473 # Miscelanna:
474
475 install -m 0700 glibc_post_upgrade %{buildroot}%{_sbindir}
476
477 install -m 644 %{SOURCE7} %{buildroot}/etc
478 install -m 644 %{SOURCE5} %{buildroot}/etc
479 install -m 644 posix/gai.conf %{buildroot}/etc
480
481 mkdir -p %{buildroot}/etc/default
482 install -m 644 nis/nss %{buildroot}/etc/default/
483
484 mkdir -p %{buildroot}%{_includedir}/resolv
485 install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/
486 install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/
487
488 %if %{build_html}
489 mkdir -p %{buildroot}%{_datadir}/doc/glibc
490 cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc
491 %endif
492
493
494 #
495 # Create ld.so.conf
496 #
497 cat > %{buildroot}/etc/ld.so.conf <<EOF
498 %if "%{_lib}" == "lib64"
499 /usr/local/lib64
500 %endif
501 /usr/local/lib
502 include /etc/ld.so.conf.d/*.conf
503 # /lib64, /lib, /usr/lib64 and /usr/lib gets added
504 # automatically by ldconfig after parsing this file.
505 # So, they do not need to be listed.
506 EOF
507 # Add ldconfig cache directory for directory ownership
508 mkdir -p %{buildroot}/var/cache/ldconfig
509 # Empty the ld.so.cache:
510 rm -f %{buildroot}/etc/ld.so.cache
511 touch %{buildroot}/etc/ld.so.cache
512
513 # Don't look at ldd! We don't wish a /bin/sh requires
514 chmod 644 %{buildroot}%{_bindir}/ldd
515
516 # Remove timezone data, now coming in standalone package:
517 for i in sbin/sln usr/bin/tzselect usr/sbin/zic usr/sbin/zdump etc/localtime; do
518         rm -f %{buildroot}/$i
519 done
520 rm -rf %{buildroot}%{_datadir}/zoneinfo
521
522 %ifarch armv7hl
523 # Provide compatibility link
524 ln -s ld-%{glibc_major_version}.so %{buildroot}/lib/ld-linux.so.3
525 %endif
526
527 # Move getconf to %{_libexecdir}/getconf/ to avoid cross device link
528 mv %{buildroot}%{_bindir}/getconf %{buildroot}%{_libexecdir}/getconf/getconf
529 ln -s %{_libexecdir}/getconf/getconf %{buildroot}%{_bindir}/getconf
530
531 #######################################################################
532 ###
533 ### ...
534 ###
535 #######################################################################
536
537 %{?asan:
538 %ifarch %{asan_arch}
539 HERE=%{_builddir}/%{name}-%{version}
540 GLIBC=$HERE
541 ASAN_BUILD=$HERE/asan-build
542 cp $ASAN_BUILD/libc.so %{buildroot}/%{_lib}/libc-2.24-asan.so
543 %endif
544 }
545
546 %post -p %{_sbindir}/glibc_post_upgrade
547
548 %postun -p /sbin/ldconfig
549
550 %post locale
551 for l in /usr/share/locale/locale.alias %{_libdir}/gconv/gconv-modules; do
552         [ -d "$l.d" ] || continue
553         echo "###X# The following is autogenerated from extra files in the .d directory:" >>"$l"
554         cat "$l.d"/* >>"$l"
555 done
556 /usr/sbin/iconvconfig
557
558 %post info
559 %install_info --info-dir=%{_infodir} %{_infodir}/libc.info.gz
560
561 %postun info
562 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz
563
564 %files
565 %manifest %{name}.manifest
566 # glibc
567 %defattr(-,root,root)
568 %license LICENSES COPYING COPYING.LIB
569 %config(noreplace) /etc/bindresvport.blacklist
570 %config /etc/ld.so.conf
571 %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache
572 %config(noreplace) /etc/rpc
573 %verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf
574 %verify(not md5 size mtime) %config(noreplace) /etc/gai.conf
575 %config(noreplace) /etc/default/nss
576 /%{_lib}/ld-%{glibc_major_version}.so
577
578 # Each architecture has a different name for the dynamic linker:
579 %ifarch %arm
580 %ifarch armv7hl
581 /%{_lib}/ld-linux-armhf.so.3
582 # Keep compatibility link
583 /%{_lib}/ld-linux.so.3
584 %else
585 /%{_lib}/ld-linux.so.3
586 %endif
587 %endif
588 %ifarch x86_64
589 /%{_lib}/ld-linux-x86-64.so.2
590 %endif
591 %ifarch %ix86 %sparc
592 /%{_lib}/ld-linux.so.2
593 %endif
594 %ifarch aarch64
595 /lib/ld-linux-aarch64.so.1
596 /%{_lib}/ld-linux-aarch64.so.1
597 %endif
598
599 /%{_lib}/libanl-%{glibc_major_version}.so
600 /%{_lib}/libanl.so.1
601 /%{_lib}/libc-%{glibc_major_version}.so
602 /%{_lib}/libc.so.6*
603 /%{_lib}/libcidn-%{glibc_major_version}.so
604 /%{_lib}/libcidn.so.1
605 /%{_lib}/libcrypt-%{glibc_major_version}.so
606 /%{_lib}/libcrypt.so.1
607 /%{_lib}/libdl-%{glibc_major_version}.so
608 /%{_lib}/libdl.so.2*
609 /%{_lib}/libm-%{glibc_major_version}.so
610 /%{_lib}/libm.so.6*
611 /%{_lib}/libnsl-%{glibc_major_version}.so
612 /%{_lib}/libnsl.so.1
613 /%{_lib}/libnss_compat-%{glibc_major_version}.so
614 /%{_lib}/libnss_compat.so.2
615 /%{_lib}/libnss_db-%{glibc_major_version}.so
616 /%{_lib}/libnss_db.so.2
617 /%{_lib}/libnss_dns-%{glibc_major_version}.so
618 /%{_lib}/libnss_dns.so.2
619 /%{_lib}/libnss_files-%{glibc_major_version}.so
620 /%{_lib}/libnss_files.so.2
621 /%{_lib}/libnss_hesiod-%{glibc_major_version}.so
622 /%{_lib}/libnss_hesiod.so.2
623 /%{_lib}/libnss_nis-%{glibc_major_version}.so
624 /%{_lib}/libnss_nis.so.2
625 /%{_lib}/libnss_nisplus-%{glibc_major_version}.so
626 /%{_lib}/libnss_nisplus.so.2
627 /%{_lib}/libpthread-%{glibc_major_version}.so
628 /%{_lib}/libpthread.so.0
629 /%{_lib}/libthread_db-1.0.so
630 /%{_lib}/libthread_db.so.1
631 /%{_lib}/libresolv-%{glibc_major_version}.so
632 /%{_lib}/libresolv.so.2
633 /%{_lib}/librt-%{glibc_major_version}.so
634 /%{_lib}/librt.so.1
635 /%{_lib}/libutil-%{glibc_major_version}.so
636 /%{_lib}/libutil.so.1
637 %define optimized_libs() \
638         %dir %attr(0755,root,root) /%{_lib}/%1\
639         /%{_lib}/%1/libc-%{glibc_major_version}.so\
640         /%{_lib}/%1/libc.so.6*\
641         /%{_lib}/%1/libm-%{glibc_major_version}.so\
642         /%{_lib}/%1/libm.so.6*\
643         /%{_lib}/%1/libpthread-%{glibc_major_version}.so\
644         /%{_lib}/%1/libpthread.so.0\
645         /%{_lib}/%1/librt-%{glibc_major_version}.so\
646         /%{_lib}/%1/librt.so.1\
647         /%{_lib}/%1/libthread_db-1.0.so\
648         /%{_lib}/%1/libthread_db.so.1
649
650 %dir %attr(0700,root,root) /var/cache/ldconfig
651 /sbin/ldconfig
652 %{_bindir}/gencat
653 %{_bindir}/getconf
654 %{_bindir}/getent
655 %{_bindir}/iconv
656 %attr(755,root,root) %{_bindir}/ldd
657 %ifarch %ix86 sparc sparcv9
658         %{_bindir}/lddlibc4
659 %endif
660 %{_bindir}/locale
661 %{_bindir}/localedef
662 %dir %attr(0755,root,root) %{_libexecdir}/getconf
663 %{_libexecdir}/getconf/*
664 %{_sbindir}/glibc_post_upgrade
665 %{_sbindir}/iconvconfig
666 /%{_lib}/libBrokenLocale-%{glibc_major_version}.so
667 /%{_lib}/libBrokenLocale.so.1
668
669 %ifarch %ix86
670
671 %files obsolete
672 %manifest %{name}.manifest
673 %license COPYING.LIB
674 %defattr (755,root,root,755)
675 %dir /%{_lib}/obsolete/
676         #%dir /%{_lib}/obsolete/noversion
677         #/%{_lib}/obsolete/noversion/libNoVersion-%{glibc_major_version}.so
678         #/%{_lib}/obsolete/noversion/libNoVersion.so.1
679 %endif
680
681 %files locale -f libc.lang
682 %manifest %{name}.manifest
683 %license COPYING COPYING.LIB
684 %defattr(-,root,root)
685 %{_datadir}/locale/locale.alias
686 %if %{build_locales}
687 /usr/lib/locale/*
688 %endif
689 %{_libdir}/gconv
690
691 %{?asan:
692 %ifarch %{asan_arch}
693 %files asan
694 %manifest %{name}.manifest
695 /%{_lib}/libc-2.24-asan.so
696 %endif
697 }
698
699 %files devel
700 %manifest %{name}.manifest
701 %defattr(-,root,root)
702 %license COPYING COPYING.LIB 
703 %doc NEWS README BUGS CONFORMANCE
704 %{_bindir}/rpcgen
705 %{_includedir}/*
706 %{_libdir}/*.o
707 %{_libdir}/*.so
708 # These static libraries are needed even for shared builds
709 %{_libdir}/libc_nonshared.a
710 %{_libdir}/libg.a
711 %{_libdir}/libieee.a
712 %ifarch ppc ppc64 s390 s390x sparc sparcv8 sparcv9 sparcv9v
713 # This is not built on sparc64.
714         %{_libdir}/libnldbl_nonshared.a
715 %endif
716 %{_libdir}/libmcheck.a
717 %{_libdir}/libpthread_nonshared.a
718 %{_libdir}/librpcsvc.a
719
720 %files devel-static
721 %manifest %{name}.manifest
722 %defattr(-,root,root)
723 %{_libdir}/libBrokenLocale.a
724 %{_libdir}/libanl.a
725 %{_libdir}/libc.a
726 %{_libdir}/libcrypt.a
727 %{_libdir}/libdl.a
728 %{_libdir}/libm.a
729 %{_libdir}/libnsl.a
730 %{_libdir}/libpthread.a
731 %{_libdir}/libresolv.a
732 %{_libdir}/librt.a
733 %{_libdir}/libutil.a
734
735 %files info
736 %manifest %{name}.manifest
737 %defattr(-,root,root)
738 %doc %{_infodir}/libc.info.gz
739 %doc %{_infodir}/libc.info-?.gz
740 %doc %{_infodir}/libc.info-??.gz
741
742 %if %{build_html}
743 %files html
744 %manifest %{name}.manifest
745 %defattr(-,root,root)
746 %doc %{_prefix}/share/doc/glibc
747 %endif
748
749 %files i18ndata
750 %manifest %{name}.manifest
751 %defattr(-,root,root)
752 %{_prefix}/share/i18n
753
754 %if %{build_profile}
755 %files profile
756 %manifest %{name}.manifest
757 %license COPYING COPYING.LIB
758 %defattr(-,root,root)
759 %{_libdir}/libc_p.a
760 %{_libdir}/libBrokenLocale_p.a
761 %{_libdir}/libanl_p.a
762 %{_libdir}/libm_p.a
763 %{_libdir}/libcrypt_p.a
764 %{_libdir}/libpthread_p.a
765 %{_libdir}/libresolv_p.a
766 %{_libdir}/libnsl_p.a
767 %{_libdir}/librt_p.a
768 %{_libdir}/librpcsvc_p.a
769 %{_libdir}/libutil_p.a
770 %{_libdir}/libdl_p.a
771 %endif
772
773 %files devel-utils
774 %manifest %{name}.manifest
775 %defattr(-,root,root)
776 /%{_lib}/libmemusage.so
777 /%{_lib}/libpcprofile.so
778 /%{_libdir}/libBrokenLocale.so
779 /%{_lib}/libSegFault.so
780 /%{_lib}/libthread_db-1.0.so
781 /%{_lib}/libthread_db.so.1
782 /%{_libdir}/libthread_db.so
783 %dir /%{_libdir}/audit
784 /%{_libdir}/audit/sotruss-lib.so
785 # These need gd-devel for building
786 # %%{_bindir}/memusage
787 # %%{_bindir}/memusagestat
788 %{_bindir}/mtrace
789 %{_bindir}/pcprofiledump
790 %{_bindir}/sotruss
791 %{_bindir}/xtrace
792 %{_bindir}/pldd
793 %{_bindir}/catchsegv
794 %{_bindir}/sprof
795
796 %files extra
797 %manifest %{name}.manifest
798 %license COPYING.LIB
799 %defattr(-,root,root)
800 %{_bindir}/makedb
801 /var/db/Makefile
802
803
804 %docs_package