diff options
author | Richard Levitte <levitte@openssl.org> | 2018-01-08 12:28:08 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-01-08 14:38:29 +0100 |
commit | 47eeaf45b510d056efcd5382550ed73e4d1af377 (patch) | |
tree | eb7114d7c5d857f4d67c495e7c31113247d7e31f /Configurations/00-base-templates.conf | |
parent | f720194cbc174806fe1ce9c349edd249d8076c02 (diff) |
Separate general linking flags from extra libraries
So far, we've placed all extra library related flags together, ending
up in the make variable EX_LIBS. This turns out to be problematic, as
for example, some compilers don't quite agree with something like
this:
cc -o foo foo.o -L/whatever -lsomething
They prefer this:
cc -L/whatever -o foo foo.o -lsomething
IBM's compiler on OS/390 is such a compiler that we know of, and we
have previously handled that as a previous case.
The answer here is to make a more general solution, where linking
options are divided in two parts, where one ends up in LDFLAGS and
the other in EX_LIBS (they corresponds to what is called LDFLAGS and
LDLIBS in the GNU world)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5033)
Diffstat (limited to 'Configurations/00-base-templates.conf')
-rw-r--r-- | Configurations/00-base-templates.conf | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Configurations/00-base-templates.conf b/Configurations/00-base-templates.conf index ce59fbf296..f1539929ef 100644 --- a/Configurations/00-base-templates.conf +++ b/Configurations/00-base-templates.conf @@ -59,18 +59,12 @@ my %targets=( inherit_from => [ "BASE_common" ], template => 1, + lflags => + sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () }, ex_libs => - sub { - unless ($disabled{zlib}) { - if (defined($disabled{"zlib-dynamic"})) { - if (defined($withargs{zlib_lib})) { - return "-L".$withargs{zlib_lib}." -lz"; - } else { - return "-lz"; - } - } - } - return (); }, + sub { !defined($disabled{zlib}) + && defined($disabled{"zlib-dynamic"}) + ? "-lz" : () }, build_scheme => [ "unified", "unix" ], build_file => "Makefile", |