mirror of https://github.com/openssl/openssl
Configure DEPs for FIPS provider on AIX.
The binder of the AIX linker needs to be told which functions to call on loading and initializing a shared object. Therefore another configuration variable shared_fipsflag is introduced, which is appended to shared_defflag when the providers/fips module gets configured. It was suggested to refactor the line in the build file template to become more generic and less magic. There is, however, currently no suggestion how to actually achive this, so we leave a TODO comment. The possible shared_fipsflag must only be appended to the shared_def iff this code is acting on behalf of the fips provider module build. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11950)
This commit is contained in:
parent
bb361a27ba
commit
9a7319b0b0
|
@ -1164,6 +1164,7 @@ my %targets = (
|
|||
module_ldflags => "-Wl,-G,-bsymbolic,-bnoentry",
|
||||
shared_ldflag => "-Wl,-G,-bsymbolic,-bnoentry",
|
||||
shared_defflag => "-Wl,-bE:",
|
||||
shared_fipsflag => "-Wl,-binitfini:init:cleanup",
|
||||
perl_platform => 'AIX',
|
||||
},
|
||||
"aix-gcc" => {
|
||||
|
|
|
@ -1485,7 +1485,8 @@ EOF
|
|||
@{$args{objs}};
|
||||
my @deps = compute_lib_depends(@{$args{deps}});
|
||||
my $shared_def = join("", map { ' '.$target{shared_defflag}.$_ } @defs);
|
||||
|
||||
# TODO(3.0): next line needs to become "less magic" (see PR #11950)
|
||||
$shared_def .= ' '.$target{shared_fipsflag} if (m/providers\/fips/ && defined $target{shared_fipsflag});
|
||||
my $objs = join(" \\\n\t\t", fill_lines(' ', $COLUMNS - 16, @objs));
|
||||
my $deps = join(" \\\n" . ' ' x (length($dso) + 2),
|
||||
fill_lines(' ', $COLUMNS - length($dso) - 2,
|
||||
|
|
|
@ -92,7 +92,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|||
}
|
||||
return TRUE;
|
||||
}
|
||||
#elif defined(__sun)
|
||||
#elif defined(__sun) || defined(_AIX)
|
||||
|
||||
DEP_DECLARE() /* must be declared before pragma */
|
||||
# define DEP_INIT_ATTRIBUTE
|
||||
|
|
Loading…
Reference in New Issue