]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - glibc/glibc.nm
gcc: Package libgcc{,_eh}.a.
[people/ms/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
7f617709 6# TODO tzdata
166a6c21 7
802ea3af
MT
8name = glibc
9version = 2.14
16cbb54b 10release = 2
802ea3af
MT
11
12maintainer = Michael Tremer <michael.tremer@ipfire.org>
13groups = System/Base
14url = http://sources.redhat.com/glibc/
15license = GPLv2+ LGPLv2+
16summary = The GNU libc libraries.
17
18description
19 The glibc package contains standard libraries which are used by
20 multiple programs on the system. In order to save disk space and
21 memory, as well as to make upgrading easier, common system code is
22 kept in one place and shared between programs. This particular package
23 contains the most important sets of shared libraries: the standard C
24 library and the standard math library. Without these two libraries, a
166a6c21 25 Linux system will not function.
802ea3af
MT
26end
27
28source_dl = http://ftp.gnu.org/gnu/glibc/
29sources = %{thisapp}.tar.xz
30
31build
16cbb54b
MT
32 # Optimize glibc for kernel
33 OPTIMIZED_KERNEL = 2.6.32
34
802ea3af
MT
35 requires
36 audit-devel
37 autoconf
38 automake
39 gettext
16cbb54b 40 kernel-headers>=%{OPTIMIZED_KERNEL}
802ea3af
MT
41 libcap-devel
42 libselinux-devel
43 texinfo
44 end
45
46 # Build glibc with custom cflags
47 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -DPIC
48
49 if "%{DISTRO_ARCH}" == "i686"
50 GLIBC_FLAGS += -march=i686 -mtune=generic
51 elif "%{DISTRO_ARCH}" == "x86_64"
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
60 prepare_cmds
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
83 # stdlib/tst-putenvmod is not linked against libc.
84 sed -i stdlib/Makefile \
85 -e "s/^CFLAGS-tst-putenvmod.c.*/& -fno-stack-protector/g"
86
87 # stdio-common/bug22 hits timeout.
88 sed -i stdio-common/bug22.c \
89 -e "s/#define TIMEOUT.*/#define TIMEOUT 300/"
90
91 # These tests don't work or need more investigation:
92 sed -i dlfcn/Makefile -e "s/default //g"
93
94 sed -i nptl/Makefile \
95 -e "s/tst-mutex5 //g" \
96 -e "s/tst-mutex5a //g" \
97 -e "s/tst-cond11 //g" \
98 -e "s/tst-rwlock6 //g" \
99 -e "s/tst-rwlock7 //g" \
100 -e "s/tst-sem5 //g" \
101 -e "s/tst-cancelx4 //g" \
102 -e "s/tst-cancelx5 //g" \
103 -e "s/tst-cancelx10 //g" \
104 -e "s/tst-cancelx18 //g" \
105 -e "s/tst-signal1 //g"
106
107 # These are known to fail on x86:
108 sed -i rt/Makefile \
109 -e "s/tst-cpuclock1 //g" \
110 -e "s/tst-cpuclock2 //g"
111
112 sed -i elf/Makefile \
113 -e "s/tst-tls1 //g" \
114 -e "s/tst-tls1-static //g" \
115 -e "s/tst-tls2 //g" \
116 -e "s/tst-tls2-static //g" \
117 -e "s/tst-tls3 //g" \
118 -e "s/resolvfail //g" \
119 -e "s/constload1 //g" \
120 -e "s/order //g" \
121 -e "s/lateglobal //g" \
122 -e "s/dblload //g" \
123 -e "s/dblunload //g" \
124 -e "s/reldep6 //g" \
125 -e "s/circleload1 //g" \
126 -e "s/tst-global1 //g" \
127 -e "s/tst-audit2 //g" \
128 -e "s/check-localplt //g" \
129 -e "s/check-localplt.out$$//g"
130
131 sed -i signal/Makefile \
132 -e "s/tst-sigset2//g"
133 end
134
135 build
136 mkdir %{DIR_SRC}/glibc-build
137 cd %{DIR_SRC}/glibc-build
138
139 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
140 ../%{thisapp}/configure \
141 --build=%{DISTRO_BUILDTARGET} \
142 --host=%{DISTRO_BUILDTARGET} \
166a6c21
MT
143 --prefix=/usr \
144 --libexecdir=/usr/lib/glibc \
145 --disable-profile \
146 --enable-add-ons \
802ea3af 147 --enable-kernel=%{OPTIMIZED_KERNEL} \
2777fcb0 148 --with-selinux \
166a6c21
MT
149 --disable-werror \
150 --enable-bind-now \
70b63715
MT
151 --enable-__thread \
152 --enable-tls \
153 --enable-experimental-malloc \
154 --with-gd \
155 --with-nss-crypt
156
802ea3af
MT
157 sed -i config.make \
158 -e "s/^build-pic-default=.*/build-pic-default=yes/"
159
160 # Our GCC is already passing -fPIC, and that's all we want for the libraries.
161 # LDFLAGS.so is appended to so we don't build shared libraries with
162 # DT_TEXTREL (and to tell us if something goes wrong). For now we only build
163 # the libraries, not the programs:
164 echo "build-programs=no" >> configparms
165
166 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
167 CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
168 CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
169
170 # Then build the programs with hardening, so everything possible in
171 # is hardened:
172 echo "# Nothing in here :D" > configparms
173 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
174 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
175 end
176
177 #test
178 # cd $(DIR_SRC)/glibc-build
179 # make check TIMEOUTFACTOR=16 \
180 # CFLAGS="%{CFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE" \
181 # CXXFLAGS="%{CXXFLAGS} -fno-stack-protector -U_FORTIFY_SOURCE"
182 #end
183
184 install
185 cd %{DIR_SRC}/glibc-build
186 make install install_root=%{BUILDROOT}
187
188 # Locales
189 mkdir -pv %{BUILDROOT}/usr/lib/locale
190 # This would install all locales that are supported
191 make localedata/install-locales install_root=%{BUILDROOT}
192
193 # Timezone
194 cp -v --remove-destination %{BUILDROOT}/usr/share/zoneinfo/GMT \
195 %{BUILDROOT}/etc/localtime
196
197 # Configuration
198 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
199 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
200 install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
201
202 # Remove unused binaries
203 rm -vf %{BUILDROOT}/sbin/sln \
204 %{BUILDROOT}/usr/bin/rpcinfo
205
206 # Don't distribute linker cache
207 rm -vf %{BUILDROOT}/etc/ld.so.cache
208
209 # Include /usr/lib/gconv/gconv-modules.cache
210 > %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
211 chmod 644 %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
212
213 strip -g %{BUILDROOT}/usr/lib/*.o
214
215 # Move some libs to correct place
216 mv -v %{BUILDROOT}/lib/lib{memusage,pcprofile}.so %{BUILDROOT}/usr/lib/
217 end
218end
219
220packages
221 package glibc
222 requires = glibc-common=%{thisver}
223 end
224
225 package glibc-common
226 # XXX description and summary are missing
227
228 files
229 /usr/bin
230 /usr/sbin
231 /usr/share
232 !/usr/share/zoneinfo
233 end
234 end
235
236 package glibc-devel
237 summary = Object files for development using standard C libraries.
238 description
239 The glibc-devel package contains the object files necessary
240 for developing programs which use the standard C libraries (which are
241 used by nearly all programs). If you are developing programs which
242 will use the standard C libraries, your system needs to have these
243 standard object files available in order to create the
244 executables.
245
246 Install glibc-devel if you are going to develop programs which will
247 use the standard C libraries.
248 end
249 group = Development/Libraries
250
251 requires = glibc-headers=%{thisver}
252
253 files = /usr/lib/*.a /usr/lib/*.o
254 end
255
256 package glibc-headers
257 description
258 The glibc-headers package contains the header files necessary
259 for developing programs which use the standard C libraries (which are
260 used by nearly all programs). If you are developing programs which
261 will use the standard C libraries, your system needs to have these
262 standard header files available in order to create the
263 executables.
264
265 Install glibc-headers if you are going to develop programs which will
266 use the standard C libraries.
267 end
268
269 requires = kernel-headers
270
271 files
272 /usr/include
273 !/usr/include/linuxthreads
274 !/usr/include/gnu/stubs-[32164]*.h
275 end
276 end
277
278 package nscd
279 summary = A Name Service Caching Daemon (nscd).
280 description
281 Nscd caches name service lookups and can dramatically improve
282 performance with NIS+, and may help with DNS as well.
283 end
284 group = System/Daemons
285
286 files
287 /usr/sbin/nscd
288 end
289 end
290
291 package %{name}-utils
292 summary = Development utilities from GNU C library.
293 description
294 The glibc-utils package contains memusage, a memory usage profiler,
295 mtrace, a memory leak tracer and xtrace, a function call tracer
296 which can be helpful during program debugging.
297 end
298 group = Development/Tools
299
300 files
301 /usr/bin/memusage
302 /usr/bin/memusagestat
303 /usr/bin/mtrace
304 /usr/bin/pcprofiledump
305 /usr/bin/xtrace
306 /usr/lib/libmemusage.so
307 /usr/lib/libpcprofile.so
308 end
309 end
310end