1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
|
build-tree := build-tree
stamp := $(CURDIR)/stamp-dir/
DUMMY := $(shell mkdir -p $(stamp))
export SHELL = /bin/bash -e
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_ENDIAN)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
GLIBC_VERSION = $(shell echo $(DEB_VERSION) | sed -e 's/.*://' -e 's/[+-].*//')
SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
shlib_dep_ver = $(GLIBC_VERSION)
shlib_dep = $(libc) (>= $(shlib_dep_ver))
DEB_BUILDDIR ?= $(build-tree)/$(DEB_HOST_ARCH)-$(curpass)
DEB_BUILDDIRLIBC ?= $(build-tree)/$(DEB_HOST_ARCH)-libc
GLIBC_SOURCES = $(addprefix $(shell basename $(CURDIR))/, \
$(filter-out debian $(shell basename $(stamp)) $(build-tree), $(wildcard *)))
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
define unsetenv
unexport $(1)
$(1) =
endef
$(foreach v, CPPFLAGS CFLAGS CXXFLAGS LDFLAGS, $(if $(filter environment,$(origin $(v))),$(eval $(call unsetenv, $(v)))))
GLIBC_PASSES ?= libc
prefix=/usr
bindir=$(prefix)/bin
datadir=$(prefix)/share
complocaledir=$(prefix)/lib/locale
sysconfdir=/etc
libexecdir=$(prefix)/lib
rootsbindir=/sbin
includedir=$(prefix)/include
docdir=$(prefix)/share/doc
mandir=$(prefix)/share/man
sbindir=$(prefix)/sbin
vardbdir=/var/lib/misc
rtlddir=/lib
slibdir=/lib/$(DEB_HOST_MULTIARCH)
libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
mvec = no
BASE_CC = gcc
BASE_CXX = g++
BASE_MIG = mig
DEB_GCC_VERSION ?= -6
RUN_TESTSUITE = yes
CC = $(DEB_HOST_GNU_TYPE)-$(BASE_CC)$(DEB_GCC_VERSION) -no-pie -fno-PIE
CXX = $(DEB_HOST_GNU_TYPE)-$(BASE_CXX)$(DEB_GCC_VERSION) -no-pie -fno-PIE
MIG = $(DEB_HOST_GNU_TYPE)-$(BASE_MIG)
BUILD_CC = $(DEB_BUILD_GNU_TYPE)-$(BASE_CC)
BUILD_CXX = $(DEB_BUILD_GNU_TYPE)-$(BASE_CXX)
BUILD_CFLAGS = -O2 -g
HOST_CFLAGS = -pipe -O2 -g $(call xx,extra_cflags)
configure_target := $(DEB_HOST_GNU_TYPE)
configure_build := $(DEB_BUILD_GNU_TYPE)
log_build = $(build-tree)/log-build-$(call xx,configure_target)-$(curpass)
log_test = $(build-tree)/log-test-$(call xx,configure_target)-$(curpass)
log_results = $(build-tree)/test-results-$(call xx,configure_target)-$(curpass)
log_expected = debian/testsuite-checking/expected-results-$(call xx,configure_target)-$(curpass)
curpass = $(filter-out %_,$(subst _,_ ,$@))
ifeq ($(DEB_STAGE),stage1)
DEB_BUILD_PROFILES+=stage1
else
ifeq ($(DEB_BUILD_PROFILE),bootstrap)
DEB_BUILD_PROFILES+=stage1
endif
endif
ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev
DEB_INDEP_REGULAR_PACKAGES =
DEB_UDEB_PACKAGES =
else
DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-pic libc-bin libc-dev-bin multiarch-support
DEB_INDEP_REGULAR_PACKAGES = glibc-doc glibc-source libc-l10n locales
DEB_UDEB_PACKAGES = $(libc)-udeb
ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
DEB_ARCH_REGULAR_PACKAGES += locales-all
endif
endif
define kernel_check
(if [ $(CURRENT_KERNEL_VERSION) -lt $(1) ]; then \
false; \
fi)
endef
standard-add-ons = libidn,
-include debian/sysdeps/$(DEB_HOST_ARCH_OS).mk
-include debian/sysdeps/$(DEB_HOST_ARCH).mk
ifeq ($(filter nobiarch,$(DEB_BUILD_PROFILES)),)
GLIBC_PASSES += $(GLIBC_MULTILIB_PASSES)
DEB_ARCH_REGULAR_PACKAGES += $(DEB_ARCH_MULTILIB_PACKAGES)
endif
NOSTRIP_$(libc)-dbg = 1
NODEBUG_libc-bin = 1
NODEBUG_libc-dev-bin = 1
NODEBUG_libc0.1-i386 = 1
NODEBUG_libc6-amd64 = 1
NODEBUG_libc6-i386 = 1
NODEBUG_libc6-x32 = 1
NODEBUG_libc6-mips32 =1
NODEBUG_libc6-mips64 = 1
NODEBUG_libc6-mipsn32 = 1
NODEBUG_libc6-powerpc = 1
NODEBUG_libc6-ppc64 = 1
NODEBUG_libc6-s390 = 1
NODEBUG_libc6-sparc64 = 1
NODEBUG_nscd = 1
ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
ifeq ($(threads),yes)
DEB_ARCH_REGULAR_PACKAGES += nscd
endif
endif
include debian/rules.d/*.mk
clean:: unpatch
rm -f $(CURDIR)/po/*.mo
rm -rf $(patsubst %,debian/tmp-%,$(GLIBC_PASSES))
rm -rf $(build-tree)
rm -rf $(stamp)
rm -rf debian/include
rm -f debian/control.in/libc0.1 debian/control.in/libc0.3 \
debian/control.in/libc6 debian/control.in/libc6.1 \
debian/*.preinst.* debian/locales.bug-presubj
build-arch: $(stamp)info \
$(patsubst %,$(stamp)build_%,$(GLIBC_PASSES)) \
$(patsubst %,$(stamp)check_%,$(GLIBC_PASSES))
ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
build-arch: $(stamp)build_C.UTF-8 \
$(stamp)build_locales-all
endif
build-indep: $(stamp)source
build: build-arch build-indep
binary-indep: build-indep testroot debian/control $(build-tree) \
$(patsubst %,$(stamp)binaryinst_%,$(DEB_INDEP_REGULAR_PACKAGES))
binary-arch: build-arch testroot debian/control $(build-tree) \
$(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES)) \
$(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES))
binary: binary-indep binary-arch
testroot:
dh_testroot
|