From 5e003c5a64094273dd2a9769792b48f08b0a4ccd Mon Sep 17 00:00:00 2001
From: Georgy Moiseev <georgy.moiseev@corp.mail.ru>
Date: Wed, 13 Oct 2021 18:07:37 +0300
Subject: [PATCH] debian: compile executable with PIE

This patch fixes hardening-no-pie lintian warning. Ubuntu Xenial uses
older versions of gcc which not build ELF binaries with PIE by default,
but since Xenial builds did not trigger this warning, we do not change
the behavior with additional flags.

Part of #5372, closes #6390
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 8def14acca..00b0ae9e45 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,7 +28,7 @@ DEB_DH_SYSTEMD_START_ARGS_tarantool-common  := --no-restart-on-upgrade tarantool
 
 # Needed for proper backtraces in fiber.info()
 DEB_DH_STRIP_ARGS	        := -X/usr/bin/tarantool
-export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector,-pie
+export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector
 DPKG_EXPORT_BUILDFLAGS = 1
 
 include /usr/share/dpkg/buildflags.mk
-- 
GitLab