diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-04 13:48:59 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-05 12:10:13 +0100 |
commit | 0c8734198d4282f6997965a03cd2e0ceaf207549 (patch) | |
tree | 030d472d2a9db127f11e065332c1add4e1949731 /Configurations/10-main.conf | |
parent | New ordinal files, recreated from scratch (diff) | |
download | openssl-0c8734198d4282f6997965a03cd2e0ceaf207549.tar.xz openssl-0c8734198d4282f6997965a03cd2e0ceaf207549.zip |
No -fno-common for Darwin
When object files with common block symbols are added to static
libraries on Darwin, those symbols are invisible to the linker that
tries to use them. Our solution was to use -fno-common when compiling
C source.
Unfortunately, there is assembler code that defines OPENSSL_ia32cap_P
as a common block symbol, unconditionally, and in some cases, there is
no other definition. -fno-common doesn't help in this case.
However, 'ranlib -c' adds common block symbols to the index of the
static library, which makes them visible to the linker using it, and
that solves the problem we've seen.
The common conclusion is, either use -fno-common or ranlib -c on
Darwin. Since we have common block symbols unconditionally, choosing
the method for our source is easy.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to '')
-rw-r--r-- | Configurations/10-main.conf | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 6fade9811c..576ac45ce7 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1422,8 +1422,9 @@ sub combine { thread_scheme => "pthreads", perlasm_scheme => "osx32", dso_scheme => "dlfcn", + ranlib => "ranlib -c", shared_target => "darwin-shared", - shared_cflag => "-fPIC -fno-common", + shared_cflag => "-fPIC", shared_ldflag => "-dynamiclib", shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", }, |