[pkg-otr-team] [irssi-plugin-otr] 154/167: Add more hardening options to Makefile.mingw

Holger Levsen holger at moszumanska.debian.org
Mon Mar 3 21:55:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to tag 4.0.0
in repository irssi-plugin-otr.

commit 38ccae9b2f5d53261d1eaa4d9dff9825627f0069
Author: Ian Goldberg <iang at cs.uwaterloo.ca>
Date:   Wed Aug 22 17:11:02 2012 -0400

    Add more hardening options to Makefile.mingw
    
    Add -fno-strict-overflow -Wall -Wextra -Wno-unused-parameter
        -Wno-missing-field-initializers -Wformat-security
---
 Makefile.mingw | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile.mingw b/Makefile.mingw
index 864983a..2d40d23 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -59,10 +59,14 @@ TARGET = pidgin-otr.dll
 # The target zipfile
 ZIPFILE = pidgin-otr-$(PIDGIN_OTR_VERSION).zip
 
-CC_HARDENING_OPTIONS ?= -fstack-protector-all -fPIE -Wstack-protector -fwrapv --param ssp-buffer-size=1
+# Compiling with -fPIE and linking with -pie causes the plugin to crash
+# on load, so we'll skip those.
+CC_HARDENING_OPTIONS ?= -fstack-protector-all -Wstack-protector -fwrapv \
+	--param ssp-buffer-size=1 -fno-strict-overflow -Wall -Wextra \
+	-Wno-unused-parameter -Wno-missing-field-initializers -Wformat-security
 # In theory, we'd also like the following:
 # LD_HARDENING_OPTIONS ?= -dynamicbase --nxcompat -pie -z relro -z now
-LD_HARDENING_OPTIONS ?= --dynamicbase --nxcompat -pie
+LD_HARDENING_OPTIONS ?= --dynamicbase --nxcompat
 
 CC = i586-mingw32msvc-gcc
 LDFLAGS = -Wl,--enable-auto-image-base $(LD_HARDENING_OPTIONS)
@@ -76,8 +80,9 @@ override CFLAGS += -g -O2 -Wall $(CC_HARDENING_OPTIONS) \
 	$(PIDGIN_HEADERS) $(PURPLE_HEADERS) \
 	$(GTK_HDRS) -I$(LIBOTRINCDIR) $(FPIC) -DUSING_GTK -DPURPLE_PLUGINS \
 	-DPIDGIN_OTR_VERSION=\"$(PIDGIN_OTR_VERSION)\" \
-	-DPIDGIN_NAME=\"Pidgin\" -I$(LIBINTLINCDIR) -DENABLE_NLS \
+	-I$(LIBINTLINCDIR) -DENABLE_NLS \
 	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
+	#-DPIDGIN_NAME=\"Pidgin\" 
  
 all: $(TARGET)
 	$(MAKE) -C po -f Makefile.mingw

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-otr/packages/irssi-plugin-otr.git



More information about the Pkg-otr-team mailing list