Fix bug in recent configure -z relro check

This commit is contained in:
Andrew Bettison 2014-02-18 13:59:57 +10:30
parent 660180fec8
commit 42200c2bcb

View File

@ -129,17 +129,17 @@ AC_CHECK_LIB(nsl,callrpc,[LDFLAGS="$LDFLAGS -lnsl"])
AC_CHECK_LIB(socket,socket,[LDFLAGS="$LDFLAGS -lsocket"])
AC_CHECK_LIB(dl,dlopen,[LDFLAGS="$LDFLAGS -ldl"])
AC_CACHE_CHECK(for -z relro option,
libc_cv_z_relro, [dnl
AC_CACHE_CHECK(linker -z relro option, libc_cv_z_relro, [dnl
libc_cv_z_relro=no
if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
then
if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
then
libc_cv_z_relro=yes
LDFLAGS="$LDFLAGS -Wl,z,relro"
LDFLAGS="$LDFLAGS -Wl,-z,relro"
fi
fi])
fi
])
dnl Some platforms still seem to lack the basic single precision trig and power related function.
AC_SEARCH_LIBS([sinf], [m], AC_DEFINE([HAVE_SINF], [1], [Define to 1 if you have the sinf() function.]))