diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-09 12:39:01 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-09 14:07:59 +0100 |
commit | 58d6be5b5de7c46e0c67438bc11d96e717578386 (patch) | |
tree | f1a28da8c91d969b84f69824ecca29d7bae81d23 | |
parent | 68b8bcf49c84b74e3d5560c50113e879f872d21a (diff) |
Display the library building flags
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5560)
-rw-r--r-- | Configurations/descrip.mms.tmpl | 28 | ||||
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 15 | ||||
-rw-r--r-- | Configurations/windows-makefile.tmpl | 16 | ||||
-rw-r--r-- | crypto/build.info | 2 |
4 files changed, 38 insertions, 23 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index e8780e42d8..1972314ebf 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -221,23 +221,28 @@ CNF_EX_LIBS={- join('', map{ ",$_" } @{$target{ex_libs}}, LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (), @{$config{lib_asflags}}, '$(CNF_ASFLAGS)', '$(ASFLAGS)') -} -LIB_DEFINES={- join('', (map { ",$_" } @{$target{lib_defines}}, +LIB_DEFINES={- our $lib_defines = + join('', (map { ",$_" } @{$target{lib_defines}}, @{$target{shared_defines}}, @{$config{lib_defines}}, - @{$config{shared_defines}}, - 'OPENSSLDIR="""$(OPENSSLDIR_C)"""', + @{$config{shared_defines}}); + join('', $lib_defines, + (map { ",$_" } 'OPENSSLDIR="""$(OPENSSLDIR_C)"""', 'ENGINESDIR="""$(ENGINESDIR_C)"""'), '$(CNF_DEFINES)', '$(DEFINES)') -} -LIB_INCLUDES={- join(',', @{$target{lib_includes}}, +LIB_INCLUDES={- our $lib_includes = + join(',', @{$target{lib_includes}}, @{$target{shared_includes}}, @{$config{lib_includes}}, @{$config{shared_includes}}) -} -LIB_CPPFLAGS={- join('', "'qual_includes'", - '/DEFINE=(__dummy$(LIB_DEFINES))', - $target{lib_cppflags} || (), +LIB_CPPFLAGS={- our $lib_cppflags = + join('', $target{lib_cppflags} || (), $target{shared_cppflags} || (), @{$config{lib_cppflags}}, - @{$config{shared_cppflag}}, + @{$config{shared_cppflag}}); + join('', "'qual_includes'", + '/DEFINE=(__dummy$(LIB_DEFINES))' + $lib_cppflags, '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} LIB_CFLAGS={- join('', $target{lib_cflags} || (), $target{shared_cflag} || (), @@ -325,9 +330,10 @@ NO_INST_BIN_CFLAGS={- join('', $target{no_inst_bin_cflags} PERLASM_SCHEME={- $target{perlasm_scheme} -} # CPPFLAGS_Q is used for one thing only: to build up buildinf.h -CPPFLAGS_Q={- (my $c = $cppflags1.$cppflags2) =~ s|"|""|g; - (my $d = $defines1.$defines2) =~ s|"|""|g; - my $i = join(',', $includes1 || (), $includes2 || ()); +CPPFLAGS_Q={- (my $c = $lib_cppflags.$cppflags2.$cppflags1) =~ s|"|""|g; + (my $d = $lib_defines.$defines2.$defines1) =~ s|"|""|g; + my $i = join(',', $lib_includes || (), $includes2 || (), + $includes1 || ()); my $x = $c; $x .= "/INCLUDE=($i)" if $i; $x .= "/DEFINE=($d)" if $d; diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index fc483f0ff9..8230676a5d 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -254,15 +254,18 @@ CNF_EX_LIBS={- join(' ', $target{ex_libs} || (), # Variables starting with BIN_ are used to build programs and their object # files. -LIB_CPPFLAGS={- join(' ', $target{lib_cppflags} || (), +LIB_CPPFLAGS={- our $lib_cppflags = + join(' ', $target{lib_cppflags} || (), $target{shared_cppflag} || (), (map { '-D'.$_ } @{$config{lib_defines}}, - @{$config{shared_defines}}, + @{$config{shared_defines}}), + @{$config{lib_cppflags}}, + @{$config{shared_cppflag}}); + join(' ', $lib_cppflags, + (map { '-D'.$_ } 'OPENSSLDIR="\"$(OPENSSLDIR)\""', 'ENGINESDIR="\"$(ENGINESDIR)\""'), - @{$config{lib_cppflags}}, - @{$config{shared_cppflag}}, '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} LIB_CFLAGS={- join(' ', $target{lib_cflags} || (), $target{shared_cflag} || (), @@ -316,7 +319,9 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) # CPPFLAGS_Q is used for one thing only: to build up buildinf.h CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; $cppflags2 =~ s|([\\"])|\\$1|g; - join(' ', $cppflags1 || (), $cppflags2 || ()) -} + $lib_cppflags =~ s|([\\"])|\\$1|g; + join(' ', $lib_cppflags || (), $cppflags2 || (), + $cppflags1 || ()) -} PERLASM_SCHEME= {- $target{perlasm_scheme} -} diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index 83f893d6a8..214619ad1c 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -230,22 +230,25 @@ CNF_EX_LIBS={- join(' ', $target{ex_libs} || (), LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (), @{$config{lib_asflags}}, '$(CNF_ASFLAGS)', '$(ASFLAGS)') -} -LIB_CPPFLAGS={- join(' ', $target{lib_cppflags} || (), +LIB_CPPFLAGS={- our $lib_cppflags = + join(' ', $target{lib_cppflags} || (), $target{shared_cppflag} || (), (map { quotify_l("-D".$_) } @{$target{lib_defines}}, @{$target{shared_defines}}, @{$config{lib_defines}}, - @{$config{shared_defines}}, - "OPENSSLDIR=\"$openssldir\"", - "ENGINESDIR=\"$enginesdir\""), + @{$config{shared_defines}}), (map { quotify_l("-I".$_) } @{$target{lib_includes}}, @{$target{shared_includes}}, @{$config{lib_includes}}, @{$config{shared_includes}}), @{$config{lib_cppflags}}, - @{$config{shared_cppflag}}, + @{$config{shared_cppflag}}); + join(' ', $lib_cppflags, + (map { quotify_l("-D".$_) } + "OPENSSLDIR=\"$openssldir\"", + "ENGINESDIR=\"$enginesdir\""), '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} LIB_CFLAGS={- join(' ', $target{lib_cflags} || (), $target{shared_cflag} || (), @@ -294,7 +297,8 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) # CPPFLAGS_Q is used for one thing only: to build up buildinf.h CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; $cppflags2 =~ s|([\\"])|\\$1|g; - join(' ', $cppflags1 || (), $cppflags2 || ()) -} + join(' ', $lib_cppflags || (), $cppflags2 || (), + $cppflags1 || ()) -} PERLASM_SCHEME= {- $target{perlasm_scheme} -} diff --git a/crypto/build.info b/crypto/build.info index c406a11211..368671a5fc 100644 --- a/crypto/build.info +++ b/crypto/build.info @@ -11,7 +11,7 @@ EXTRA= ../ms/uplink-x86.pl ../ms/uplink.c ../ms/applink.c \ ppccpuid.pl pariscid.pl alphacpuid.pl arm64cpuid.pl armv4cpuid.pl DEPEND[cversion.o]=buildinf.h -GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CNF_CFLAGS) $(CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" +GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" DEPEND[buildinf.h]=../configdata.pm GENERATE[uplink-x86.s]=../ms/uplink-x86.pl $(PERLASM_SCHEME) |