From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0042E802B6 for ; Wed, 22 Mar 2017 05:18:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CFB0804F4; Wed, 22 Mar 2017 12:18:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5CFB0804F4 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5CFB0804F4 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-105.phx2.redhat.com [10.3.116.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35C247EFD6; Wed, 22 Mar 2017 12:18:27 +0000 (UTC) To: Qin Long , edk2-devel@lists.01.org References: <20170321155612.1192-1-qin.long@intel.com> <20170321155612.1192-2-qin.long@intel.com> Cc: ard.biesheuvel@linaro.org, ting.ye@intel.com, David Woodhouse , ronald.cron@arm.com, jiaxin.wu@intel.com, glin@suse.com From: Laszlo Ersek Message-ID: Date: Wed, 22 Mar 2017 13:18:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170321155612.1192-2-qin.long@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Mar 2017 12:18:29 +0000 (UTC) Subject: Re: [PATCH v1 1/9] CryptoPkg/OpensslLib: Update INF files to support OpenSSL-1.1.0xx build. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 12:18:29 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/21/17 16:56, Qin Long wrote: > Update OpensslLib INF files to support OpenSSL-1.1.0xx source build. > The file list was generated from the latest OpenSSL-1.1.0e release. > > Main changes to support OpensslLib build in this patch include: > 1. Use "openssl" instead of "openssl-x.x.xx" as main source directory, > Also update include path in CryptoPkg.dec > 2. Enable warnings in GCC builds; > 3. Update Visual Studio build options to silence current possible build > warnings. > 4. Move the default opensslconf.h to Include/openssl, and add one dummy > dso_conf.h for native UEFI build. > > The OpensslLib module build was validated as > build -t VSXXXX -a XX -p CryptoPkg/CryptoPkg.dsc > -m CryptoPkg/Library/OpensslLib/OpensslLib.inf > > (NOTE: The extra build options for ARM/RVCT/XCODE were kept, which expect > further optimizations from community) > > Cc: Ting Ye > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Gary Lin > Cc: Ronald Cron > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: David Woodhouse > Signed-off-by: Qin Long > --- > CryptoPkg/.gitignore | 3 +- > CryptoPkg/CryptoPkg.dec | 8 +- > CryptoPkg/Include/OpenSslSupport.h | 6 + > CryptoPkg/Include/internal/dso_conf.h | 0 > CryptoPkg/Include/openssl/opensslconf.h | 314 ++++++++ > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 866 +++++++++++----------- > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 791 ++++++++++---------- > 7 files changed, 1146 insertions(+), 842 deletions(-) > create mode 100644 CryptoPkg/Include/internal/dso_conf.h > create mode 100644 CryptoPkg/Include/openssl/opensslconf.h When I diff OpensslLibCrypto.inf and OpensslLib.inf and, I get: > --- OpensslLibCrypto.inf 2017-03-22 13:00:16.986301008 +0100 > +++ OpensslLib.inf 2017-03-22 13:00:16.986301008 +0100 > @@ -14,9 +14,9 @@ > > [Defines] > INF_VERSION = 0x00010005 > - BASE_NAME = OpensslLibCrypto > - MODULE_UNI_FILE = OpensslLibCrypto.uni > - FILE_GUID = E29FC209-8B64-4500-BD20-AF4EAE47EA0E > + BASE_NAME = OpensslLib > + MODULE_UNI_FILE = OpensslLib.uni > + FILE_GUID = C873A7D0-9824-409f-9B42-2C158B992E69 > MODULE_TYPE = BASE > VERSION_STRING = 1.0 > LIBRARY_CLASS = OpensslLib These differences are OK. > @@ -476,6 +476,45 @@ > $(OPENSSL_PATH)/crypto/x509v3/v3_tlsf.c > $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c > $(OPENSSL_PATH)/crypto/x509v3/v3err.c > + $(OPENSSL_PATH)/ssl/bio_ssl.c > + $(OPENSSL_PATH)/ssl/d1_lib.c > + $(OPENSSL_PATH)/ssl/d1_msg.c > + $(OPENSSL_PATH)/ssl/d1_srtp.c > + $(OPENSSL_PATH)/ssl/methods.c > + $(OPENSSL_PATH)/ssl/pqueue.c > + $(OPENSSL_PATH)/ssl/record/dtls1_bitmap.c > + $(OPENSSL_PATH)/ssl/record/rec_layer_d1.c > + $(OPENSSL_PATH)/ssl/record/rec_layer_s3.c > + $(OPENSSL_PATH)/ssl/record/ssl3_buffer.c > + $(OPENSSL_PATH)/ssl/record/ssl3_record.c > + $(OPENSSL_PATH)/ssl/s3_cbc.c > + $(OPENSSL_PATH)/ssl/s3_enc.c > + $(OPENSSL_PATH)/ssl/s3_lib.c > + $(OPENSSL_PATH)/ssl/s3_msg.c > + $(OPENSSL_PATH)/ssl/ssl_asn1.c > + $(OPENSSL_PATH)/ssl/ssl_cert.c > + $(OPENSSL_PATH)/ssl/ssl_ciph.c > + $(OPENSSL_PATH)/ssl/ssl_conf.c > + $(OPENSSL_PATH)/ssl/ssl_err.c > + $(OPENSSL_PATH)/ssl/ssl_init.c > + $(OPENSSL_PATH)/ssl/ssl_lib.c > + $(OPENSSL_PATH)/ssl/ssl_mcnf.c > + $(OPENSSL_PATH)/ssl/ssl_rsa.c > + $(OPENSSL_PATH)/ssl/ssl_sess.c > + $(OPENSSL_PATH)/ssl/ssl_stat.c > + $(OPENSSL_PATH)/ssl/ssl_txt.c > + $(OPENSSL_PATH)/ssl/ssl_utst.c > + $(OPENSSL_PATH)/ssl/statem/statem.c > + $(OPENSSL_PATH)/ssl/statem/statem_clnt.c > + $(OPENSSL_PATH)/ssl/statem/statem_dtls.c > + $(OPENSSL_PATH)/ssl/statem/statem_lib.c > + $(OPENSSL_PATH)/ssl/statem/statem_srvr.c > + $(OPENSSL_PATH)/ssl/t1_enc.c > + $(OPENSSL_PATH)/ssl/t1_ext.c > + $(OPENSSL_PATH)/ssl/t1_lib.c > + $(OPENSSL_PATH)/ssl/t1_reneg.c > + $(OPENSSL_PATH)/ssl/t1_trce.c > + $(OPENSSL_PATH)/ssl/tls_srp.c > # Autogenerated files list ends here > > [Packages] Also OK. > @@ -492,23 +531,25 @@ > # > # Disables the following Visual Studio compiler warnings brought by openssl source, > # so we do not break the build with /WX option: > - # C4090: 'function' : different 'const' qualifiers > - # C4244: conversion from type1 to type2, possible loss of data > - # C4245: conversion from type1 to type2, signed/unsigned mismatch > - # C4267: conversion from size_t to type, possible loss of data > - # C4389: 'operator' : signed/unsigned mismatch (xxxx) > - # C4702: unreachable code > - # C4706: assignment within conditional expression > + # C4090: 'function' : different 'const' qualifiers > + # C4244: conversion from type1 to type2, possible loss of data > + # C4245: conversion from type1 to type2, signed/unsigned mismatch > + # C4267: conversion from size_t to type, possible loss of data > + # C4389: 'operator' : signed/unsigned mismatch (xxxx) > + # C4702: unreachable code > + # C4706: assignment within conditional expression Different whitespace. These differences should not exist. > # > MSFT:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 > MSFT:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 > + MSFT:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 The IPF flags are inconsistent between the two INF files. > > - INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > - INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > - INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > + INTEL:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > + INTEL:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w > + INTEL:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) /w The whitespace is not in sync between the two INF files. > > GCC:*_*_IA32_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) > GCC:*_*_X64_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -DNO_MSABI_VA_FUNCS > + GCC:*_*_IPF_CC_FLAGS = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) > GCC:*_*_ARM_CC_FLAGS = $(OPENSSL_FLAGS) > GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) > The IPF flags are inconsistent between the two INF files. Thanks Laszlo