Skip to content

Commit

Permalink
Makefile Changes to accommodate latest mkerr.pl in OpenSSL
Browse files Browse the repository at this point in the history
Added a flag --enable_qat_for_openssl_master to compile against
OpenSSL master branch

Change-Id: I3fb9a378a87878af808db9069469746fdc97c796
Signed-off-by: Steve Linsell <stevenx.linsell@intel.com>
  • Loading branch information
Yogaraj-Alamenda authored and stevelinsell committed Jul 6, 2017
1 parent ced0494 commit 17a1808
Show file tree
Hide file tree
Showing 10 changed files with 991 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
/.dir-locals.el

# Top level and qat_contig_mem excludes
e_qat_err.*
*.mod.c
.*.cmd
*.symvers
*.order
e_qat.txt.old
qat_contig_mem_test
.tmp_versions

Expand Down
26 changes: 16 additions & 10 deletions .tools/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ libqat_la_SOURCES = e_qat.c \
${MEM_LIB_SRC}

include_HEADERS = e_qat.h \
qat_fork.h \
qat_events.h \
qat_callback.h \
qat_polling.h \
qat_fork.h \
qat_events.h \
qat_callback.h \
qat_polling.h \
qat_aux.h \
qat_asym_common.h \
qat_parseconf.h \
Expand Down Expand Up @@ -67,10 +67,10 @@ libqat_la_SOURCES = e_qat.c \
${MEM_LIB_SRC}

include_HEADERS = e_qat.h \
qat_fork.h \
qat_events.h \
qat_callback.h \
qat_polling.h \
qat_fork.h \
qat_events.h \
qat_callback.h \
qat_polling.h \
qat_asym_common.h \
qat_ciphers.h \
qat_dh.h \
Expand Down Expand Up @@ -105,12 +105,18 @@ libqat_la_LDFLAGS = $(QAT_SHARED_LIB_DEPS_LD) \

mostlyclean-generic:
-rm -f *.obj lib tags core .pure .nfs* \
*.old *.bak fluff *.so *.sl *.dll e_qat_err*
*.old *.bak fluff *.so *.sl *.dll

-rm -f $(with_openssl_install_dir)/lib/engines-1.1/qat.so

if QAT_OPENSSL_MASTER
MAKE = perl $(with_openssl_dir)/util/mkerr.pl -conf e_qat.ec \
-nostatic -write $(libqat_la_SOURCES) && make
-rebuild -reindex $(libqat_la_SOURCES) && make

else
MAKE = perl $(with_openssl_dir)/util/mkerr.pl -conf e_qat.ec \
-rebuild -reindex -nostatic -write $(libqat_la_SOURCES) && make
endif

install-data-am:
-cp -f $(prefix)/lib/libqat.so \
Expand Down
40 changes: 22 additions & 18 deletions .tools/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ enable_qat_dsa = @enable_qat_dsa@
enable_qat_ecdh = @enable_qat_ecdh@
enable_qat_ecdsa = @enable_qat_ecdsa@
enable_qat_for_openssl_102 = @enable_qat_for_openssl_102@
enable_qat_for_openssl_master = @enable_qat_for_openssl_master@
enable_qat_lenstra_protection = @enable_qat_lenstra_protection@
enable_qat_mem_debug = @enable_qat_mem_debug@
enable_qat_mem_warnings = @enable_qat_mem_warnings@
Expand Down Expand Up @@ -352,21 +353,21 @@ lib_LTLIBRARIES = libqat.la
@QAT_OPENSSL_102_TRUE@ ${MEM_LIB_SRC}

@QAT_OPENSSL_102_FALSE@include_HEADERS = e_qat.h \
@QAT_OPENSSL_102_FALSE@ qat_fork.h \
@QAT_OPENSSL_102_FALSE@ qat_events.h \
@QAT_OPENSSL_102_FALSE@ qat_callback.h \
@QAT_OPENSSL_102_FALSE@ qat_polling.h \
@QAT_OPENSSL_102_FALSE@ qat_asym_common.h \
@QAT_OPENSSL_102_FALSE@ qat_ciphers.h \
@QAT_OPENSSL_102_FALSE@ qat_dh.h \
@QAT_OPENSSL_102_FALSE@ qat_dsa.h \
@QAT_OPENSSL_102_FALSE@ qat_ec.h \
@QAT_OPENSSL_102_FALSE@ qat_parseconf.h \
@QAT_OPENSSL_102_FALSE@ qat_prf.h \
@QAT_OPENSSL_102_FALSE@ qat_utils.h \
@QAT_OPENSSL_102_FALSE@ qat_rsa.h \
@QAT_OPENSSL_102_FALSE@ qat_rsa_crt.h \
@QAT_OPENSSL_102_FALSE@ ${MEM_LIB_HEADER}
@QAT_OPENSSL_102_FALSE@ qat_fork.h \
@QAT_OPENSSL_102_FALSE@ qat_events.h \
@QAT_OPENSSL_102_FALSE@ qat_callback.h \
@QAT_OPENSSL_102_FALSE@ qat_polling.h \
@QAT_OPENSSL_102_FALSE@ qat_asym_common.h \
@QAT_OPENSSL_102_FALSE@ qat_ciphers.h \
@QAT_OPENSSL_102_FALSE@ qat_dh.h \
@QAT_OPENSSL_102_FALSE@ qat_dsa.h \
@QAT_OPENSSL_102_FALSE@ qat_ec.h \
@QAT_OPENSSL_102_FALSE@ qat_parseconf.h \
@QAT_OPENSSL_102_FALSE@ qat_prf.h \
@QAT_OPENSSL_102_FALSE@ qat_utils.h \
@QAT_OPENSSL_102_FALSE@ qat_rsa.h \
@QAT_OPENSSL_102_FALSE@ qat_rsa_crt.h \
@QAT_OPENSSL_102_FALSE@ ${MEM_LIB_HEADER}

@QAT_OPENSSL_102_TRUE@include_HEADERS = e_qat.h \
@QAT_OPENSSL_102_TRUE@ qat_fork.h \
Expand All @@ -390,8 +391,11 @@ libqat_la_LDFLAGS = $(QAT_SHARED_LIB_DEPS_LD) \
$(QAT_SHARED_LIB_DEPS_DRIVER) \
$(QAT_SHARED_LIB_DEPS_QAE_MEM)

MAKE = perl $(with_openssl_dir)/util/mkerr.pl -conf e_qat.ec \
-nostatic -write $(libqat_la_SOURCES) && make
@QAT_OPENSSL_MASTER_FALSE@MAKE = perl $(with_openssl_dir)/util/mkerr.pl -conf e_qat.ec \
@QAT_OPENSSL_MASTER_FALSE@ -rebuild -reindex -nostatic -write $(libqat_la_SOURCES) && make

@QAT_OPENSSL_MASTER_TRUE@MAKE = perl $(with_openssl_dir)/util/mkerr.pl -conf e_qat.ec \
@QAT_OPENSSL_MASTER_TRUE@ -rebuild -reindex $(libqat_la_SOURCES) && make

all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
Expand Down Expand Up @@ -886,7 +890,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES

mostlyclean-generic:
-rm -f *.obj lib tags core .pure .nfs* \
*.old *.bak fluff *.so *.sl *.dll e_qat_err*
*.old *.bak fluff *.so *.sl *.dll

-rm -f $(with_openssl_install_dir)/lib/engines-1.1/qat.so

Expand Down
31 changes: 31 additions & 0 deletions .tools/configure
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ includes_driver
with_ICP_LAC_API_DIR
with_ICP_SAL_API_DIR
with_ICP_API_DIR
QAT_OPENSSL_MASTER_FALSE
QAT_OPENSSL_MASTER_TRUE
QAT_OPENSSL_102_FALSE
QAT_OPENSSL_102_TRUE
USE_GETCONF
Expand All @@ -649,6 +651,7 @@ cflags_enable_upstream_driver
cflags_cc_opt
cflags
includes
enable_qat_for_openssl_master
enable_qat_for_openssl_102
enable_qat_lenstra_protection
enable_qat_mux
Expand Down Expand Up @@ -817,6 +820,7 @@ enable_multi_thread
enable_qat_mux
enable_qat_lenstra_protection
enable_qat_for_openssl_102
enable_qat_for_openssl_master
with_includes
with_cflags
with_cflags_cc_opt
Expand Down Expand Up @@ -1511,6 +1515,9 @@ Optional Features:
--enable-qat_for_openssl_102
Enable building QAT engine against OpenSSL 1.0.2
with only RSA sync offloading
--enable-qat_for_openssl_master
Enable building QAT engine against OpenSSL master
branch

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
Expand Down Expand Up @@ -11602,6 +11609,12 @@ fi



# Check whether --enable-qat_for_openssl_master was given.
if test "${enable_qat_for_openssl_master+set}" = set; then :
enableval=$enable_qat_for_openssl_master;
fi



# ERROR message if mandatory options are not provided

Expand Down Expand Up @@ -12039,6 +12052,20 @@ else
fi


if test "x$enable_qat_for_openssl_master" = "xyes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Build QAT engine against OpenSSL master" >&5
$as_echo "$as_me: Build QAT engine against OpenSSL master" >&6;}
fi
if test "x$enable_qat_for_openssl_master" = "xyes"; then
QAT_OPENSSL_MASTER_TRUE=
QAT_OPENSSL_MASTER_FALSE='#'
else
QAT_OPENSSL_MASTER_TRUE='#'
QAT_OPENSSL_MASTER_FALSE=
fi


# Adding driver source for building and linking the library


Expand Down Expand Up @@ -16597,6 +16624,10 @@ if test -z "${QAT_OPENSSL_102_TRUE}" && test -z "${QAT_OPENSSL_102_FALSE}"; then
as_fn_error $? "conditional \"QAT_OPENSSL_102\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${QAT_OPENSSL_MASTER_TRUE}" && test -z "${QAT_OPENSSL_MASTER_FALSE}"; then
as_fn_error $? "conditional \"QAT_OPENSSL_MASTER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
10 changes: 10 additions & 0 deletions .tools/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ AC_ARG_ENABLE(qat_for_openssl_102,
[Enable building QAT engine against OpenSSL 1.0.2 with only RSA sync offloading]))
AC_SUBST(enable_qat_for_openssl_102)

AC_ARG_ENABLE(qat_for_openssl_master,
AS_HELP_STRING([--enable-qat_for_openssl_master],
[Enable building QAT engine against OpenSSL master branch]))
AC_SUBST(enable_qat_for_openssl_master)

# ERROR message if mandatory options are not provided

Expand Down Expand Up @@ -394,6 +398,12 @@ fi

AM_CONDITIONAL([QAT_OPENSSL_102], [test "x$enable_qat_for_openssl_102" = "xyes"])

if test "x$enable_qat_for_openssl_master" = "xyes"
then
AC_MSG_NOTICE([Build QAT engine against OpenSSL master])
fi
AM_CONDITIONAL([QAT_OPENSSL_MASTER], [test "x$enable_qat_for_openssl_master" = "xyes"])

# Adding driver source for building and linking the library

AC_ARG_WITH(ICP_API_DIR, AS_HELP_STRING(), ,with_ICP_API_DIR="\$(with_qat_dir)/quickassist/include")
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,9 @@ Optional
Currently if using this build option, only synchronous RSA offload is
supported.
--enable-qat_for_openssl_master
Enable the Intel&reg; QAT OpenSSL\* Engine to build against OpenSSL\* master.
--with-cc-opt="parameters"
Sets additional parameters that will be added to the CFLAGS variable at
compile time.
Expand Down
31 changes: 31 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ includes_driver
with_ICP_LAC_API_DIR
with_ICP_SAL_API_DIR
with_ICP_API_DIR
QAT_OPENSSL_MASTER_FALSE
QAT_OPENSSL_MASTER_TRUE
QAT_OPENSSL_102_FALSE
QAT_OPENSSL_102_TRUE
USE_GETCONF
Expand All @@ -649,6 +651,7 @@ cflags_enable_upstream_driver
cflags_cc_opt
cflags
includes
enable_qat_for_openssl_master
enable_qat_for_openssl_102
enable_qat_lenstra_protection
enable_qat_mux
Expand Down Expand Up @@ -817,6 +820,7 @@ enable_multi_thread
enable_qat_mux
enable_qat_lenstra_protection
enable_qat_for_openssl_102
enable_qat_for_openssl_master
with_includes
with_cflags
with_cflags_cc_opt
Expand Down Expand Up @@ -1511,6 +1515,9 @@ Optional Features:
--enable-qat_for_openssl_102
Enable building QAT engine against OpenSSL 1.0.2
with only RSA sync offloading
--enable-qat_for_openssl_master
Enable building QAT engine against OpenSSL master
branch

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
Expand Down Expand Up @@ -11602,6 +11609,12 @@ fi



# Check whether --enable-qat_for_openssl_master was given.
if test "${enable_qat_for_openssl_master+set}" = set; then :
enableval=$enable_qat_for_openssl_master;
fi



# ERROR message if mandatory options are not provided

Expand Down Expand Up @@ -12039,6 +12052,20 @@ else
fi


if test "x$enable_qat_for_openssl_master" = "xyes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Build QAT engine against OpenSSL master" >&5
$as_echo "$as_me: Build QAT engine against OpenSSL master" >&6;}
fi
if test "x$enable_qat_for_openssl_master" = "xyes"; then
QAT_OPENSSL_MASTER_TRUE=
QAT_OPENSSL_MASTER_FALSE='#'
else
QAT_OPENSSL_MASTER_TRUE='#'
QAT_OPENSSL_MASTER_FALSE=
fi


# Adding driver source for building and linking the library


Expand Down Expand Up @@ -16597,6 +16624,10 @@ if test -z "${QAT_OPENSSL_102_TRUE}" && test -z "${QAT_OPENSSL_102_FALSE}"; then
as_fn_error $? "conditional \"QAT_OPENSSL_102\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${QAT_OPENSSL_MASTER_TRUE}" && test -z "${QAT_OPENSSL_MASTER_FALSE}"; then
as_fn_error $? "conditional \"QAT_OPENSSL_MASTER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
Loading

0 comments on commit 17a1808

Please sign in to comment.