1 # When changing this, make sure:
2 # - to update debian/debhelper.in/libc.preinst!
3 # - that all builds for a given gnu triplet have the same minimum version (see bug#882255)
4 MIN_KERNEL_SUPPORTED
:= 3.2
7 # Do not build pt_chown on this platform
9 # Expect pldd on this platform
15 ifeq ($(filter stage1 stage2
,$(DEB_BUILD_PROFILES
)),)
16 libc_extra_config_options
= --with-selinux
$(extra_config_options
)
20 ifeq ($(DEB_HOST_GNU_TYPE
),$(DEB_BUILD_GNU_TYPE
))
21 LINUX_HEADERS
:= /usr
/include
23 LINUX_HEADERS
:= /usr
/$(DEB_HOST_GNU_TYPE
)/include
26 LINUX_HEADERS
:= $(LINUX_SOURCE
)/include
29 # Minimum Kernel supported
30 with_headers
= --with-headers
=$(shell pwd
)/debian
/include --enable-kernel
=$(call xx
,MIN_KERNEL_SUPPORTED
)
32 KERNEL_HEADER_DIR
= $(stamp
)mkincludedir
37 # Kernel and library headers
38 for h in arch asm asm-generic libaudit.h linux selinux sys
/capability.h
; do \
39 mkdir
-p debian
/include/$$(dirname
$$h) ; \
40 if
[ -e
"$(LINUX_HEADERS)/$$h" ]; then \
41 ln
-s
$(LINUX_HEADERS
)/$$h debian
/include/$$h ; \
42 elif
[ -e
"/usr/include/$(DEB_HOST_MULTIARCH)/$$h" ]; then \
43 ln
-s
/usr
/include/$(DEB_HOST_MULTIARCH
)/$$h debian
/include/$$h ; \
44 elif
[ -e
"/usr/include/$$h" ]; then \
45 ln
-s
/usr
/include/$$h debian
/include/$$h ; \
49 # To make configure happy if libc6-dev is not installed.
50 touch debian
/include/assert.h
54 # Also to make configure happy.
55 export CPPFLAGS
= -isystem
$(shell pwd
)/debian
/include
57 # This round of ugliness decomposes the Linux kernel version number
58 # into an integer so it can be easily compared and then does so.
59 CURRENT_KERNEL_VERSION
=$(shell uname
-r
)
61 (minimum
=$$((`echo $(1) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
62 current
=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
63 if
[ $$current -lt
$$minimum ]; then \