Build cleanup: don't use SHARED_SOURCE with modules

SHARED_SOURCE is reserved for products that are expected to come in
dual shared / non-shared form, i.e. the routine libraries like
libcrypto and libssl, to distinguish source that should only appear in
their shared form.

Modules are always shared, so there's no need for them to have this
type of distinction.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8623)
This commit is contained in:
Richard Levitte 2019-03-31 15:14:00 +02:00
parent 0b45d8eec0
commit 22b414672d
3 changed files with 10 additions and 11 deletions

View file

@ -151,9 +151,9 @@
return "" if $cache{$lib}; return "" if $cache{$lib};
$OUT .= obj2dso(lib => $lib, $OUT .= obj2dso(lib => $lib,
attrs => $unified_info{attributes}->{$lib}, attrs => $unified_info{attributes}->{$lib},
objs => $unified_info{shared_sources}->{$lib}, objs => $unified_info{sources}->{$lib},
deps => [ resolvedepends($lib) ]); deps => [ resolvedepends($lib) ]);
foreach (@{$unified_info{shared_sources}->{$lib}}) { foreach (@{$unified_info{sources}->{$lib}}) {
# If this is somehow a compiled object, take care of it that way # If this is somehow a compiled object, take care of it that way
# Otherwise, it might simply be generated # Otherwise, it might simply be generated
if (defined $unified_info{sources}->{$_}) { if (defined $unified_info{sources}->{$_}) {

View file

@ -2191,9 +2191,8 @@ EOF
src => [ 'sources', src => [ 'sources',
'shared_sources' ], 'shared_sources' ],
dst => 'shared_sources' } }, dst => 'shared_sources' } },
modules => { dso => { src => [ 'sources', modules => { dso => { src => [ 'sources' ],
'shared_sources' ], dst => 'sources' } },
dst => 'shared_sources' } },
scripts => { script => { src => [ 'sources' ], scripts => { script => { src => [ 'sources' ],
dst => 'sources' } } dst => 'sources' } }
} -> {$prodtype}; } -> {$prodtype};

View file

@ -21,7 +21,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[padlock]=../libcrypto DEPEND[padlock]=../libcrypto
INCLUDE[padlock]=../include INCLUDE[padlock]=../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[padlock]=padlock.ld SOURCE[padlock]=padlock.ld
GENERATE[padlock.ld]=../util/engines.num GENERATE[padlock.ld]=../util/engines.num
ENDIF ENDIF
ENDIF ENDIF
@ -31,7 +31,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[capi]=../libcrypto DEPEND[capi]=../libcrypto
INCLUDE[capi]=../include INCLUDE[capi]=../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[capi]=capi.ld SOURCE[capi]=capi.ld
GENERATE[capi.ld]=../util/engines.num GENERATE[capi.ld]=../util/engines.num
ENDIF ENDIF
ENDIF ENDIF
@ -41,7 +41,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[afalg]=../libcrypto DEPEND[afalg]=../libcrypto
INCLUDE[afalg]= ../include INCLUDE[afalg]= ../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[afalg]=afalg.ld SOURCE[afalg]=afalg.ld
GENERATE[afalg.ld]=../util/engines.num GENERATE[afalg.ld]=../util/engines.num
ENDIF ENDIF
ENDIF ENDIF
@ -51,7 +51,7 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[devcrypto]=../libcrypto DEPEND[devcrypto]=../libcrypto
INCLUDE[devcrypto]=../include INCLUDE[devcrypto]=../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[devcrypto]=devcrypto.ld SOURCE[devcrypto]=devcrypto.ld
GENERATE[devcrypto.ld]=../util/engines.num GENERATE[devcrypto.ld]=../util/engines.num
ENDIF ENDIF
ENDIF ENDIF
@ -61,14 +61,14 @@ IF[{- !$disabled{"engine"} -}]
DEPEND[dasync]=../libcrypto DEPEND[dasync]=../libcrypto
INCLUDE[dasync]=../include INCLUDE[dasync]=../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[dasync]=dasync.ld SOURCE[dasync]=dasync.ld
GENERATE[dasync.ld]=../util/engines.num GENERATE[dasync.ld]=../util/engines.num
ENDIF ENDIF
SOURCE[ossltest]=e_ossltest.c SOURCE[ossltest]=e_ossltest.c
DEPEND[ossltest]=../libcrypto DEPEND[ossltest]=../libcrypto
INCLUDE[ossltest]=../include INCLUDE[ossltest]=../include
IF[{- defined $target{shared_defflag} -}] IF[{- defined $target{shared_defflag} -}]
SHARED_SOURCE[ossltest]=ossltest.ld SOURCE[ossltest]=ossltest.ld
GENERATE[ossltest.ld]=../util/engines.num GENERATE[ossltest.ld]=../util/engines.num
ENDIF ENDIF
ENDIF ENDIF