mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
-mcpu=native -> -mtune=native
This commit is contained in:
parent
d5566cb08e
commit
0fc788d6af
40
configure
vendored
40
configure
vendored
@ -7069,6 +7069,46 @@ else $as_nop
|
||||
:
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -mtune=native" >&5
|
||||
printf %s "checking whether C compiler accepts -mtune=native... " >&6; }
|
||||
if test ${ax_cv_check_cflags___mtune_native+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
|
||||
ax_check_save_flags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -mtune=native"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <time.h>
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
time_t x; int fodder = 0; if (fodder > -1000 && time(&x)) return (int) x
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"
|
||||
then :
|
||||
ax_cv_check_cflags___mtune_native=yes
|
||||
else $as_nop
|
||||
ax_cv_check_cflags___mtune_native=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
CFLAGS=$ax_check_save_flags
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___mtune_native" >&5
|
||||
printf "%s\n" "$ax_cv_check_cflags___mtune_native" >&6; }
|
||||
if test "x$ax_cv_check_cflags___mtune_native" = xyes
|
||||
then :
|
||||
CFLAGS="$CFLAGS -mtune=native"
|
||||
else $as_nop
|
||||
:
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
@ -202,6 +202,7 @@ AC_ARG_ENABLE(opt,
|
||||
AX_CHECK_COMPILE_FLAG([-ftree-slp-vectorize], [CFLAGS="$CFLAGS -ftree-slp-vectorize"])
|
||||
AX_CHECK_COMPILE_FLAG([-fomit-frame-pointer], [CFLAGS="$CFLAGS -fomit-frame-pointer"])
|
||||
AX_CHECK_COMPILE_FLAG([-march=native], [CFLAGS="$CFLAGS -march=native"])
|
||||
AX_CHECK_COMPILE_FLAG([-mtune=native], [CFLAGS="$CFLAGS -mtune=native"])
|
||||
])
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user