mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Old gcc versions need -flax-vector-conversions to compile some intrinsics
This commit is contained in:
parent
a3a2b74bd8
commit
3f765f1737
20
configure.ac
20
configure.ac
@ -186,6 +186,22 @@ AX_CHECK_COMPILE_FLAG([-fno-strict-overflow], [CFLAGS="$CFLAGS -fno-strict-overf
|
|||||||
AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"])
|
AX_CHECK_COMPILE_FLAG([-fwrapv], [CFLAGS="$CFLAGS -fwrapv"])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AS_IF([test "$GCC" = "yes" ], [
|
||||||
|
AS_CASE([$host_cpu],
|
||||||
|
[i?86|amd64|x86_64], [
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([
|
||||||
|
#if !defined(__clang__) && defined(__GNUC__) && ((__GNUC__ << 8) | __GNUC_MINOR__) < 0x403
|
||||||
|
# error old gcc
|
||||||
|
#endif
|
||||||
|
int main(void) { return 0; }
|
||||||
|
])],,[
|
||||||
|
AX_CHECK_COMPILE_FLAG([-flax-vector-conversions], [CFLAGS="$CFLAGS -flax-vector-conversions"])
|
||||||
|
])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
LIBTOOL_OLD_FLAGS="$LIBTOOL_EXTRA_FLAGS"
|
LIBTOOL_OLD_FLAGS="$LIBTOOL_EXTRA_FLAGS"
|
||||||
LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
|
LIBTOOL_EXTRA_FLAGS="$LIBTOOL_EXTRA_FLAGS -version-info $SODIUM_LIBRARY_VERSION"
|
||||||
AC_ARG_ENABLE(soname-versions,
|
AC_ARG_ENABLE(soname-versions,
|
||||||
@ -405,7 +421,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
|||||||
|
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AS_CASE([$host_cpu],
|
AS_CASE([$host_cpu],
|
||||||
[i*86 | x86_64],
|
[i?86|amd64|x86_64],
|
||||||
[ac_cv_c_bigendian=no]
|
[ac_cv_c_bigendian=no]
|
||||||
)
|
)
|
||||||
AC_C_BIGENDIAN(
|
AC_C_BIGENDIAN(
|
||||||
@ -587,7 +603,7 @@ void f(void *x) { __dummy(x); }
|
|||||||
AC_MSG_CHECKING(if data alignment is required)
|
AC_MSG_CHECKING(if data alignment is required)
|
||||||
aligned_access_required=yes
|
aligned_access_required=yes
|
||||||
AS_CASE([$host_cpu],
|
AS_CASE([$host_cpu],
|
||||||
[i*86 | x86_64 | powerpc* | s390*],
|
[i?86|amd64|x86_64|powerpc*|s390*],
|
||||||
[aligned_access_required=no],
|
[aligned_access_required=no],
|
||||||
[arm*],
|
[arm*],
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
Loading…
Reference in New Issue
Block a user