mirror of
https://github.com/intel/isa-l.git
synced 2025-03-04 07:27:21 +01:00
build: detect availability of -z now, relro and noexecstack linker options
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
This commit is contained in:
parent
71575ae434
commit
75af1c4d4e
23
configure.ac
23
configure.ac
@ -79,6 +79,22 @@ AS_IF([test "x$intel_cet_enabled" = "xyes"], [
|
|||||||
AC_DEFINE(INTEL_CET_ENABLED, [1], [Intel CET enabled.])
|
AC_DEFINE(INTEL_CET_ENABLED, [1], [Intel CET enabled.])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# check if LD -z options are supported
|
||||||
|
LDFLAGS="\
|
||||||
|
-Wl,-z,noexecstack \
|
||||||
|
-Wl,-z,relro \
|
||||||
|
-Wl,-z,now \
|
||||||
|
"
|
||||||
|
AC_MSG_CHECKING([if $LD supports $LDFLAGS])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}]])],
|
||||||
|
[AC_MSG_RESULT([yes])],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
LDFLAGS=""]
|
||||||
|
)
|
||||||
|
|
||||||
# Pick an assembler yasm or nasm
|
# Pick an assembler yasm or nasm
|
||||||
if test x"$AS" = x""; then
|
if test x"$AS" = x""; then
|
||||||
@ -290,13 +306,6 @@ my_CFLAGS="\
|
|||||||
"
|
"
|
||||||
AC_SUBST([my_CFLAGS])
|
AC_SUBST([my_CFLAGS])
|
||||||
|
|
||||||
AM_LDFLAGS="\
|
|
||||||
-Wl,-z,noexecstack \
|
|
||||||
-Wl,-z,relro \
|
|
||||||
-Wl,-z,now \
|
|
||||||
"
|
|
||||||
AC_SUBST([AM_LDFLAGS])
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([\
|
AC_CONFIG_FILES([\
|
||||||
Makefile\
|
Makefile\
|
||||||
libisal.pc
|
libisal.pc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user