]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blame - glibc/glibc.nm
glibc: Update to 2.37
[people/stevee/ipfire-3.x.git] / glibc / glibc.nm
CommitLineData
166a6c21 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
166a6c21
MT
4###############################################################################
5
802ea3af 6name = glibc
21c695c7
MT
7version = 2.37
8release = 1
802ea3af
MT
9
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = System/Base
c8f56dcc 12url = http://www.gnu.org/software/libc/libc.html
802ea3af
MT
13license = GPLv2+ LGPLv2+
14summary = The GNU libc libraries.
15
16description
17 The glibc package contains standard libraries which are used by
18 multiple programs on the system. In order to save disk space and
19 memory, as well as to make upgrading easier, common system code is
20 kept in one place and shared between programs. This particular package
21 contains the most important sets of shared libraries: the standard C
22 library and the standard math library. Without these two libraries, a
166a6c21 23 Linux system will not function.
802ea3af
MT
24end
25
8c00dee0 26source_dl = https://ftp.gnu.org/gnu/glibc/
3994dee1 27sources = %{thisapp}.tar.xz
802ea3af
MT
28
29build
16cbb54b 30 # Optimize glibc for kernel
ee62c3f9 31 OPTIMIZED_KERNEL = 3.2
16cbb54b 32
802ea3af 33 requires
7f98fc96
MT
34 autoconf
35 automake
6cb5e9ba 36 binutils >= 2.35
24e9b8ad 37 bison
6cb5e9ba 38 gcc >= 11
eec2ad4c 39 gettext
3994dee1 40 kernel-headers >= %{OPTIMIZED_KERNEL}
802ea3af 41 libcap-devel
ee62c3f9 42 libstdc++-static
8c00dee0
MT
43 make >= 4.0
44 python3 >= 3.4
7f98fc96 45 texinfo
802ea3af
MT
46 end
47
48 # Build glibc with custom cflags
0c55b410 49 GLIBC_FLAGS = -O2 -g -DNDEBUG -pipe
802ea3af 50
706fb4da 51 if "%{DISTRO_ARCH}" == "x86_64"
802ea3af
MT
52 GLIBC_FLAGS += -mtune=generic
53 end
54
55 export CFLAGS = %{GLIBC_FLAGS}
56 export CXXFLAGS = %{GLIBC_FLAGS}
57
3994dee1 58 prepare_cmds
802ea3af
MT
59 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
60 # unknown whether this is a bash bug or a Glibc problem. Disable
61 # installation of this locale in order to avoid the problem.
62 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
63
64 # The ldd shell script contains Bash-specific syntax. Change its default
65 # program interpreter to /bin/bash in case another /bin/sh is installed.
66 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
67
ee62c3f9 68 # We don't install pt_chown(1) on the final system
802ea3af
MT
69 sed -e "/^install.*pt_chown/d" -i login/Makefile
70
71 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
ee62c3f9 72 sed -e "s/fstack-protector/&-strong/" -i nscd/Makefile
802ea3af 73
802ea3af
MT
74 # Use gnu hash style
75 sed -i Makeconfig \
76 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
77
3994dee1 78 # http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
389ab7f8 79 sed -e "s/PIC/SHARED/g" -i sysdeps/arm/{set,__long}jmp.S
802ea3af
MT
80 end
81
e4c5e530
MT
82 configure_options = \
83 --build=%{DISTRO_BUILDTARGET} \
e4c5e530 84 --prefix=/usr \
706fb4da 85 --libexecdir=%{libdir}/glibc \
e4c5e530
MT
86 --disable-profile \
87 --enable-add-ons \
88 --enable-kernel=%{OPTIMIZED_KERNEL} \
e4c5e530 89 --disable-werror \
8feada5b 90 --disable-crypt \
d7d685fc 91 --enable-stack-protector=strong \
eec2ad4c 92 --enable-bind-now \
3994dee1 93 --enable-obsolete-rpc \
6cb5e9ba 94 --with-bugurl=https://bugtracker.ipfire.org \
72f604e8
MT
95 --enable-lock-elision \
96 --enable-cet
e4c5e530 97
802ea3af 98 build
e4c5e530 99 mkdir -p %{DIR_SRC}/glibc-build
802ea3af
MT
100 cd %{DIR_SRC}/glibc-build
101
102 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
103 ../%{thisapp}/configure \
e4c5e530 104 %{configure_options}
70b63715 105
802ea3af
MT
106 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
107 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
108 end
109
802ea3af
MT
110 install
111 cd %{DIR_SRC}/glibc-build
112 make install install_root=%{BUILDROOT}
113
114 # Locales
115 mkdir -pv %{BUILDROOT}/usr/lib/locale
116 # This would install all locales that are supported
117 make localedata/install-locales install_root=%{BUILDROOT}
118
802ea3af
MT
119 # Configuration
120 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
121 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
08884d73 122
802ea3af
MT
123 # Remove unused binaries
124 rm -vf %{BUILDROOT}/sbin/sln \
125 %{BUILDROOT}/usr/bin/rpcinfo
126
127 # Don't distribute linker cache
128 rm -vf %{BUILDROOT}/etc/ld.so.cache
129
130 # Include /usr/lib/gconv/gconv-modules.cache
706fb4da
MT
131 > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
132 chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
802ea3af 133
706fb4da 134 strip -g %{BUILDROOT}%{libdir}/*.o
802ea3af
MT
135
136 # Move some libs to correct place
706fb4da 137 mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
4b31eadd
MT
138
139 # Fix library permissions.
140 chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
e448e014
MT
141
142 # rquota.x and rquota.h are now provided by quota
143 rm -vf %{BUILDROOT}%{includedir}/rpcsvc/rquota.[hx]
802ea3af 144 end
8a3a777f
MT
145
146 keep_libraries
706fb4da 147 %{libdir}/libc_nonshared.a
301beda7 148 %{libdir}/libmvec_nonshared.a
706fb4da 149 %{libdir}/libpthread_nonshared.a
8a3a777f 150 end
802ea3af
MT
151end
152
153packages
154 package glibc
1262a291 155 requires
1262a291
MT
156 tzdata
157 end
b0f38bbb 158
9ec02175
MT
159 conflicts
160 kernel < %{OPTIMIZED_KERNEL}
161 end
162
163 obsoletes
164 glibc-common < %{thisver}
802ea3af
MT
165 end
166 end
167
168 package glibc-devel
9ec02175 169 template DEVEL
802ea3af 170
1262a291
MT
171 requires
172 glibc = %{thisver}
173 glibc-headers = %{thisver}
9ec02175 174 kernel-headers >= %{OPTIMIZED_KERNEL}
1262a291 175 end
802ea3af 176
9ec02175
MT
177 provides
178 glibc-headers = %{thisver}
802ea3af
MT
179 end
180
9ec02175
MT
181 obsoletes
182 glibc-headers < %{thisver}
1262a291 183 end
802ea3af 184
9ec02175 185 files += %{libdir}/*.[ao]
802ea3af
MT
186 end
187
188 package nscd
189 summary = A Name Service Caching Daemon (nscd).
190 description
191 Nscd caches name service lookups and can dramatically improve
192 performance with NIS+, and may help with DNS as well.
193 end
194 group = System/Daemons
195
196 files
197 /usr/sbin/nscd
198 end
199 end
200
201 package %{name}-utils
202 summary = Development utilities from GNU C library.
203 description
204 The glibc-utils package contains memusage, a memory usage profiler,
205 mtrace, a memory leak tracer and xtrace, a function call tracer
206 which can be helpful during program debugging.
207 end
208 group = Development/Tools
209
210 files
211 /usr/bin/memusage
212 /usr/bin/memusagestat
213 /usr/bin/mtrace
214 /usr/bin/pcprofiledump
215 /usr/bin/xtrace
706fb4da
MT
216 %{libdir}/libmemusage.so
217 %{libdir}/libpcprofile.so
802ea3af
MT
218 end
219 end
1f9bc2f0
MT
220
221 package %{name}-debuginfo
222 template DEBUGINFO
223 end
802ea3af 224end