forked from wolfSSL/wolfssl
do sanity check that the -Wa,-mbranches-within-32B-boundaries is supported for cases where CC=gcc is really clang
This commit is contained in:
15
configure.ac
15
configure.ac
@@ -178,13 +178,22 @@ DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_WOLFSSL"
|
|||||||
LIB_ADD=
|
LIB_ADD=
|
||||||
LIB_STATIC_ADD=
|
LIB_STATIC_ADD=
|
||||||
|
|
||||||
EXTRA_OPTS_CFLAGS=
|
CAN_USE_32B_BOUNDARIES_FLAG=no
|
||||||
if test "$host_cpu" = "x86_64"
|
AX_CHECK_COMPILE_FLAG([-Wa,-mbranches-within-32B-boundaries],
|
||||||
|
[CAN_USE_32B_BOUNDARIES_FLAG=yes],
|
||||||
|
[CAN_USE_32B_BOUNDARIES_FLAG=no],
|
||||||
|
[-Werror],[])
|
||||||
|
|
||||||
|
if test "$CAN_USE_32B_BOUNDARIES_FLAG" = "yes"
|
||||||
then
|
then
|
||||||
if test "$CC" = "gcc" || test "$CC" = "icc"
|
EXTRA_OPTS_CFLAGS=
|
||||||
|
if test "$host_cpu" = "x86_64"
|
||||||
|
then
|
||||||
|
if test "$GCC" = "yes" || test "$CC" = "icc"
|
||||||
then
|
then
|
||||||
EXTRA_OPTS_CFLAGS="$EXTRA_OPTS_CFLAGS -Wa,-mbranches-within-32B-boundaries -falign-loops=64"
|
EXTRA_OPTS_CFLAGS="$EXTRA_OPTS_CFLAGS -Wa,-mbranches-within-32B-boundaries -falign-loops=64"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS $EXTRA_OPTS_CFLAGS"
|
OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS $EXTRA_OPTS_CFLAGS"
|
||||||
OPTIMIZE_FAST_CFLAGS="$OPTIMIZE_FAST_CFLAGS $EXTRA_OPTS_CFLAGS"
|
OPTIMIZE_FAST_CFLAGS="$OPTIMIZE_FAST_CFLAGS $EXTRA_OPTS_CFLAGS"
|
||||||
|
Reference in New Issue
Block a user