[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#644412: dpkg-buildflags: use DEB_BUILD_MAINT_OPTIONS when including buildflags.mk



Package: dpkg
Version: 1.16.1
Severity: normal

Hi,

When using the following Makefile snippet:

DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow
export DEB_BUILD_MAINT_OPTIONS
-include /usr/share/dpkg/buildflags.mk
export CFLAGS LDFLAGS

The variable DEB_BUILD_MAINT_OPTIONS is not used, and the variables
(CFLAGS etc.) does not have the expected value.

A possible solution would be to modify /usr/share/dpkg/buildflags.mk to
use the variables when running the shell command, for ex using something
like:
DEB_BUILD_MAINT_OPTIONS="$(DEB_BUILD_MAINT_OPTIONS)" dpkg-buildflags <args>

This would greatly help for the hardening goal by keeping the inclusion
of the file optional (for backports) and adding options like pie and
bindnow to the hardening flags.

Thanks,
Pierre



Reply to: