From 2fce15b58b2502a614529707eb45b6e5cac4eb15 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 13 Feb 2019 04:21:59 +0100 Subject: [PATCH] Ensure configured module specific and application specific defines are used Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/8220) --- Configurations/unix-Makefile.tmpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 1e6709f2a7..dfae9afd0e 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -231,8 +231,8 @@ LIB_CPPFLAGS={- our $lib_cppflags = join(' ', $target{lib_cppflags} || (), $target{shared_cppflag} || (), (map { '-D'.$_ } - @{$config{lib_defines}}, - @{$config{shared_defines}}), + @{$config{lib_defines} || ()}, + @{$config{shared_defines} || ()}), @{$config{lib_cppflags}}, @{$config{shared_cppflag}}); join(' ', $lib_cppflags, @@ -256,6 +256,9 @@ LIB_LDFLAGS={- join(' ', $target{shared_ldflag} || (), LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (), $target{module_cppflags} || (), + (map { '-D'.$_ } + @{$config{dso_defines} || ()}, + @{$config{module_defines} || ()}), @{$config{dso_cppflags}}, @{$config{module_cppflags}}, '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} @@ -276,6 +279,7 @@ DSO_LDFLAGS={- join(' ', $target{dso_ldflags} || (), '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (), + (map { '-D'.$_ } @{$config{bin_defines} || ()}), @{$config{bin_cppflags}}, '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} BIN_CFLAGS={- join(' ', $target{bin_cflags} || (), -- 2.25.1