1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[misc] enable ASLR for MinGW builds

* ASLR is enabled by default for Visual Studio builds but that isn't the case
  for MinGW builds. Fix that and also add -Wformat-security while we're at it.
* Closes #1518
* Also ensure that we'll never write protective MBR message for non-bootable
  GPT drives, even as we are not calling WriteSBR() for those anyway.
This commit is contained in:
Pete Batard 2020-04-23 16:48:37 +01:00
parent 0085c4a464
commit 44a8e08bc6
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
5 changed files with 13 additions and 11 deletions

5
configure vendored
View file

@ -3815,7 +3815,8 @@ $as_echo "#define _GNU_SOURCE /**/" >>confdefs.h
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x601 -D_WIN32_WINNT=0x601 -D_WIN32_IE=0x800"
# "-Wl,--nxcompat" to enable DEP (Data Execution Prevention)
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat -Wl,--no-insert-timestamp"
# "-Wl,--dynamicbase" to enable ASLR (Address Space Layout Randomization)
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined -Wl,--nxcompat -Wl,--no-insert-timestamp -Wl,--dynamicbase"
# Debug symbols
# Check whether --enable-debug was given.
@ -3894,7 +3895,7 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="${saved_CFLAGS}"
AM_CFLAGS="$AM_CFLAGS -DUNICODE -D_UNICODE -UNDEBUG -DCOBJMACROS -std=gnu99 -Wshadow -Wall -Wundef -Wunused -Wstrict-prototypes -Wno-restrict -Werror-implicit-function-declaration $nopointersign_cflags"
AM_CFLAGS="$AM_CFLAGS -DUNICODE -D_UNICODE -UNDEBUG -DCOBJMACROS -std=gnu99 -Wshadow -Wall -Wformat-security -Wundef -Wunused -Wstrict-prototypes -Wno-restrict -Werror-implicit-function-declaration $nopointersign_cflags"