]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg/OpensslLib: Exclude unnecessary files in process_files.pl
authorXiaoyu Lu <xiaoyux.lu@intel.com>
Wed, 29 May 2019 18:40:31 +0000 (18:40 +0000)
committerJian J Wang <jian.j.wang@intel.com>
Mon, 3 Jun 2019 00:28:00 +0000 (08:28 +0800)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1089

When running process_files.py to configure OpenSSL, we can exclude
some unnecessary files. This can reduce porting time, compiling
time and library size.

Upstream OpenSSL commit 71a5516dcc8a which was as part of
OpenSSL_1_1_1b, Add the STORE module(crypto/store/*).
But UEFI don't use them. So exclude these files.

Functions in crypto/rand/randfile.c OpenSSL and edk2 don't
call them. And it requires more crt runtime support.
So exclude it.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
CryptoPkg/Library/OpensslLib/process_files.pl

index 6c136cca092a836e90bd211f5180f70279eb5d02..e277108f0734f96210b13ee758a76e6e470ca1eb 100755 (executable)
@@ -127,6 +127,12 @@ foreach my $product ((@{$unified_info{libraries}},
         foreach my $s (@{$unified_info{sources}->{$o}}) {\r
             next if ($unified_info{generate}->{$s});\r
             next if $s =~ "crypto/bio/b_print.c";\r
         foreach my $s (@{$unified_info{sources}->{$o}}) {\r
             next if ($unified_info{generate}->{$s});\r
             next if $s =~ "crypto/bio/b_print.c";\r
+\r
+            # No need to add unused files in UEFI.\r
+            # So it can reduce porting time, compile time, library size.\r
+            next if $s =~ "crypto/rand/randfile.c";\r
+            next if $s =~ "crypto/store/";\r
+\r
             if ($product =~ "libssl") {\r
                 push @sslfilelist, '  $(OPENSSL_PATH)/' . $s . "\r\n";\r
                 next;\r
             if ($product =~ "libssl") {\r
                 push @sslfilelist, '  $(OPENSSL_PATH)/' . $s . "\r\n";\r
                 next;\r