mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-09 12:31:57 -04: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:
parent
0085c4a464
commit
44a8e08bc6
5 changed files with 13 additions and 11 deletions
|
@ -19,7 +19,8 @@ AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
|
|||
|
||||
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
|
||||
AC_ARG_ENABLE([debug],
|
||||
|
@ -62,7 +63,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
|
|||
[nopointersign_cflags="-Wno-pointer-sign"], [nopointersign_cflags=""])
|
||||
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"
|
||||
|
||||
AC_SUBST([VISIBILITY_CFLAGS])
|
||||
AC_SUBST([AM_CFLAGS])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue