]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - glibc/glibc.nm
libsodium: Update to 1.0.9
[people/amarx/ipfire-3.x.git] / glibc / glibc.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = glibc
7 version = 2.23
8 release = 2
9
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = System/Base
12 url = http://www.gnu.org/software/libc/libc.html
13 license = GPLv2+ LGPLv2+
14 summary = The GNU libc libraries.
15
16 description
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
23 Linux system will not function.
24 end
25
26 source_dl = http://ftp.gnu.org/gnu/glibc/
27 sources = %{thisapp}.tar.xz
28
29 build
30 # Optimize glibc for kernel
31 OPTIMIZED_KERNEL = 3.2
32
33 requires
34 audit-devel
35 autoconf
36 automake
37 gcc >= 4.7
38 gettext
39 kernel-headers >= %{OPTIMIZED_KERNEL}
40 libcap-devel
41 libselinux-devel
42 libstdc++-static
43 texinfo
44 end
45
46 # Build glibc with custom cflags
47 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -fPIC -DPIC
48
49 if "%{DISTRO_ARCH}" == "i686"
50 GLIBC_FLAGS += -march=i686 -mtune=generic
51 end
52
53 if "%{DISTRO_ARCH}" == "x86_64"
54 GLIBC_FLAGS += -mtune=generic
55 end
56
57 export CFLAGS = %{GLIBC_FLAGS}
58 export CXXFLAGS = %{GLIBC_FLAGS}
59
60 export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
61
62 prepare_cmds
63 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
64 # unknown whether this is a bash bug or a Glibc problem. Disable
65 # installation of this locale in order to avoid the problem.
66 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
67
68 # The ldd shell script contains Bash-specific syntax. Change its default
69 # program interpreter to /bin/bash in case another /bin/sh is installed.
70 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
71
72 # We don't install pt_chown(1) on the final system
73 sed -e "/^install.*pt_chown/d" -i login/Makefile
74
75 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
76 sed -e "s/fstack-protector/&-strong/" -i nscd/Makefile
77
78 # Use gnu hash style
79 sed -i Makeconfig \
80 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
81
82 # http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
83 sed -e "s/PIC/SHARED/g" -i sysdeps/arm/{set,__long}jmp.S
84 end
85
86 configure_options = \
87 --build=%{DISTRO_BUILDTARGET} \
88 --prefix=/usr \
89 --libexecdir=%{libdir}/glibc \
90 --disable-profile \
91 --enable-add-ons \
92 --enable-kernel=%{OPTIMIZED_KERNEL} \
93 --with-selinux \
94 --disable-werror \
95 --enable-bind-now \
96 --enable-obsolete-rpc \
97 --with-bugurl=http://bugtracker.ipfire.org \
98 --enable-lock-elision
99
100 if "%{DISTRO_ARCH}" == "armv5tel"
101 # Disable hardware FP for ARM.
102 configure_options += \
103 --without-fp
104 end
105
106 build
107 mkdir -p %{DIR_SRC}/glibc-build
108 cd %{DIR_SRC}/glibc-build
109
110 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
111 ../%{thisapp}/configure \
112 %{configure_options}
113
114 sed -i config.make \
115 -e "s/^build-pic-default=.*/build-pic-default=yes/"
116
117 # Our GCC is already passing -fPIC, and that's all we want for the libraries.
118 # LDFLAGS.so is appended to so we don't build shared libraries with
119 # DT_TEXTREL (and to tell us if something goes wrong). For now we only build
120 # the libraries, not the programs:
121 echo "build-programs=no" >> configparms
122
123 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
124 CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
125 CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
126
127 # Then build the programs with hardening, so everything possible in
128 # is hardened:
129 echo "# Nothing in here :D" > configparms
130 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
131 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
132 end
133
134 install
135 cd %{DIR_SRC}/glibc-build
136 make install install_root=%{BUILDROOT}
137
138 # Locales
139 mkdir -pv %{BUILDROOT}/usr/lib/locale
140 # This would install all locales that are supported
141 make localedata/install-locales install_root=%{BUILDROOT}
142
143 # Configuration
144 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
145 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
146 install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
147
148 if [ "%{DISTRO_ARCH}" = "armv7hl" ]; then
149 ln -svf ld-linux-armhf.so.3 %{BUILDROOT}/lib/ld-linux.so.3
150 fi
151
152 # Remove unused binaries
153 rm -vf %{BUILDROOT}/sbin/sln \
154 %{BUILDROOT}/usr/bin/rpcinfo
155
156 # Don't distribute linker cache
157 rm -vf %{BUILDROOT}/etc/ld.so.cache
158
159 # Include /usr/lib/gconv/gconv-modules.cache
160 > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
161 chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
162
163 strip -g %{BUILDROOT}%{libdir}/*.o
164
165 # Move some libs to correct place
166 mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
167
168 # Fix library permissions.
169 chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
170
171 # rquota.x and rquota.h are now provided by quota
172 rm -vf %{BUILDROOT}%{includedir}/rpcsvc/rquota.[hx]
173 end
174
175 keep_libraries
176 %{libdir}/libc_nonshared.a
177 %{libdir}/libmvec_nonshared.a
178 %{libdir}/libpthread_nonshared.a
179 end
180 end
181
182 packages
183 package glibc
184 requires = glibc-common = %{thisver}
185
186 if "%{DISTRO_ARCH}" == "armv7hl"
187 provides += ld-linux.so.3
188 provides += ld-linux.so.3(GLIBC_2.4)
189 provides += ld-linux.so.3(GLIBC_PRIVATE)
190 end
191
192 conflicts
193 kernel < %{OPTIMIZED_KERNEL}
194 end
195 end
196
197 package glibc-common
198 # XXX description and summary are missing
199
200 requires
201 glibc = %{thisver}
202 tzdata
203 end
204
205 files
206 /usr/bin
207 /usr/sbin
208 /usr/share
209 /usr/lib/locale
210 !/usr/share/zoneinfo
211 end
212 end
213
214 package glibc-devel
215 summary = Object files for development using standard C libraries.
216 description
217 The glibc-devel package contains the object files necessary
218 for developing programs which use the standard C libraries (which are
219 used by nearly all programs). If you are developing programs which
220 will use the standard C libraries, your system needs to have these
221 standard object files available in order to create the
222 executables.
223
224 Install glibc-devel if you are going to develop programs which will
225 use the standard C libraries.
226 end
227 group = Development/Libraries
228
229 requires
230 glibc = %{thisver}
231 glibc-headers = %{thisver}
232 end
233
234 files
235 %{includedir}
236 %{libdir}/*.a
237 %{libdir}/*.o
238 end
239 end
240
241 package glibc-headers
242 description
243 The glibc-headers package contains the header files necessary
244 for developing programs which use the standard C libraries (which are
245 used by nearly all programs). If you are developing programs which
246 will use the standard C libraries, your system needs to have these
247 standard header files available in order to create the
248 executables.
249
250 Install glibc-headers if you are going to develop programs which will
251 use the standard C libraries.
252 end
253
254 requires
255 glibc = %{thisver}
256 kernel-headers >= %{OPTIMIZED_KERNEL}
257 end
258
259 files
260 /usr/include
261 !/usr/include/linuxthreads
262 !/usr/include/gnu/stubs-[32164]*.h
263 end
264 end
265
266 package nscd
267 summary = A Name Service Caching Daemon (nscd).
268 description
269 Nscd caches name service lookups and can dramatically improve
270 performance with NIS+, and may help with DNS as well.
271 end
272 group = System/Daemons
273
274 files
275 /usr/sbin/nscd
276 end
277 end
278
279 package %{name}-utils
280 summary = Development utilities from GNU C library.
281 description
282 The glibc-utils package contains memusage, a memory usage profiler,
283 mtrace, a memory leak tracer and xtrace, a function call tracer
284 which can be helpful during program debugging.
285 end
286 group = Development/Tools
287
288 files
289 /usr/bin/memusage
290 /usr/bin/memusagestat
291 /usr/bin/mtrace
292 /usr/bin/pcprofiledump
293 /usr/bin/xtrace
294 %{libdir}/libmemusage.so
295 %{libdir}/libpcprofile.so
296 end
297 end
298
299 package %{name}-debuginfo
300 template DEBUGINFO
301 end
302 end