summaryrefslogtreecommitdiff
path: root/build.info
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-09-30 14:44:59 +0200
committerRichard Levitte <levitte@openssl.org>2018-10-01 09:49:16 +0200
commitef2dfc9902e015de91f015177bdf235c9000839e (patch)
tree61e6c5535dbf8c44096f6322defd2c88fdf4dfbf /build.info
parentb44882a0bd0717e0aab84f5dc3ef81ab673155e9 (diff)
downloadopenssl-new-ef2dfc9902e015de91f015177bdf235c9000839e.tar.gz
Refactor linker script generation
The generation of linker scripts was badly balanced, as all sorts of platform dependent stuff went into the top build.info, when that part should really be made as simply and generic as possible. Therefore, we move a lot of the "magic" to the build files templates, since they are the place for platform dependent things. What remains is to parametrize just enough in the build.info file to generate the linker scripts correctly for each associated library. "linker script" is a term usually reserved for certain Unix linkers. However, we only use them to say what symbols should be exported, so we use the term loosely for all platforms. The internal extension is '.ld', and is changed by the build file templates as appropriate for each target platform. Note that this adds extra meaning to the value of the shared_target attribute. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7333)
Diffstat (limited to 'build.info')
-rw-r--r--build.info47
1 files changed, 4 insertions, 43 deletions
diff --git a/build.info b/build.info
index 3dda4e89bf..16e587e0ad 100644
--- a/build.info
+++ b/build.info
@@ -25,50 +25,11 @@ DEPEND[crypto/include/internal/dso_conf.h]=configdata.pm
GENERATE[crypto/include/internal/dso_conf.h]=crypto/include/internal/dso_conf.h.in
IF[{- defined $target{shared_defflag} -}]
- IF[{- $config{target} =~ /^mingw/ -}]
- GENERATE[libcrypto.def]=util/mkdef.pl crypto 32
- DEPEND[libcrypto.def]=util/libcrypto.num
- GENERATE[libssl.def]=util/mkdef.pl ssl 32
- DEPEND[libssl.def]=util/libssl.num
+ SHARED_SOURCE[libcrypto]=libcrypto.ld
+ SHARED_SOURCE[libssl]=libssl.ld
- SHARED_SOURCE[libcrypto]=libcrypto.def
- SHARED_SOURCE[libssl]=libssl.def
- ELSIF[{- $config{target} =~ /^aix/ -}]
- GENERATE[libcrypto.map]=util/mkdef.pl crypto aix
- DEPEND[libcrypto.map]=util/libcrypto.num
- GENERATE[libssl.map]=util/mkdef.pl ssl aix
- DEPEND[libssl.map]=util/libssl.num
-
- SHARED_SOURCE[libcrypto]=libcrypto.map
- SHARED_SOURCE[libssl]=libssl.map
- ELSE
- GENERATE[libcrypto.map]=util/mkdef.pl crypto linux
- DEPEND[libcrypto.map]=util/libcrypto.num
- GENERATE[libssl.map]=util/mkdef.pl ssl linux
- DEPEND[libssl.map]=util/libssl.num
-
- SHARED_SOURCE[libcrypto]=libcrypto.map
- SHARED_SOURCE[libssl]=libssl.map
- ENDIF
-ENDIF
-# VMS and VC don't have parametrised .def / .symvec generation, so they get
-# special treatment, since we know they do use these files
-IF[{- $config{target} =~ /^VC-/ -}]
- GENERATE[libcrypto.def]=util/mkdef.pl crypto 32
- DEPEND[libcrypto.def]=util/libcrypto.num
- GENERATE[libssl.def]=util/mkdef.pl ssl 32
- DEPEND[libssl.def]=util/libssl.num
-
- SHARED_SOURCE[libcrypto]=libcrypto.def
- SHARED_SOURCE[libssl]=libssl.def
-ELSIF[{- $config{target} =~ /^vms/ -}]
- GENERATE[libcrypto.opt]=util/mkdef.pl crypto "VMS"
- DEPEND[libcrypto.opt]=util/libcrypto.num
- GENERATE[libssl.opt]=util/mkdef.pl ssl "VMS"
- DEPEND[libssl.opt]=util/libssl.num
-
- SHARED_SOURCE[libcrypto]=libcrypto.opt
- SHARED_SOURCE[libssl]=libssl.opt
+ GENERATE[libcrypto.ld]=util/libcrypto.num crypto
+ GENERATE[libssl.ld]=util/libssl.num ssl
ENDIF
IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]