enable hardened build flags
This commit is contained in:
parent
dd8d85e2a8
commit
fba81e5d23
12
rules
12
rules
|
@ -28,13 +28,11 @@ PYDEF := $(shell pyversions -vd)
|
|||
PYVERS := $(shell pyversions -vr debian/control)
|
||||
OTHERPYVERS := $(filter-out $(PYDEF), $(PYVERS))
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
CFLAGS = `dpkg-buildflags --get CFLAGS`
|
||||
CFLAGS += -Wall
|
||||
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
|
||||
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
@ -64,7 +62,7 @@ endif
|
|||
config.status: configure
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS)
|
||||
CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS)
|
||||
|
||||
|
||||
build: build-stamp
|
||||
|
|
Loading…
Reference in New Issue