]> git.ipfire.org Git - ipfire-3.x.git/blame - glibc/glibc.nm
glibc: Drop some patches
[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
80b7ed53 7version = 2.26
6f6c9c65 8release = 3
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
26source_dl = http://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
4eec3d94 36 binutils >= 2.27
80b7ed53 37 gcc >= 4.9
eec2ad4c 38 gettext
3994dee1 39 kernel-headers >= %{OPTIMIZED_KERNEL}
802ea3af 40 libcap-devel
ee62c3f9 41 libstdc++-static
7f98fc96 42 texinfo
802ea3af
MT
43 end
44
45 # Build glibc with custom cflags
4eec3d94 46 GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG
802ea3af
MT
47
48 if "%{DISTRO_ARCH}" == "i686"
49 GLIBC_FLAGS += -march=i686 -mtune=generic
706fb4da
MT
50 end
51
52 if "%{DISTRO_ARCH}" == "x86_64"
802ea3af
MT
53 GLIBC_FLAGS += -mtune=generic
54 end
55
56 export CFLAGS = %{GLIBC_FLAGS}
57 export CXXFLAGS = %{GLIBC_FLAGS}
58
802ea3af
MT
59 export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
60
3994dee1 61 prepare_cmds
802ea3af
MT
62 # In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
63 # unknown whether this is a bash bug or a Glibc problem. Disable
64 # installation of this locale in order to avoid the problem.
65 sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED
66
67 # The ldd shell script contains Bash-specific syntax. Change its default
68 # program interpreter to /bin/bash in case another /bin/sh is installed.
69 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
70
ee62c3f9 71 # We don't install pt_chown(1) on the final system
802ea3af
MT
72 sed -e "/^install.*pt_chown/d" -i login/Makefile
73
74 # Build nscd with -fstack-protector-all, instead of -fstack-protector:
ee62c3f9 75 sed -e "s/fstack-protector/&-strong/" -i nscd/Makefile
802ea3af 76
802ea3af
MT
77 # Use gnu hash style
78 sed -i Makeconfig \
79 -e "s/-Wl,--hash-style=both/-Wl,--hash-style=gnu -Wl,-O1/"
80
3994dee1 81 # http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
389ab7f8 82 sed -e "s/PIC/SHARED/g" -i sysdeps/arm/{set,__long}jmp.S
802ea3af
MT
83 end
84
e4c5e530
MT
85 configure_options = \
86 --build=%{DISTRO_BUILDTARGET} \
e4c5e530 87 --prefix=/usr \
706fb4da 88 --libexecdir=%{libdir}/glibc \
e4c5e530
MT
89 --disable-profile \
90 --enable-add-ons \
91 --enable-kernel=%{OPTIMIZED_KERNEL} \
e4c5e530 92 --disable-werror \
d7d685fc 93 --enable-stack-protector=strong \
eec2ad4c 94 --enable-bind-now \
3994dee1 95 --enable-obsolete-rpc \
b8e1d265
MT
96 --with-bugurl=http://bugtracker.ipfire.org \
97 --enable-lock-elision
e4c5e530
MT
98
99 if "%{DISTRO_ARCH}" == "armv5tel"
100 # Disable hardware FP for ARM.
101 configure_options += \
102 --without-fp
103 end
104
802ea3af 105 build
e4c5e530 106 mkdir -p %{DIR_SRC}/glibc-build
802ea3af
MT
107 cd %{DIR_SRC}/glibc-build
108
109 CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
110 ../%{thisapp}/configure \
e4c5e530 111 %{configure_options}
70b63715 112
802ea3af
MT
113 make PARALLELMFLAGS=%{PARALLELISMFLAGS} \
114 CFLAGS="%{CFLAGS}" CXXFLAGS="%{CXXFLAGS}"
115 end
116
802ea3af
MT
117 install
118 cd %{DIR_SRC}/glibc-build
119 make install install_root=%{BUILDROOT}
120
121 # Locales
122 mkdir -pv %{BUILDROOT}/usr/lib/locale
123 # This would install all locales that are supported
124 make localedata/install-locales install_root=%{BUILDROOT}
125
802ea3af
MT
126 # Configuration
127 cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
128 mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
129 install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
130
08884d73
MT
131 if [ "%{DISTRO_ARCH}" = "armv7hl" ]; then
132 ln -svf ld-linux-armhf.so.3 %{BUILDROOT}/lib/ld-linux.so.3
133 fi
134
802ea3af
MT
135 # Remove unused binaries
136 rm -vf %{BUILDROOT}/sbin/sln \
137 %{BUILDROOT}/usr/bin/rpcinfo
138
139 # Don't distribute linker cache
140 rm -vf %{BUILDROOT}/etc/ld.so.cache
141
142 # Include /usr/lib/gconv/gconv-modules.cache
706fb4da
MT
143 > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
144 chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
802ea3af 145
706fb4da 146 strip -g %{BUILDROOT}%{libdir}/*.o
802ea3af
MT
147
148 # Move some libs to correct place
706fb4da 149 mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
4b31eadd
MT
150
151 # Fix library permissions.
152 chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
e448e014
MT
153
154 # rquota.x and rquota.h are now provided by quota
155 rm -vf %{BUILDROOT}%{includedir}/rpcsvc/rquota.[hx]
802ea3af 156 end
8a3a777f
MT
157
158 keep_libraries
706fb4da 159 %{libdir}/libc_nonshared.a
301beda7 160 %{libdir}/libmvec_nonshared.a
706fb4da 161 %{libdir}/libpthread_nonshared.a
8a3a777f 162 end
802ea3af
MT
163end
164
165packages
166 package glibc
08884d73
MT
167 if "%{DISTRO_ARCH}" == "armv7hl"
168 provides += ld-linux.so.3
169 provides += ld-linux.so.3(GLIBC_2.4)
3bece620 170 provides += ld-linux.so.3(GLIBC_PRIVATE)
08884d73 171 end
ee62c3f9 172
1262a291 173 requires
1262a291
MT
174 tzdata
175 end
b0f38bbb 176
9ec02175
MT
177 conflicts
178 kernel < %{OPTIMIZED_KERNEL}
179 end
180
181 obsoletes
182 glibc-common < %{thisver}
802ea3af
MT
183 end
184 end
185
186 package glibc-devel
9ec02175 187 template DEVEL
802ea3af 188
1262a291
MT
189 requires
190 glibc = %{thisver}
191 glibc-headers = %{thisver}
9ec02175 192 kernel-headers >= %{OPTIMIZED_KERNEL}
1262a291 193 end
802ea3af 194
9ec02175
MT
195 provides
196 glibc-headers = %{thisver}
802ea3af
MT
197 end
198
9ec02175
MT
199 obsoletes
200 glibc-headers < %{thisver}
1262a291 201 end
802ea3af 202
9ec02175 203 files += %{libdir}/*.[ao]
802ea3af
MT
204 end
205
206 package nscd
207 summary = A Name Service Caching Daemon (nscd).
208 description
209 Nscd caches name service lookups and can dramatically improve
210 performance with NIS+, and may help with DNS as well.
211 end
212 group = System/Daemons
213
214 files
215 /usr/sbin/nscd
216 end
217 end
218
219 package %{name}-utils
220 summary = Development utilities from GNU C library.
221 description
222 The glibc-utils package contains memusage, a memory usage profiler,
223 mtrace, a memory leak tracer and xtrace, a function call tracer
224 which can be helpful during program debugging.
225 end
226 group = Development/Tools
227
228 files
229 /usr/bin/memusage
230 /usr/bin/memusagestat
231 /usr/bin/mtrace
232 /usr/bin/pcprofiledump
233 /usr/bin/xtrace
706fb4da
MT
234 %{libdir}/libmemusage.so
235 %{libdir}/libpcprofile.so
802ea3af
MT
236 end
237 end
1f9bc2f0
MT
238
239 package %{name}-debuginfo
240 template DEBUGINFO
241 end
802ea3af 242end