diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-08-30 11:07:11 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-08-30 11:07:11 -0700 |
commit | f78fd6f397e95d5ba388eb86f69b4d4164aba31d (patch) | |
tree | df206a00e646acc99fd69f07bc8f8b8d8337165c | |
parent | a65b53bf06e4fb1988e054041f30cbaecb11cc23 (diff) | |
parent | a4d4403a753a3fa0c3c4c2971d7247f11007455e (diff) |
Merge pull request #1752 from Diapolo/bitcoind_ASLR_DEP
enable ASLR and DEP for bitcoind.exe via linker flags
-rw-r--r-- | src/makefile.linux-mingw | 5 | ||||
-rw-r--r-- | src/makefile.mingw | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 625ed67847..828ddfe588 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -33,6 +33,7 @@ LIBS= \ DEFS=-D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE DEBUGFLAGS=-g CFLAGS=-O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) @@ -93,7 +94,7 @@ obj/%.o: %.cpp $(HEADERS) i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $< bitcoind.exe: $(OBJS:obj/%=obj/%) - i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) + i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) @@ -101,7 +102,7 @@ obj-test/%.o: test/%.cpp $(HEADERS) i586-mingw32msvc-g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $< test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS) + i586-mingw32msvc-g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework-mt-s $(LIBS) clean: diff --git a/src/makefile.mingw b/src/makefile.mingw index 9b3d36f355..5d46797766 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -28,6 +28,7 @@ LIBS= \ DEFS=-DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE DEBUGFLAGS=-g CFLAGS=-mthreads -O2 -w -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter $(DEBUGFLAGS) $(DEFS) $(INCLUDEPATHS) +LDFLAGS=-Wl,--dynamicbase -Wl,--nxcompat TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data) @@ -85,7 +86,7 @@ obj/%.o: %.cpp $(HEADERS) g++ -c $(CFLAGS) -o $@ $< bitcoind.exe: $(OBJS:obj/%=obj/%) - g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) + g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) @@ -93,7 +94,7 @@ obj-test/%.o: test/%.cpp $(HEADERS) g++ -c $(TESTDEFS) $(CFLAGS) -o $@ $< test_bitcoin.exe: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) - g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS) + g++ $(CFLAGS) $(LDFLAGS) -o $@ $(LIBPATHS) $^ -lboost_unit_test_framework $(LIBS) clean: -del /Q bitcoind test_bitcoin |