Bug 1359912 - Add -z relro linker flags. r=gps

--HG--
extra : rebase_source : ae42e299d59cc139503c411e663cc81b18ff4177
This commit is contained in:
Mike Hommey 2017-07-26 07:12:59 +09:00
parent a15c6351cb
commit eafa227d8d
2 changed files with 14 additions and 0 deletions

View File

@ -470,6 +470,13 @@ if test "$GNU_CC"; then
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
AC_MSG_CHECKING([for -z relro option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-z,relro"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"

View File

@ -535,6 +535,13 @@ if test "$GNU_CC"; then
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
AC_MSG_CHECKING([for -z relro option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-z,relro"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"