chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / sysdeps / i386.mk
1 extra_config_options = --enable-multi-arch
2
3 # We use -march=i686 and glibc's i686 routines use cmov, so require it.
4 # A Debian-local glibc patch adds cmov to the search path.
5 # The optimized libraries also use NPTL!
6 EGLIBC_PASSES += i686
7 DEB_ARCH_REGULAR_PACKAGES += libc6-i686
8 i686_add-ons = nptl $(add-ons)
9 i686_configure_target=i686-linux-gnu
10 i686_extra_cflags = -march=i686 -mtune=generic
11 i686_rtlddir = /lib
12 i686_slibdir = /lib/i686/cmov
13 i686_extra_config_options = $(extra_config_options) --disable-profile
14
15 # We use -mno-tls-direct-seg-refs to not wrap-around segments, as it
16 # greatly increase the speed when running under the 32bit Xen hypervisor.
17 EGLIBC_PASSES += xen
18 DEB_ARCH_REGULAR_PACKAGES += libc6-xen
19 xen_add-ons = nptl $(add-ons)
20 xen_configure_target=i686-linux-gnu
21 xen_extra_cflags = -march=i686 -mtune=generic -mno-tls-direct-seg-refs
22 xen_rtlddir = /lib
23 xen_slibdir = /lib/i686/nosegneg
24 xen_extra_config_options = $(extra_config_options) --disable-profile
25
26 define libc6-xen_extra_pkg_install
27 mkdir -p debian/libc6-xen/etc/ld.so.conf.d
28 echo '# This directive teaches ldconfig to search in nosegneg subdirectories' >  debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
29 echo '# and cache the DSOs there with extra bit 1 set in their hwcap match'   >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
30 echo '# fields. In Xen guest kernels, the vDSO tells the dynamic linker to'   >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
31 echo '# search in nosegneg subdirectories and to match this extra hwcap bit'  >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
32 echo '# in the ld.so.cache file.'                                             >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
33 echo 'hwcap 1 nosegneg'                                                       >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
34 endef
35
36 # build 64-bit (amd64) alternative library
37 EGLIBC_PASSES += amd64
38 DEB_ARCH_REGULAR_PACKAGES += libc6-amd64 libc6-dev-amd64
39 libc6-amd64_shlib_dep = libc6-amd64 (>= $(shlib_dep_ver))
40 amd64_add-ons = nptl $(add-ons)
41 amd64_configure_target = x86_64-linux-gnu
42 # __x86_64__ is defined here because Makeconfig uses -undef and the
43 # /usr/include/asm wrappers need that symbol.
44 amd64_CC = $(CC) -m64 -D__x86_64__
45 amd64_CXX = $(CXX) -m64 -D__x86_64__
46 amd64_extra_config_options = $(extra_config_options) --disable-profile
47 amd64_slibdir = /lib64
48 amd64_libdir = /usr/lib64
49
50 define amd64_extra_install
51 cp debian/tmp-amd64/usr/bin/ldd \
52         debian/tmp-libc/usr/bin
53 cp -af debian/tmp-amd64/usr/include/* \
54         debian/tmp-libc/usr/include
55 rm -f debian/tmp-libc/usr/include/gnu/stubs-64.h
56 endef
57
58 define libc6-dev_extra_pkg_install
59 mkdir -p debian/libc6-dev/usr/lib/xen
60 cp -af debian/tmp-xen/usr/lib/*.a \
61         debian/libc6-dev/usr/lib/xen
62 endef
63
64 define libc6-dev-amd64_extra_pkg_install
65 mkdir -p debian/libc6-dev-amd64/usr/include/gnu
66 cp -af debian/tmp-amd64/usr/include/gnu/stubs-64.h \
67         debian/libc6-dev-amd64/usr/include/gnu
68 mkdir -p debian/libc6-dev-amd64/usr/include/x86_64-linux-gnu
69 endef
70