diff options
author | Richard Levitte <levitte@openssl.org> | 2016-09-07 20:56:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-09-07 21:53:45 +0200 |
commit | 342a1a23793cb99921abeabe882adf8652ba715d (patch) | |
tree | c509817857c6056eb515fb30a1ba00989259e329 /Configure | |
parent | 978ecbb08be69864c2a85524eafbdb70487becb0 (diff) | |
download | openssl-342a1a23793cb99921abeabe882adf8652ba715d.tar.gz |
Allow asan, msan and ubsan to be configured with shared libraries
The background story is that util/shlib_wrap.sh was setting LD_PRELOAD
or similar platform dependent variables, just in case the shared
libraries were built with -rpath. Unfortunately, this doesn't work
too well with asan, msan or ubsan.
So, the solution is to forbid the combination of shared libraries,
-rpath and any of the sanity analyzers we can configure.
This changes util/shlib_wrap.sh so it only contains the code that sets
LD_PRELOAD when -rpath has been used when configuring.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -300,7 +300,7 @@ my $default_ranlib; $config{fips}=0; # Top level directories to build -$config{dirs} = [ "crypto", "ssl", "engines", "apps", "test", "tools", "fuzz" ]; +$config{dirs} = [ "crypto", "ssl", "engines", "apps", "test", "util", "tools", "fuzz" ]; # crypto/ subdirectories to build $config{sdirs} = [ "objects", @@ -780,6 +780,13 @@ foreach (@argvcopy) } } +if ($libs =~ /(^|\s)-Wl,-rpath,/ + && !$disabled{shared} + && !($disabled{asan} && $disabled{msan} && $disabled{ubsan})) { + die "***** Cannot simultaneously use -rpath, shared libraries, and\n", + "***** any of asan, msan or ubsan\n"; +} + if ($config{fips}) { delete $disabled{"shared"} if ($disabled{"shared"} =~ /^default/); |