21,7 → 21,7 |
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
|
CFARGSEXTRA = --with-cdebug |
CFARGSEXTRA := --with-cdebug |
|
ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) |
export CC=$(DEB_HOST_GNU_TYPE)-gcc |
28,21 → 28,19 |
CFARGSEXTRA += --host=$(DEB_HOST_GNU_TYPE) |
endif |
|
ifeq (,$(DEB_BUILD_ARCH)) |
DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH) |
endif |
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
|
CFLAGS_EXTRA = -g |
CPPFLAGS_EXTRA = -DDEBIAN |
|
ifdef SSP |
SSP_FLAGS=-fstack-protector |
endif |
|
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
CFARGSEXTRA += --without-copt |
else |
CFARGSEXTRA += --with-copt |
ifneq (,$(filter $(DEB_HOST_ARCH), i386)) |
CFARGSEXTRA += --without-copt |
export DEB_CFLAGS_MAINT_STRIP := -O2 -O3 |
export DEB_CFLAGS_MAINT_PREPEND := -O1 |
else |
CFARGSEXTRA += --with-copt |
endif |
endif |
|
ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS))) |
51,23 → 49,20 |
CFARGSEXTRA += --without-rtldebug |
endif |
|
CFLAGS_EXTRA += $(SSP_FLAGS) |
# Temporary workaround for hppa linker issues |
ifeq ($(DEB_BUILD_ARCH),hppa) |
CFLAGS_EXTRA += -ffunction-sections |
export DEB_CFLAGS_MAINT_APPEND += -ffunction-sections |
endif |
|
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) |
INSTALL_PROGRAM += -s |
endif |
|
EXTRA_ARGS=--with-security |
|
export DEB_CPPFLAGS_MAINT_APPEND := -DDEBIAN |
|
DO_MACHINE_CODE=no |
ifeq ($(DEB_BUILD_ARCH),i386) |
ifeq ($(DEB_HOST_ARCH),i386) |
DO_MACHINE_CODE=yes |
endif |
ifeq ($(DEB_BUILD_ARCH),powerpc) |
ifeq ($(DEB_HOST_ARCH),powerpc) |
DO_MACHINE_CODE=yes |
endif |
ifeq ($(DEB_BUILD_ARCH),sparc) |
93,9 → 88,17 |
$(error Version mismatch; buildid.txt: $(VERSION), debian/changelog: $(DEBVERSION)) |
endif |
|
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) |
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) |
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) |
|
# --with-lib-path is just to stop configure from adding all the |
# standard library directories with -L as well as -R to LDFLAGS |
CFARGS=$(CFARGSEXTRA) \ |
--with-cflags='$(CFLAGS_EXTRA)' \ |
--with-cppflags='$(CPPFLAGS_EXTRA)' \ |
--with-cflags='`dpkg-buildflags --get CFLAGS`' \ |
--with-cppflags='`dpkg-buildflags --get CPPFLAGS`' \ |
--with-ldflags='`dpkg-buildflags --get LDFLAGS`' \ |
--prefix=/usr \ |
--with-bignums \ |
--with-gmp \ |
--with-poll \ |