Browse Source
configure: Don't require RELRO and BIND_NOW when cross-compiling
mingw-w64's ld (at least mingw-w64 4.0.4-2) appears to not support -z
pull/128/head
Jack Grigg
6 years ago
No known key found for this signature in database
GPG Key ID: 1B8D649257DB0829
1 changed files with
2 additions and
1 deletions
-
configure.ac
|
|
@ -483,8 +483,9 @@ if test x$use_hardening != xno; then |
|
|
|
HARDENED_CPPFLAGS="$HARDENED_CPPFLAGS -D_FORTIFY_SOURCE=2" |
|
|
|
],[AC_MSG_ERROR(Cannot enable -D_FORTIFY_SOURCE=2)]) |
|
|
|
|
|
|
|
if test x$BUILD_OS = xdarwin; then |
|
|
|
if test x$BUILD_OS = xdarwin || test x$TARGET_OS = xwindows; then |
|
|
|
# Xcode's ld (at least ld64-302.3) doesn't support -z |
|
|
|
# mingw-w64's ld (at least mingw-w64 4.0.4-2) also appears to not support -z |
|
|
|
AX_CHECK_LINK_FLAG([[-Wl,-z,relro]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,relro"],[AC_MSG_WARN(Cannot enable RELRO)]) |
|
|
|
AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"],[AC_MSG_WARN(Cannot enable BIND_NOW)]) |
|
|
|
else |
|
|
|