Skip to content

Commit

Permalink
Add a message to the configure to show whether the glibc being used s…
Browse files Browse the repository at this point in the history
…upports AVX-512 optimisations.

Change-Id: I81aaeaf96ca4e35b1250cf8606f39cda54f69775
Signed-off-by: Steve Linsell <stevenx.linsell@intel.com>
  • Loading branch information
paulturx authored and stevelinsell committed Jun 28, 2017
1 parent 9cb8d16 commit 1586618
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 0 deletions.
1 change: 1 addition & 0 deletions .tools/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_GETCONF = @USE_GETCONF@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
Expand Down
102 changes: 102 additions & 0 deletions .tools/configure
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ with_ICP_SAL_API_DIR
with_ICP_API_DIR
QAT_OPENSSL_102_FALSE
QAT_OPENSSL_102_TRUE
USE_GETCONF
QAE_MEM_FALSE
QAE_MEM_TRUE
QAT_MULTI_THREAD_FALSE
Expand Down Expand Up @@ -11918,6 +11919,107 @@ else
fi


# Extract the first word of "getconf", so it can be a program name with args.
set dummy getconf; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_USE_GETCONF+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$USE_GETCONF"; then
ac_cv_prog_USE_GETCONF="$USE_GETCONF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_USE_GETCONF="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_USE_GETCONF" && ac_cv_prog_USE_GETCONF="no"
fi
fi
USE_GETCONF=$ac_cv_prog_USE_GETCONF
if test -n "$USE_GETCONF"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_GETCONF" >&5
$as_echo "$USE_GETCONF" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


test -n "$AWK" && break
done

if test $AWK == "gawk" -a $USE_GETCONF == "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Getting glibc version ..." >&5
$as_echo "$as_me: Getting glibc version ..." >&6;}
if test `getconf GNU_LIBC_VERSION | gawk '{print $2>=2.23?"1":"0"}' 2>/dev/null` == 1
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported." >&5
$as_echo "$as_me: glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: glibc version is less than 2.23 - no AVX-512 optimisation supported." >&5
$as_echo "$as_me: glibc version is less than 2.23 - no AVX-512 optimisation supported." >&6;}
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Version of glibc could not be obtained automatically. Please check manually by running:-" >&5
$as_echo "$as_me: Version of glibc could not be obtained automatically. Please check manually by running:-" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: 'getconf GNU_LIBC_VERSION' or 'ldd --version'." >&5
$as_echo "$as_me: 'getconf GNU_LIBC_VERSION' or 'ldd --version'." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: If version of glibc returned is greater or equal to 2.23 then glibc AVX-512 optimisation is supported." >&5
$as_echo "$as_me: If version of glibc returned is greater or equal to 2.23 then glibc AVX-512 optimisation is supported." >&6;}
fi

if test "x$enable_qat_for_openssl_102" = "xyes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Build QAT engine against OpenSSL 1.0.2 with only RSA sync offloading" >&5
Expand Down
17 changes: 17 additions & 0 deletions .tools/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,23 @@ AM_CONDITIONAL([QAT_CONTIG_MEM], [test "x$enable_usdm" != "xyes" -a "x$enable_mu
AM_CONDITIONAL([QAT_MULTI_THREAD], [test "x$enable_usdm" != "xyes" -a "x$enable_multi_thread" = "xyes"])
AM_CONDITIONAL([QAE_MEM], [test "x$enable_usdm" = "xyes"])

AC_CHECK_PROG(USE_GETCONF, getconf, yes, no)
AC_PROG_AWK
if test $AWK == "gawk" -a $USE_GETCONF == "yes"
then
AC_MSG_NOTICE([Getting glibc version ...])
if test `getconf GNU_LIBC_VERSION | gawk '{print $2>=2.23?"1":"0"}' 2>/dev/null` == 1
then
AC_MSG_NOTICE([glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported.])
else
AC_MSG_NOTICE([glibc version is less than 2.23 - no AVX-512 optimisation supported.])
fi
else
AC_MSG_NOTICE([Version of glibc could not be obtained automatically. Please check manually by running:-])
AC_MSG_NOTICE(['getconf GNU_LIBC_VERSION' or 'ldd --version'.])
AC_MSG_NOTICE([If version of glibc returned is greater or equal to 2.23 then glibc AVX-512 optimisation is supported.])
fi

if test "x$enable_qat_for_openssl_102" = "xyes"
then
AC_MSG_NOTICE([Build QAT engine against OpenSSL 1.0.2 with only RSA sync offloading])
Expand Down
102 changes: 102 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ with_ICP_SAL_API_DIR
with_ICP_API_DIR
QAT_OPENSSL_102_FALSE
QAT_OPENSSL_102_TRUE
USE_GETCONF
QAE_MEM_FALSE
QAE_MEM_TRUE
QAT_MULTI_THREAD_FALSE
Expand Down Expand Up @@ -11918,6 +11919,107 @@ else
fi


# Extract the first word of "getconf", so it can be a program name with args.
set dummy getconf; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_USE_GETCONF+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$USE_GETCONF"; then
ac_cv_prog_USE_GETCONF="$USE_GETCONF" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_USE_GETCONF="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_USE_GETCONF" && ac_cv_prog_USE_GETCONF="no"
fi
fi
USE_GETCONF=$ac_cv_prog_USE_GETCONF
if test -n "$USE_GETCONF"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_GETCONF" >&5
$as_echo "$USE_GETCONF" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
$as_echo "$AWK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


test -n "$AWK" && break
done

if test $AWK == "gawk" -a $USE_GETCONF == "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Getting glibc version ..." >&5
$as_echo "$as_me: Getting glibc version ..." >&6;}
if test `getconf GNU_LIBC_VERSION | gawk '{print $2>=2.23?"1":"0"}' 2>/dev/null` == 1
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported." >&5
$as_echo "$as_me: glibc version is greater or equal to 2.23 so AVX-512 optimisations are supported." >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: glibc version is less than 2.23 - no AVX-512 optimisation supported." >&5
$as_echo "$as_me: glibc version is less than 2.23 - no AVX-512 optimisation supported." >&6;}
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Version of glibc could not be obtained automatically. Please check manually by running:-" >&5
$as_echo "$as_me: Version of glibc could not be obtained automatically. Please check manually by running:-" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: 'getconf GNU_LIBC_VERSION' or 'ldd --version'." >&5
$as_echo "$as_me: 'getconf GNU_LIBC_VERSION' or 'ldd --version'." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: If version of glibc returned is greater or equal to 2.23 then glibc AVX-512 optimisation is supported." >&5
$as_echo "$as_me: If version of glibc returned is greater or equal to 2.23 then glibc AVX-512 optimisation is supported." >&6;}
fi

if test "x$enable_qat_for_openssl_102" = "xyes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Build QAT engine against OpenSSL 1.0.2 with only RSA sync offloading" >&5
Expand Down

0 comments on commit 1586618

Please sign in to comment.