diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-08 23:05:13 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-09-11 12:21:57 +0200 |
commit | 0e60ce6334c86d271df5342029639048a635fefa (patch) | |
tree | 61dd75b034c0bebb7dbb5edfc7cf853252b41b34 | |
parent | 5ea4c6e553c1f4feb76f70a896a6a8ac912233c4 (diff) |
Improve robustness and performance of building Unix static libraries
This is a fixup of 385deae79f26dd685339d3141a06d04d6bd753cd, which solved #12116
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12821)
-rw-r--r-- | Configurations/00-base-templates.conf | 4 | ||||
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index 340e789326..1da5c5f0d0 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -27,8 +27,8 @@ my %targets=( build_scheme => [ "unified", "unix" ], build_file => "Makefile", - AR => "ar", - ARFLAGS => "r", + AR => "(unused)", + ARFLAGS => "(unused)", CC => "cc", HASHBANGPERL => "/usr/bin/env perl", RANLIB => sub { which("$config{cross_compile_prefix}ranlib") diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index cb6263c911..ad5c3111e3 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -1510,13 +1510,14 @@ EOF my @objs = map { platform->obj($_) } @{$args{objs}}; my $deps = join(" \\\n" . ' ' x (length($lib) + 2), fill_lines(' ', $COLUMNS - length($lib) - 2, @objs)); - my $max_per_call = 250; + my $max_per_call = 500; my @objs_grouped; push @objs_grouped, join(" ", splice @objs, 0, $max_per_call) while @objs; my $fill_lib = join("\n\t", (map { "\$(AR) \$(ARFLAGS) $lib $_" } @objs_grouped)); return <<"EOF"; $lib: $deps + \$(RM) $lib $fill_lib \$(RANLIB) \$\@ || echo Never mind. EOF |