strace/debian/rules
Eugene Syromyatnikov 3eb199a29d configure: add --disable-mpers and --enable-mpers=check options
On architectures supporting multiple personalities, multiple
personalities support in strace is required for proper decoding of
structures used by tracees with personalities that differ from the
personality of strace.

New configure options control whether multiple personalities support
in strace is mandatory, optional, or disabled.

The default is changed from what is now equivalent of
--enable-mpers=check (automatically detect whether required mpers
support could be enabled) to --enable-mpers (terminate the build
if required mpers support could not be enabled).

* configure.ac (AC_ARG_ENABLE([mpers])): New option.
* m4/mpers.m4 (st_MPERS): Use enable_mpers.  Terminate the build
if mpers could not be enabled and enable_mpers==yes.
* strace.spec.in: Specify --enable-mpers=check to %configure.
* debian/rules (build/Makefile, build64/Makefile): Specify
--enable-mpers=check to configure.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
Suggested-by: DJ Delorie <dj@redhat.com>
2018-01-11 23:09:56 +00:00

96 lines
2.3 KiB
Makefile
Executable File

#! /usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS += -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
arch64_map = i386=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x
ifneq (,$(filter $(DEB_HOST_ARCH)=%, $(arch64_map)))
HOST64 = $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
$(filter $(DEB_HOST_ARCH)=%, $(arch64_map))))-linux-gnu
CC64 = gcc -m64
extra_build_targets += build64-stamp
endif
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE)
else
CONFIG_OPTS = --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
all: build
build: build-arch build-indep
build-arch: build-stamp $(extra_build_targets)
build-indep: build-stamp $(extra_build_targets)
%-stamp: %/Makefile
$(MAKE) -C $*
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
$(MAKE) -C $* check VERBOSE=1
endif
touch $@
build/Makefile:
mkdir -p $(@D)
cd $(@D); sh ../configure --enable-mpers=check --prefix=/usr $(CONFIG_OPTS)
build64/Makefile:
mkdir -p $(@D)
cd $(@D); CC="$(CC64)" sh ../configure --enable-mpers=check --prefix=/usr --build=$(DEB_BUILD_GNU_TYPE) --host=$(HOST64)
clean:
dh_testdir
dh_testroot
rm -rf build build64 strace64.1 debian/strace64.substvars
dh_clean
binary: binary-indep binary-arch
binary-indep:
binary-arch: build
test -f build-stamp || make $(MFLAGS) -f debian/rules build
# prepare 64bit executable and manpage, if it has been built
test -f build64-stamp && ( mv build64/strace build64/strace64 ; \
cp strace.1 strace64.1 ) || true
dh_testdir -a
dh_testroot -a
dh_installdirs -a
dh_installdocs -a
dh_installman -a
dh_installexamples -a
dh_installchangelogs -a
dh_install -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a