]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blame - glibc/glibc.nm
pcre: Update to 8.34.
[people/arne_f/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
3994dee1 7version = 2.17
da275347 8release = 4
802ea3af
MT
9
10maintainer = Michael Tremer <michael.tremer@ipfire.org>
11groups = System/Base
12url = http://sources.redhat.com/glibc/
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
26source_dl = http://ftp.gnu.org/gnu/glibc/
3994dee1 27sources = %{thisapp}.tar.xz
802ea3af
MT
28
29build
16cbb54b
MT
30 # Optimize glibc for kernel
31 OPTIMIZED_KERNEL = 2.6.32
32
802ea3af 33 requires
eec2ad4c 34 audit-devel
7f98fc96
MT
35 autoconf
36 automake
eec2ad4c 37 gettext
3994dee1 38 kernel-headers >= %{OPTIMIZED_KERNEL}
802ea3af
MT
39 libcap-devel
40 libselinux-devel
7f98fc96 41 texinfo
802ea3af
MT
42 end
43
44 # Build glibc with custom cflags
706fb4da 45 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -fPIC -DPIC
802ea3af
MT
46
47 if "%{DISTRO_ARCH}" == "i686"
48 GLIBC_FLAGS += -march=i686 -mtune=generic
706fb4da
MT
49 end
50
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
802ea3af
MT
58 export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
59
3994dee1 60 prepare_cmds
802ea3af
MT
61 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
62 # unknown whether this is a bash bug or a Glibc problem. Disable
63 # installation of this locale in order to avoid the problem.
64 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
65
66 # The ldd shell script contains Bash-specific syntax. Change its default
67 # program interpreter to /bin/bash in case another /bin/sh is installed.
68 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
69
70 # We don't install pt_chown(1) on the final system, so why install it to
71 # $(TOOLS_DIR):
72 sed -e "/^install.*pt_chown/d" -i login/Makefile
73
74 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
75 sed -e "s/fstack-protector/&-all/" -i nscd/Makefile
76
77 cat %{DIR_SOURCE}/glibc-stack_chk_fail.c > debug/stack_chk_fail.c
78
79 # Use gnu hash style
80 sed -i Makeconfig \
81 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
82
3994dee1
MT
83 # http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
84 sed -e "s/PIC/SHARED/g" -i ports/sysdeps/arm/{set,__long}jmp.S
802ea3af
MT
85 end
86
e4c5e530
MT
87 configure_options = \
88 --build=%{DISTRO_BUILDTARGET} \
e4c5e530 89 --prefix=/usr \
706fb4da 90 --libexecdir=%{libdir}/glibc \
e4c5e530
MT
91 --disable-profile \
92 --enable-add-ons \
93 --enable-kernel=%{OPTIMIZED_KERNEL} \
94 --with-selinux \
95 --disable-werror \
eec2ad4c 96 --enable-bind-now \
3994dee1
MT
97 --enable-obsolete-rpc \
98 --with-bugurl=http://bugtracker.ipfire.org
e4c5e530
MT
99
100 if "%{DISTRO_ARCH}" == "armv5tel"
101 # Disable hardware FP for ARM.
102 configure_options += \
103 --without-fp
104 end
105
802ea3af 106 build
e4c5e530 107 mkdir -p %{DIR_SRC}/glibc-build
802ea3af
MT
108 cd %{DIR_SRC}/glibc-build
109
110 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
111 ../%{thisapp}/configure \
e4c5e530 112 %{configure_options}
70b63715 113
802ea3af
MT
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
802ea3af
MT
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
802ea3af
MT
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
08884d73
MT
148 if [ "%{DISTRO_ARCH}" = "armv7hl" ]; then
149 ln -svf ld-linux-armhf.so.3 %{BUILDROOT}/lib/ld-linux.so.3
150 fi
151
802ea3af
MT
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
706fb4da
MT
160 > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
161 chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
802ea3af 162
706fb4da 163 strip -g %{BUILDROOT}%{libdir}/*.o
802ea3af
MT
164
165 # Move some libs to correct place
706fb4da 166 mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
4b31eadd
MT
167
168 # Fix library permissions.
169 chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
e448e014
MT
170
171 # rquota.x and rquota.h are now provided by quota
172 rm -vf %{BUILDROOT}%{includedir}/rpcsvc/rquota.[hx]
802ea3af 173 end
8a3a777f
MT
174
175 keep_libraries
706fb4da
MT
176 %{libdir}/libc_nonshared.a
177 %{libdir}/libpthread_nonshared.a
8a3a777f 178 end
802ea3af
MT
179end
180
181packages
182 package glibc
1262a291 183 requires = glibc-common = %{thisver}
08884d73
MT
184
185 if "%{DISTRO_ARCH}" == "armv7hl"
186 provides += ld-linux.so.3
187 provides += ld-linux.so.3(GLIBC_2.4)
3bece620 188 provides += ld-linux.so.3(GLIBC_PRIVATE)
08884d73 189 end
802ea3af
MT
190 end
191
192 package glibc-common
193 # XXX description and summary are missing
194
1262a291
MT
195 requires
196 glibc = %{thisver}
197 tzdata
198 end
b0f38bbb 199
802ea3af
MT
200 files
201 /usr/bin
202 /usr/sbin
203 /usr/share
20580800 204 /usr/lib/locale
802ea3af
MT
205 !/usr/share/zoneinfo
206 end
207 end
208
209 package glibc-devel
210 summary = Object files for development using standard C libraries.
211 description
212 The glibc-devel package contains the object files necessary
213 for developing programs which use the standard C libraries (which are
214 used by nearly all programs). If you are developing programs which
215 will use the standard C libraries, your system needs to have these
216 standard object files available in order to create the
217 executables.
218
219 Install glibc-devel if you are going to develop programs which will
220 use the standard C libraries.
221 end
222 group = Development/Libraries
223
1262a291
MT
224 requires
225 glibc = %{thisver}
226 glibc-headers = %{thisver}
227 end
802ea3af 228
08884d73
MT
229 files
230 %{includedir}
231 %{libdir}/*.a
232 %{libdir}/*.o
233 end
802ea3af
MT
234 end
235
236 package glibc-headers
237 description
238 The glibc-headers package contains the header files necessary
239 for developing programs which use the standard C libraries (which are
240 used by nearly all programs). If you are developing programs which
241 will use the standard C libraries, your system needs to have these
242 standard header files available in order to create the
243 executables.
244
245 Install glibc-headers if you are going to develop programs which will
246 use the standard C libraries.
247 end
248
1262a291
MT
249 requires
250 glibc = %{thisver}
251 kernel-headers >= %{OPTIMIZED_KERNEL}
252 end
802ea3af
MT
253
254 files
255 /usr/include
256 !/usr/include/linuxthreads
257 !/usr/include/gnu/stubs-[32164]*.h
258 end
259 end
260
261 package nscd
262 summary = A Name Service Caching Daemon (nscd).
263 description
264 Nscd caches name service lookups and can dramatically improve
265 performance with NIS+, and may help with DNS as well.
266 end
267 group = System/Daemons
268
269 files
270 /usr/sbin/nscd
271 end
272 end
273
274 package %{name}-utils
275 summary = Development utilities from GNU C library.
276 description
277 The glibc-utils package contains memusage, a memory usage profiler,
278 mtrace, a memory leak tracer and xtrace, a function call tracer
279 which can be helpful during program debugging.
280 end
281 group = Development/Tools
282
283 files
284 /usr/bin/memusage
285 /usr/bin/memusagestat
286 /usr/bin/mtrace
287 /usr/bin/pcprofiledump
288 /usr/bin/xtrace
706fb4da
MT
289 %{libdir}/libmemusage.so
290 %{libdir}/libpcprofile.so
802ea3af
MT
291 end
292 end
1f9bc2f0
MT
293
294 package %{name}-debuginfo
295 template DEBUGINFO
296 end
802ea3af 297end