mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-12-22 14:26:08 +00:00
Update Makefile, make fortify work on modern mingw compilers
This commit is contained in:
parent
b9682ac222
commit
3899a719c1
@ -9,21 +9,22 @@ MINGWLIB = /usr/x86_64-w64-mingw32/lib/
|
|||||||
TARGET = goodbyedpi.exe
|
TARGET = goodbyedpi.exe
|
||||||
# Linking SSP does not work for some reason, the executable doesn't start.
|
# Linking SSP does not work for some reason, the executable doesn't start.
|
||||||
#LIBS = -L$(WINDIVERTLIBS) -Wl,-Bstatic -lssp -Wl,-Bdynamic -lWinDivert -lws2_32
|
#LIBS = -L$(WINDIVERTLIBS) -Wl,-Bstatic -lssp -Wl,-Bdynamic -lWinDivert -lws2_32
|
||||||
LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32
|
LIBS = -L$(WINDIVERTLIBS) -lWinDivert -lws2_32 -l:libssp.a
|
||||||
CC = $(CPREFIX)gcc
|
CC = $(CPREFIX)gcc
|
||||||
CCWINDRES = $(CPREFIX)windres
|
CCWINDRES = $(CPREFIX)windres
|
||||||
CFLAGS = -std=c99 -pie -fPIE -pipe -I$(WINDIVERTHEADERS) -L$(WINDIVERTLIBS) \
|
CFLAGS = -std=c99 -pie -fPIE -pipe -I$(WINDIVERTHEADERS) -L$(WINDIVERTLIBS) \
|
||||||
-O2 -D_FORTIFY_SOURCE=2 \
|
-O2 -D_FORTIFY_SOURCE=2 -fstack-protector \
|
||||||
-Wall -Wextra -Wpedantic -Wformat=2 -Wshadow -Wstrict-aliasing=1 -Werror=format-security \
|
-Wall -Wextra -Wpedantic -Wformat=2 -Wshadow -Wstrict-aliasing=1 -Werror=format-security \
|
||||||
-Wfloat-equal -Wcast-align -Wsign-conversion \
|
-Wfloat-equal -Wcast-align -Wsign-conversion \
|
||||||
#-fstack-protector-strong
|
#-fstack-protector-strong
|
||||||
LDFLAGS = -Wl,-O1,-pie,--dynamicbase,--nxcompat,--sort-common,--as-needed \
|
LDFLAGS = -fstack-protector -Wl,-O1,-pie,--dynamicbase,--nxcompat,--sort-common,--as-needed \
|
||||||
-Wl,--image-base,0x140000000 -Wl,--disable-auto-image-base
|
-Wl,--image-base,0x140000000 -Wl,--disable-auto-image-base
|
||||||
|
|
||||||
ifdef BIT64
|
ifdef BIT64
|
||||||
LDFLAGS += -Wl,--high-entropy-va -Wl,--pic-executable,-e,mainCRTStartup
|
LDFLAGS += -Wl,--high-entropy-va -Wl,--pic-executable,-e,mainCRTStartup
|
||||||
else
|
else
|
||||||
LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
|
CFLAGS += -m32
|
||||||
|
LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup -m32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: default all clean
|
.PHONY: default all clean
|
||||||
|
Loading…
Reference in New Issue
Block a user