Skip to content

Commit

Permalink
Always enable all hardening
Browse files Browse the repository at this point in the history
Make sure hardened build flags are always used.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 committed Oct 19, 2022
1 parent e832de1 commit ff8155d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
Expand All @@ -18,6 +18,8 @@ include /usr/share/dpkg/default.mk

DOPACKAGES = $(shell dh_listpackages)

CONFIGURE_ARGS = --disable-static

# For Debian jessie, stretch, and buster, and Ubuntu bionic and focal, build
# Python 2 bindings. This is controlled by the build profile being used.
ifneq (,$(filter python-swsscommon,$(DOPACKAGES)))
Expand All @@ -26,9 +28,9 @@ else
CONFIGURE_ARGS += --disable-python2
endif

# main packaging script based on dh7 syntax
# main packaging script
%:
dh $@ --with autoreconf
dh $@

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
Expand Down

0 comments on commit ff8155d

Please sign in to comment.