5 %define build_utils %{with build_all}
6 %define build_testsuite %{with build_all}
7 %if "%flavor" == "utils"
8 %if %{with ringdisabled}
9 ExclusiveArch: do_not_build
13 %define build_testsuite 0
15 %if "%flavor" == "testsuite"
16 %if %{with ringdisabled}
17 ExclusiveArch: do_not_build
21 %define build_testsuite 1
24 %define name_suffix %{nil}
26 %define name_suffix -%{flavor}-src
28 Name: glibc%{name_suffix}
29 Summary: Standard Shared Libraries (from the GNU C Library)
30 License: LGPL-2.1+ AND LGPL-2.1+ with GCC-exception-2.0 AND GPL-2.0+
31 Group: System/Libraries
33 %define enablekernel 3.2
37 URL: https://www.gnu.org/software/libc/
38 Source: https://mirrors.ustc.edu.cn/gnu/glibc/glibc-%{version}.tar.xz
39 Source1: https://mirrors.ustc.edu.cn/gnu/glibc/glibc-%{version}.tar.xz.sig
41 %if %{with fast_build} || %{build_utils} && %{without build_all}
42 %define build_profile 0
43 %define build_locales 0
47 %define build_profile 1
48 %define build_locales 1
52 Requires: glibc = %{version}
54 BuildRoot: %{_tmppath}/%{name}-%{version}-build
56 ##Default not enable libselinux
58 The GNU C Library provides the most important standard libraries used
59 by nearly all programs: the standard C library, the standard math
60 library, and the POSIX thread library. A system is not functional
61 without these libraries.
65 # If build in OpenSUSE
66 ## export SUSE_ASNEEDED=0
67 chmod +x benchtests/scripts/*.py scripts/pylint
68 find . -name configure | xargs touch
71 if [ -x /bin/uname.bin ]; then
81 %define target %{_target_cpu}-essential-linux
82 echo "#define CONFHOST \"%{target}\"" >> version.h
83 EnableKernel="--enable-kernel=%{enablekernel}"
88 ../configure CC="$GCC" CXX="$GXX" \
90 --with-headers=%{_prefix}/include \
92 --build=%{target} --host=%{target} \
96 --enable-stackguard-randomization \
103 --disable-timezone-tools \
109 make %{?_smp_mflags} -C build html
112 %if %{build_testsuite}
113 export TIMEOUTFACTOR=16
114 # The testsuite does its own malloc checking
116 make %{?_smp_mflags} -C build -k check || {
120 for sum in subdir-tests.sum */subdir-tests.sum; do
124 echo ++++++ $s $t ++++++
127 echo ------ $s $t ------
128 test ! -f $t.out || cat $t.out
134 # Fail build if there where compilation errors during testsuite run
138 make %{?_smp_mflags} -C build check-abi