# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
-# TODO tzdata
-
name = glibc
-version = 2.14
-release = 2
+version = 2.16.0
+release = 3
maintainer = Michael Tremer <michael.tremer@ipfire.org>
groups = System/Base
Linux system will not function.
end
+# The version of the ports addon.
+ports_version = 2.16.0
+
source_dl = http://ftp.gnu.org/gnu/glibc/
-sources = %{thisapp}.tar.xz
+sources = %{thisapp}.tar.xz glibc-ports-%{ports_version}.tar.xz
build
# Optimize glibc for kernel
kernel-headers>=%{OPTIMIZED_KERNEL}
libcap-devel
libselinux-devel
+ nss-devel
texinfo
end
# Build glibc with custom cflags
- GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -DPIC
+ GLIBC_FLAGS = -O3 -g -fasynchronous-unwind-tables -DNDEBUG -fPIC -DPIC
if "%{DISTRO_ARCH}" == "i686"
GLIBC_FLAGS += -march=i686 -mtune=generic
- elif "%{DISTRO_ARCH}" == "x86_64"
+ end
+
+ if "%{DISTRO_ARCH}" == "x86_64"
GLIBC_FLAGS += -mtune=generic
end
export QUALITY_AGENT_RPATH_ALLOW_ORIGIN=yes
- prepare_cmds
+ prepare
+ # Extract source tarballs.
+ %{MACRO_EXTRACT_TARBALL}
+
+ # Create link for ports addon.
+ ln -svf ../glibc-ports-%{ports_version} ports
+
+ # Apply the patches.
+ %{MACRO_PATCHES}
+
# In the vi_VN.TCVN locale, bash enters an infinite loop at startup. It is
# unknown whether this is a bash bug or a Glibc problem. Disable
# installation of this locale in order to avoid the problem.
-e "s/tst-sigset2//g"
end
+ configure_options = \
+ --build=%{DISTRO_BUILDTARGET} \
+ --prefix=/usr \
+ --libexecdir=%{libdir}/glibc \
+ --disable-profile \
+ --enable-add-ons \
+ --enable-kernel=%{OPTIMIZED_KERNEL} \
+ --with-selinux \
+ --disable-werror \
+ --enable-bind-now \
+ --enable-nss-crypt
+
+ if "%{DISTRO_ARCH}" == "armv5tel"
+ # Disable hardware FP for ARM.
+ configure_options += \
+ --without-fp
+ end
+
build
- mkdir %{DIR_SRC}/glibc-build
+ mkdir -p %{DIR_SRC}/glibc-build
cd %{DIR_SRC}/glibc-build
CFLAGS="${CFLAGS} -fno-asynchronous-unwind-tables" \
../%{thisapp}/configure \
- --build=%{DISTRO_BUILDTARGET} \
- --host=%{DISTRO_BUILDTARGET} \
- --prefix=/usr \
- --libexecdir=/usr/lib/glibc \
- --disable-profile \
- --enable-add-ons \
- --enable-kernel=%{OPTIMIZED_KERNEL} \
- --with-selinux \
- --disable-werror \
- --enable-bind-now \
- --enable-__thread \
- --enable-tls \
- --enable-experimental-malloc \
- --with-gd \
- --with-nss-crypt
+ %{configure_options}
sed -i config.make \
-e "s/^build-pic-default=.*/build-pic-default=yes/"
# This would install all locales that are supported
make localedata/install-locales install_root=%{BUILDROOT}
- # Timezone
- cp -v --remove-destination %{BUILDROOT}/usr/share/zoneinfo/GMT \
- %{BUILDROOT}/etc/localtime
-
# Configuration
cp -vf %{DIR_SOURCE}/{ld.so.conf,nsswitch.conf} %{BUILDROOT}/etc
mkdir -pv %{BUILDROOT}/etc/{default,ld.so.conf.d}
install -p -m644 %{DIR_APP}/nis/nss %{BUILDROOT}/etc/default/nss
+ if [ "%{DISTRO_ARCH}" = "armv7hl" ]; then
+ ln -svf ld-linux-armhf.so.3 %{BUILDROOT}/lib/ld-linux.so.3
+ fi
+
# Remove unused binaries
rm -vf %{BUILDROOT}/sbin/sln \
%{BUILDROOT}/usr/bin/rpcinfo
rm -vf %{BUILDROOT}/etc/ld.so.cache
# Include /usr/lib/gconv/gconv-modules.cache
- > %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
- chmod 644 %{BUILDROOT}/usr/lib/gconv/gconv-modules.cache
+ > %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
+ chmod 644 %{BUILDROOT}%{libdir}/gconv/gconv-modules.cache
- strip -g %{BUILDROOT}/usr/lib/*.o
+ strip -g %{BUILDROOT}%{libdir}/*.o
# Move some libs to correct place
- mv -v %{BUILDROOT}/lib/lib{memusage,pcprofile}.so %{BUILDROOT}/usr/lib/
+ mv -v %{BUILDROOT}/%{lib}/lib{memusage,pcprofile}.so %{BUILDROOT}%{libdir}
+
+ # Fix library permissions.
+ chmod 755 %{BUILDROOT}%{libdir}/lib*.so*
+ end
+
+ keep_libraries
+ %{libdir}/libc_nonshared.a
+ %{libdir}/libpthread_nonshared.a
end
end
packages
package glibc
- requires = glibc-common=%{thisver}
+ requires = glibc-common = %{thisver}
+
+ if "%{DISTRO_ARCH}" == "armv7hl"
+ provides += ld-linux.so.3
+ provides += ld-linux.so.3(GLIBC_2.4)
+ provides += ld-linux.so.3(GLIBC_PRIVATE)
+ end
end
package glibc-common
# XXX description and summary are missing
+ requires
+ glibc = %{thisver}
+ tzdata
+ end
+
files
/usr/bin
/usr/sbin
/usr/share
+ /usr/lib/locale
!/usr/share/zoneinfo
end
end
end
group = Development/Libraries
- requires = glibc-headers=%{thisver}
+ requires
+ glibc = %{thisver}
+ glibc-headers = %{thisver}
+ end
- files = /usr/lib/*.a /usr/lib/*.o
+ files
+ %{includedir}
+ %{libdir}/*.a
+ %{libdir}/*.o
+ end
end
package glibc-headers
use the standard C libraries.
end
- requires = kernel-headers
+ requires
+ glibc = %{thisver}
+ kernel-headers >= %{OPTIMIZED_KERNEL}
+ end
files
/usr/include
/usr/bin/mtrace
/usr/bin/pcprofiledump
/usr/bin/xtrace
- /usr/lib/libmemusage.so
- /usr/lib/libpcprofile.so
+ %{libdir}/libmemusage.so
+ %{libdir}/libpcprofile.so
end
end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
end