X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configurations%2Fshared-info.pl;h=a673c7cada084ae0a16340556109b65980226a56;hp=1a4910077f20baf2098051855130728f1f33d428;hb=7b97581b90822a8c3027686234fb56ea5346db15;hpb=10aafed3ec8719442d0d3516a6a12a45d2a70a2f diff --git a/Configurations/shared-info.pl b/Configurations/shared-info.pl index 1a4910077f..a673c7cada 100644 --- a/Configurations/shared-info.pl +++ b/Configurations/shared-info.pl @@ -2,7 +2,7 @@ # -*- mode: perl; -*- # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -32,6 +32,11 @@ my %shared_info; return { %{$shared_info{'gnu-shared'}}, shared_defflag => '-Wl,--version-script=', + dso_ldflags => + (grep /(?:^|\s)-fsanitize/, + @{$config{CFLAGS}}, @{$config{cflags}}) + ? '' + : '-z defs', }; }, 'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; }, @@ -53,7 +58,7 @@ my %shared_info; 'mingw-shared' => sub { return { %{$shared_info{'cygwin-shared'}}, - # def_flag made to empty string so it still generates + # def_flag made to empty string so it still generates # something shared_defflag => '', }; @@ -79,16 +84,16 @@ my %shared_info; shared_sonameflag => '-h ', }; }, - 'irix-shared' => sub { - return $shared_info{'gnu-shared'} if detect_gnu_ld(); + 'solaris-gcc-shared' => sub { + return $shared_info{'linux-shared'} if detect_gnu_ld(); return { - shared_ldflag => '-shared -Wl,-Bsymbolic', - shared_sonameflag => '-Wl,-soname=', + # Note: we should also have -shared here, but because some + # config targets define it with an added -static-libgcc + # following it, we don't want to change the order. This + # forces all solaris gcc config targets to define shared_ldflag + shared_ldflag => '-Wl,-Bsymbolic', + shared_defflag => "-Wl,-M,", + shared_sonameflag => "-Wl,-h,", }; }, - 'hpux-shared' => { - bin_lflags => '-Wl,+s,+cdp,../:,+cdp,./:', - shared_ldflag => '-Wl,-B,symbolic,+vnocompatwarnings,-z,+s,+cdp,../:,+cdp,./:', - shared_sonameflag => '-Wl,+h,', - }, );