]>
git.ipfire.org Git - thirdparty/openssl.git/blob - Configurations/shared-info.pl
3 # Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
5 # Licensed under the Apache License 2.0 (the "License"). You may not use
6 # this file except in compliance with the License. You can obtain a copy
7 # in the file LICENSE in the source distribution or at
8 # https://www.openssl.org/source/license.html
10 # This is a collection of extra attributes to be used as input for creating
11 # shared libraries, currently on any Unix variant, including Unix like
12 # environments on Windows.
16 `$config{CROSS_COMPILE}$config{CC} -Wl,-V /dev/null 2>&1`;
17 return grep /^GNU ld/, @lines;
21 `$config{CROSS_COMPILE}$config{CC} -v 2>&1`;
22 return grep /gcc/, @lines;
28 shared_ldflag
=> '-shared -Wl,-Bsymbolic',
29 shared_sonameflag
=> '-Wl,-soname=',
31 'linux-shared' => sub {
33 %{$shared_info{'gnu-shared'}},
34 shared_defflag
=> '-Wl,--version-script=',
36 (grep /(?:^|\s)-fsanitize/,
37 @
{$config{CFLAGS
}}, @
{$config{cflags
}})
42 'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },
44 module_ldflags
=> '-bundle',
45 shared_ldflag
=> '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)',
46 shared_sonameflag
=> '-install_name $(libdir)/',
49 shared_ldflag
=> '-shared -Wl,--enable-auto-image-base',
50 shared_impflag
=> '-Wl,--out-implib=',
52 'mingw-shared' => sub {
54 %{$shared_info{'cygwin-shared'}},
55 # def_flag made to empty string so it still generates
58 shared_argfileflag
=> '@',
61 'alpha-osf1-shared' => sub {
62 return $shared_info{'gnu-shared'} if detect_gnu_ld
();
64 module_ldflags
=> '-shared -Wl,-Bsymbolic',
65 shared_ldflag
=> '-shared -Wl,-Bsymbolic -set_version $(SHLIB_VERSION_NUMBER)',
68 'svr3-shared' => sub {
69 return $shared_info{'gnu-shared'} if detect_gnu_ld
();
71 shared_ldflag
=> '-G',
72 shared_sonameflag
=> '-h ',
75 'svr5-shared' => sub {
76 return $shared_info{'gnu-shared'} if detect_gnu_ld
();
78 shared_ldflag
=> detect_gnu_cc
() ?
'-shared' : '-G',
79 shared_sonameflag
=> '-h ',
82 'solaris-gcc-shared' => sub {
83 return $shared_info{'linux-shared'} if detect_gnu_ld
();
85 # Note: we should also have -shared here, but because some
86 # config targets define it with an added -static-libgcc
87 # following it, we don't want to change the order. This
88 # forces all solaris gcc config targets to define shared_ldflag
89 shared_ldflag
=> '-Wl,-Bsymbolic',
90 shared_defflag
=> "-Wl,-M,",
91 shared_sonameflag
=> "-Wl,-h,",