From 331058180aba047ac6b25da781eebc08b7267d2f Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 18 Apr 2017 16:24:23 +0200 Subject: Make it possible to build static-only libraries The trick is to use the .a extension explicitely in the build.info files. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3243) --- Configure | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Configure') diff --git a/Configure b/Configure index 66541be41d..c699ae051b 100755 --- a/Configure +++ b/Configure @@ -1732,12 +1732,24 @@ EOF } # Additionally, we set up sharednames for libraries that don't - # have any, as themselves. - foreach (keys %{$unified_info{libraries}}) { + # have any, as themselves. Only for libraries that aren't + # explicitely static. + foreach (grep !/\.a$/, keys %{$unified_info{libraries}}) { if (!defined $unified_info{sharednames}->{$_}) { $unified_info{sharednames}->{$_} = $_ } } + + # Check that we haven't defined any library as both shared and + # explicitely static. That is forbidden. + my @doubles = (); + foreach (grep /\.a$/, keys %{$unified_info{libraries}}) { + (my $l = $_) =~ s/\.a$//; + push @doubles, $l if defined $unified_info{sharednames}->{$l}; + } + die "these libraries are both explicitely static and shared:\n ", + join(" ", @doubles), "\n" + if @doubles; } foreach (keys %ordinals) { -- cgit v1.2.3