OSDN Git Service

debian: adjust how we build hardened binaries to avoid blhc complaints
authorTheodore Ts'o <tytso@mit.edu>
Tue, 31 May 2016 05:27:24 +0000 (01:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 31 May 2016 05:54:16 +0000 (01:54 -0400)
Avoid false positives for blhc.  Also, build the object files for the
static library using -fPIE so they can be linked with a shared
executable linked with -pie.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debian/rules

index 072bdfd..b908b1b 100755 (executable)
@@ -150,9 +150,9 @@ endif
 
 E2FSCK_STATIC = ${stdbuilddir}/e2fsck/e2fsck.static
 
-CFLAGS_SHLIB = $(filter-out -fPIE -fpie -pie,$(CFLAGS))
-CFLAGS_STLIB = $(filter-out -fPIE -fpie -pie,$(CFLAGS))
-LDFLAGS_SHLIB = $(filter-out -fPIE -fpie -pie,$(LDFLAGS))
+CFLAGS_SHLIB = $(CFLAGS)
+CFLAGS_STLIB = $(CFLAGS)
+LDFLAGS_SHLIB = $(LDFLAGS)
 LDFLAGS_STATIC = $(filter-out -fPIE -fpie -pie,$(LDFLAGS))
 
 ifneq ($(SKIP_UDEB),)
@@ -365,7 +365,7 @@ ${BUILDSTDSTAMP}: ${CFGSTDSTAMP}
        fi
        $(MAKE) -C ${stdbuilddir} V=1 all
 ifneq ($(BUILD_E2FSCK_STATIC),no)
-       $(MAKE) -C ${stdbuilddir}/e2fsck V=1 e2fsck.static
+       $(MAKE) -C ${stdbuilddir}/e2fsck e2fsck.static
 endif
        if ! test -d debian/orig-gmo ; then \
                mkdir debian/orig-gmo ; \