~vcs-imports/reprepro/trunk

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bernhard R. Link
  • Date: 2016-12-21 20:46:25 UTC
  • Revision ID: git-v1:ca076391e7d33f677e67ba8f23bb7e92bb2e9515
enable hardening compiler flags, drop support for ancient dpkg-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
9
9
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10
10
 
11
 
ifneq (,$(shell which dpkg-buildflags))
12
 
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
13
 
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
14
 
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
15
 
else
16
 
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
17
 
        CFLAGS = -O0 -g
18
 
else
19
 
        CFLAGS = -O2 -g
20
 
endif
21
 
CPPFLAGS =
22
 
LDFLAGS =
23
 
endif
 
11
CFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CFLAGS)
 
12
CPPFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get CPPFLAGS)
 
13
LDFLAGS := $(shell DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --get LDFLAGS)
24
14
 
25
 
CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes
 
15
CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wlogical-op -Wshadow
26
16
LDFLAGS += -Wl,-z,defs
27
17
ifneq (,$(filter reprepro-nolibarchive,$(DEB_BUILD_OPTIONS)))
28
18
        ARCHIVEFLAGS= --without-libarchive