rebase on newer SUPERCOP, use PIE, some other stuff

This commit is contained in:
cathugger
2022-05-05 13:22:34 +00:00
parent 0819ccd81d
commit f374555fd4
83 changed files with 2062 additions and 1955 deletions

View File

@@ -27,31 +27,18 @@ then
CFLAGS="$oldcflags"
fi
nopie=""
pie=""
oldcflags="$CFLAGS"
CFLAGS="-nopie -Werror"
AC_MSG_CHECKING([whether CC supports -nopie])
CFLAGS="-fPIE -Werror"
AC_MSG_CHECKING([whether CC supports -fPIE])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-nopie"],
[pie="-fPIE"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
if test "x$nopie" = "x"
then
oldcflags="$CFLAGS"
CFLAGS="-no-pie -Werror"
AC_MSG_CHECKING([whether CC supports -no-pie])
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-no-pie"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
fi
MYDEFS=""
MAINLIB=""
@@ -357,7 +344,7 @@ AC_SUBST(CSTD,["$cstd"])
AC_SUBST(ED25519IMPL,["$ed25519impl"])
AC_SUBST(MYDEFS,["$MYDEFS"])
AC_SUBST(MAINLIB,["$MAINLIB"])
AC_SUBST(NOPIE,["$nopie"])
AC_SUBST(PIE,["$pie"])
AC_SUBST(SRCDIR,["$srcdir"])
AC_CONFIG_FILES([GNUmakefile])
AC_OUTPUT