diff options
author | Richard Levitte <levitte@openssl.org> | 2021-05-17 18:21:45 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-05-19 12:31:34 +0200 |
commit | cfc73c230d1766903314f6b088a8da37fec1e9f0 (patch) | |
tree | 1157c8508b1e18c8cd06c9b89f9d76985125eedc /Configurations/descrip.mms.tmpl | |
parent | 0c1428f4418cbd4d449bd43100017b85db17b17d (diff) |
Thrown away all special descrip.mms variables
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15317)
Diffstat (limited to 'Configurations/descrip.mms.tmpl')
-rw-r--r-- | Configurations/descrip.mms.tmpl | 331 |
1 files changed, 159 insertions, 172 deletions
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 694c9fac07..7d2308dce7 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -66,6 +66,134 @@ && $unified_info{attributes}->{scripts}->{$_}->{misc} } @{$unified_info{scripts}}; + # Configured flags + + our @cnf_asflags = ($target{asflags} || (), @{$config{asflags}}); + our @cnf_defines = (@{$target{defines}}, @{$config{defines}}); + our @cnf_includes = (@{$target{includes}}, @{$config{includes}}); + our @cnf_cppflags = ($target{cppflags} || (), @{$config{cppflags}}); + our @cnf_cflags = ($target{cflags} || (), @{$config{cflags}}); + our @cnf_cxxflags = ($target{cxxflags} || (), @{$config{cxxflags}}); + our @cnf_ldflags = ($target{lflags} || (), @{$config{lflags}}); + our @cnf_ex_libs = (map{ ",$_" } @{$target{ex_libs}}, @{$config{ex_libs}}); + + # Variables starting with $lib_ are used to build library object files + # and shared libraries. + # Variables starting with $dso_ are used to build DSOs and their object files. + # Variables starting with $bin_ are used to build programs and their object + # files. + + # The following array is special and is treated separately from the rest of + # the lib_ variables. + our @lib_cppincludes = (@{$target{lib_includes}}, @{$target{shared_includes}}, + @{$config{lib_includes}}, @{$config{shared_includes}}, + @cnf_includes); + + our $lib_cppdefines = + join(',', @{$target{lib_defines}}, @{$target{shared_defines}}, + @{$config{lib_defines}}, @{$config{shared_defines}}, + @cnf_defines, + 'OPENSSLDIR="""$(OPENSSLDIR_C)"""', + 'ENGINESDIR="""$(ENGINESDIR_C)"""', + 'MODULESDIR="""$(MODULESDIR_C)"""', + #'$(DEFINES)' + ) + . "'extradefines'"; + our $lib_asflags = + join(' ', $target{lib_asflags} || (), @{$config{lib_asflags}}, + @cnf_asflags, '$(ASFLAGS)'); + our $lib_cppflags = + join('', $target{lib_cppflags} || (), $target{shared_cppflags} || (), + @{$config{lib_cppflags}}, @{$config{shared_cppflag}}, + @cnf_cppflags, '/DEFINE=('.$lib_cppdefines.')', '$(CPPFLAGS)'); + my @lib_cflags = ( $target{lib_cflags} // () ); + my @lib_cflags_no_inst = ( $target{no_inst_lib_cflags} // @lib_cflags ); + my @lib_cflags_cont = ( $target{shared_cflag} || (), + @{$config{lib_cflags}}, @{$config{shared_cflag}}, + $cnf_cflags, '$(CFLAGS)'); + our $lib_cflags = join('', @lib_cflags, @lib_cflags_cont ); + our $lib_cflags_no_inst = join('', @lib_cflags_no_inst, @lib_cflags_cont ); + our $lib_ldflags = + join('', $target{lib_lflags} || (), $target{shared_ldflag} || (), + @{$config{lib_lflags}}, @{$config{shared_ldflag}}, + @cnf_ldflags, '$(LDFLAGS)'); + our $lib_ex_libs = join('', @cnf_ex_libs, '$(EX_LIBS)'); + + # The following array is special and is treated separately from the rest of + # the dso_ variables. + our @dso_cppincludes = (@{$target{dso_includes}}, @{$target{module_includes}}, + @{$config{dso_includes}}, @{$config{module_includes}}, + @cnf_includes); + + our $dso_cppdefines = + join(',', @{$target{dso_defines}}, @{$target{module_defines}}, + @{$config{dso_defines}}, @{$config{module_defines}}, + @cnf_defines, + #'$(DEFINES)' + ) + . "'extradefines'"; + our $dso_asflags = + join(' ', $target{dso_asflags} || (), $target{module_asflags} || (), + @{$config{dso_asflags}}, @{$config{module_asflags}}, + @cnf_asflags, '$(ASFLAGS)'); + our $dso_cppflags = + join('', $target{dso_cppflags} || (), $target{module_cppflags} || (), + @{$config{dso_cppflags}}, @{$config{module_cppflag}}, + @cnf_cppflags, + '/DEFINE=('.$dso_cppdefines.')', + '$(CPPFLAGS)'); + my @dso_cflags = ( $target{dso_cflags} // () ); + my @dso_cflags_no_inst = ( $target{no_inst_dso_cflags} // @dso_cflags ); + my @dso_cflags_cont = ( $target{module_cflag} || (), + @{$config{dso_cflags}}, @{$config{module_cflag}}, + $cnf_cflags, '$(CFLAGS)'); + our $dso_cflags = join('', @dso_cflags, @dso_cflags_cont ); + our $dso_cflags_no_inst = join('', @dso_cflags_no_inst, @dso_cflags_cont ); + our $dso_ldflags = + join('', $target{dso_lflags} || (), $target{module_ldflag} || (), + @{$config{dso_lflags}}, @{$config{module_ldflag}}, + @cnf_ldflags, '$(LDFLAGS)'); + our $dso_ex_libs = join('', @cnf_ex_libs, '$(EX_LIBS)'); + + # The following array is special and is treated separately from the rest of + # the bin_ variables. + our @bin_cppincludes = (@{$target{bin_includes}}, + @{$config{bin_includes}}, + @cnf_includes); + + our $bin_cppdefines = + join(',', @{$target{bin_defines}}, + @{$config{bin_defines}}, + @cnf_defines, + #'$(DEFINES)' + ) + . "'extradefines'"; + our $bin_asflags = + join(' ', $target{bin_asflags} || (), + @{$config{bin_asflags}}, + @cnf_asflags, '$(ASFLAGS)'); + our $bin_cppflags = + join('', $target{bin_cppflags} || (), + @{$config{bin_cppflags}}, + @cnf_cppflags, + '/DEFINE=('.$bin_cppdefines.')', + '$(CPPFLAGS)'); + my @bin_cflags = ( $target{bin_cflags} // () ); + my @bin_cflags_no_inst = ( $target{no_inst_bin_cflags} // @bin_cflags ); + my @bin_cflags_cont = ( @{$config{bin_cflags}}, + $cnf_cflags, '$(CFLAGS)'); + our $bin_cflags = join('', @bin_cflags, @bin_cflags_cont ); + our $bin_cflags_no_inst = join('', @bin_cflags_no_inst, @bin_cflags_cont ); + our $bin_cflags = + join('', $target{bin_cflags} || (), + @{$config{bin_cflags}}, + @cnf_cflags, '$(CFLAGS)'); + our $bin_ldflags = + join('', $target{bin_lflags} || (), + @{$config{bin_lflags}}, + @cnf_ldflags, '$(LDFLAGS)'); + our $bin_ex_libs = join('', @cnf_ex_libs, '$(EX_LIBS)'); + # This is a horrible hack, but is needed because recursive inclusion of files # in different directories does not work well with HP C. my $sd = sourcedir("crypto", "async", "arch"); @@ -92,6 +220,7 @@ = qq(deassign statem deassign record); } + # This makes sure things get built in the order they need # to. You're welcome. sub dependmagic { @@ -198,9 +327,9 @@ MODULESDIR_C={- platform->osslprefix() -}MODULES{- $sover_dirname.$target{pointe CC={- $config{CC} -} CPP={- $config{CPP} -} -DEFINES={- our $defines1 = join('', map { ",$_" } @{$config{CPPDEFINES}}) -} -INCLUDES={- our $includes1 = join(',', @{$config{CPPINCLUDES}}) -} -CPPFLAGS={- our $cppflags1 = join('', @{$config{CPPFLAGS}}) -} +DEFINES={- our $defines = join('', map { ",$_" } @{$config{CPPDEFINES}}) -} +INCLUDES={- our $includes = join(',', @{$config{CPPINCLUDES}}) -} +CPPFLAGS={- our $cppflags = join('', @{$config{CPPFLAGS}}) -} CFLAGS={- join('', @{$config{CFLAGS}}) -} LDFLAGS={- join('', @{$config{LFLAGS}}) -} EX_LIBS={- join('', map { ",$_" } @{$config{LDLIBS}}) -} @@ -214,153 +343,12 @@ ASFLAGS={- join(' ', @{$config{ASFLAGS}}) -} ASOUTFLAG={- $target{asoutflag} -}$(OSSL_EMPTY) -##### Project flags ################################################## - -# Variables starting with CNF_ are common variables for all product types - -CNF_ASFLAGS={- join('', $target{asflags} || (), - @{$config{asflags}}) -} -CNF_DEFINES={- our $defines2 = join('', (map { ",$_" } @{$target{defines}}, - @{$config{defines}}), - "'extradefines'") -} -CNF_INCLUDES={- our $includes2 = join(',', @{$target{includes}}, - @{$config{includes}}) -} -CNF_CPPFLAGS={- our $cppflags2 = join('', $target{cppflags} || (), - @{$config{cppflags}}) -} -CNF_CFLAGS={- join('', $target{cflags} || (), - @{$config{cflags}}) -} -CNF_CXXFLAGS={- join('', $target{cxxflags} || (), - @{$config{cxxflags}}) -} -CNF_LDFLAGS={- join('', $target{lflags} || (), - @{$config{lflags}}) -} -CNF_EX_LIBS={- join('', map{ ",$_" } @{$target{ex_libs}}, - @{$config{ex_libs}}) -} - -# Variables starting with LIB_ are used to build library object files -# and shared libraries. -# Variables starting with DSO_ are used to build DSOs and their object files. -# Variables starting with BIN_ are used to build programs and their object -# files. - -LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (), - @{$config{lib_asflags}}, - '$(CNF_ASFLAGS)', '$(ASFLAGS)') -} -LIB_DEFINES={- our $lib_defines = - join('', (map { ",$_" } @{$target{lib_defines}}, - @{$target{shared_defines}}, - @{$config{lib_defines}}, - @{$config{shared_defines}})); - join('', $lib_defines, - (map { ",$_" } 'OPENSSLDIR="""$(OPENSSLDIR_C)"""', - 'ENGINESDIR="""$(ENGINESDIR_C)"""', - 'MODULESDIR="""$(MODULESDIR_C)"""'), - '$(CNF_DEFINES)', '$(DEFINES)') -} -LIB_INCLUDES={- our $lib_includes = - join(',', @{$target{lib_includes}}, - @{$target{shared_includes}}, - @{$config{lib_includes}}, - @{$config{shared_includes}}) -} -LIB_CPPFLAGS={- our $lib_cppflags = - join('', $target{lib_cppflags} || (), - $target{shared_cppflags} || (), - @{$config{lib_cppflags}}, - @{$config{shared_cppflag}}); - join('', "'qual_includes'", - '/DEFINE=(__dummy$(LIB_DEFINES))', - $lib_cppflags, - '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} -LIB_CFLAGS={- join('', $target{lib_cflags} || (), - $target{shared_cflag} || (), - @{$config{lib_cflags}}, - @{$config{shared_cflag}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} -LIB_LDFLAGS={- join('', $target{lib_lflags} || (), - $target{shared_ldflag} || (), - @{$config{lib_lflags}}, - @{$config{shared_ldflag}}, - '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} -LIB_EX_LIBS=$(CNF_EX_LIBS)$(EX_LIBS) -DSO_ASFLAGS={- join(' ', $target{dso_asflags} || (), - $target{module_asflags} || (), - @{$config{dso_asflags}}, - @{$config{module_asflags}}, - '$(CNF_ASFLAGS)', '$(ASFLAGS)') -} -DSO_DEFINES={- join('', (map { ",$_" } @{$target{dso_defines}}, - @{$target{module_defines}}, - @{$config{dso_defines}}, - @{$config{module_defines}}), - '$(CNF_DEFINES)', '$(DEFINES)') -} -DSO_INCLUDES={- join(',', @{$target{dso_includes}}, - @{$target{module_includes}}, - @{$config{dso_includes}}, - @{$config{module_includes}}) -} -DSO_CPPFLAGS={- join('', "'qual_includes'", - '/DEFINE=(__dummy$(DSO_DEFINES))', - $target{dso_cppflags} || (), - $target{module_cppflags} || (), - @{$config{dso_cppflags}}, - @{$config{module_cppflags}}, - '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} -DSO_CFLAGS={- join('', $target{dso_cflags} || (), - $target{module_cflags} || (), - @{$config{dso_cflags}}, - @{$config{module_cflags}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} -DSO_LDFLAGS={- join('', $target{dso_lflags} || (), - $target{module_ldflags} || (), - @{$config{dso_lflags}}, - @{$config{module_ldflags}}, - '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} -DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) -BIN_ASFLAGS={- join(' ', $target{bin_asflags} || (), - @{$config{bin_asflags}}, - '$(CNF_ASFLAGS)', '$(ASFLAGS)') -} -BIN_DEFINES={- join('', (map { ",$_" } @{$target{bin_defines}}, - @{$config{bin_defines}}), - '$(CNF_DEFINES)', '$(DEFINES)') -} -BIN_INCLUDES={- join(',', @{$target{bin_includes}}, - @{$config{bin_includes}}) -} -BIN_CPPFLAGS={- join('', "'qual_includes'", - '/DEFINE=(__dummy$(DSO_DEFINES))', - $target{bin_cppflags} || (), - @{$config{bin_cppflag}}, - '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -} -BIN_CFLAGS={- join('', $target{bin_cflags} || (), - @{$config{bin_cflags}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} -BIN_LDFLAGS={- join('', $target{bin_lflags} || (), - @{$config{bin_lflags}} || (), - '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} -BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) -NO_INST_LIB_CFLAGS={- join('', $target{no_inst_lib_cflags} - // $target{lib_cflags} - // (), - $target{shared_cflag} || (), - @{$config{lib_cflags}}, - @{$config{shared_cflag}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} -NO_INST_DSO_CFLAGS={- join('', $target{no_inst_dso_cflags} - // $target{dso_cflags} - // (), - $target{no_inst_module_cflags} - // $target{module_cflags} - // (), - @{$config{dso_cflags}}, - @{$config{module_cflags}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} -NO_INST_BIN_CFLAGS={- join('', $target{no_inst_bin_cflags} - // $target{bin_cflags} - // (), - @{$config{bin_cflags}}, - '$(CNF_CFLAGS)', '$(CFLAGS)') -} - PERLASM_SCHEME={- $target{perlasm_scheme} -} # CPPFLAGS_Q is used for one thing only: to build up buildinf.h -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 || ()); +CPPFLAGS_Q={- (my $c = $lib_cppflags.$cppflags) =~ s|"|""|g; + (my $d = $lib_cppdefines) =~ s|"|""|g; + my $i = join(',', @lib_cppincludes || (), '$(INCLUDES)'); my $x = $c; $x .= "/INCLUDE=($i)" if $i; $x .= "/DEFINE=($d)" if $d; @@ -863,12 +851,11 @@ EOF # # Assembler generator # - my $cppflags = { - shlib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)', - lib => '$(LIB_CFLAGS) $(LIB_CPPFLAGS)', - dso => '$(DSO_CFLAGS) $(DSO_CPPFLAGS)', - bin => '$(BIN_CFLAGS) $(BIN_CPPFLAGS)' - } -> {$args{intent}}; + my $cppflags = + { shlib => "$lib_cflags $lib_cppflags", + lib => "$lib_cflags $lib_cppflags", + dso => "$dso_cflags $dso_cppflags", + bin => "$bin_cflags $bin_cppflags" } -> {$args{intent}}; my @incs_cmds = includes({ shlib => '$(LIB_INCLUDES)', lib => '$(LIB_INCLUDES)', dso => '$(DSO_INCLUDES)', @@ -1014,25 +1001,25 @@ EOF my $cflags; if ($args{attrs}->{noinst}) { - $cflags = { shlib => '$(NO_INST_LIB_CFLAGS)', - lib => '$(NO_INST_LIB_CFLAGS)', - dso => '$(NO_INST_DSO_CFLAGS)', - bin => '$(NO_INST_BIN_CFLAGS)' } -> {$args{intent}}; + $cflags .= { shlib => $lib_cflags_no_inst, + lib => $lib_cflags_no_inst, + dso => $dso_cflags_no_inst, + bin => $bin_cflags_no_inst } -> {$args{intent}}; } else { - $cflags = { shlib => '$(LIB_CFLAGS)', - lib => '$(LIB_CFLAGS)', - dso => '$(DSO_CFLAGS)', - bin => '$(BIN_CFLAGS)' } -> {$args{intent}}; + $cflags .= { shlib => $lib_cflags, + lib => $lib_cflags, + dso => $dso_cflags, + bin => $bin_cflags } -> {$args{intent}}; } - $cflags .= { shlib => '$(LIB_CPPFLAGS)', - lib => '$(LIB_CPPFLAGS)', - dso => '$(DSO_CPPFLAGS)', - bin => '$(BIN_CPPFLAGS)' } -> {$args{intent}}; + $cflags .= { shlib => $lib_cppflags, + lib => $lib_cppflags, + dso => $dso_cppflags, + bin => $bin_cppflags } -> {$args{intent}}; my $defs = join("", map { ",".$_ } @{$args{defs}}); - my $asflags = { shlib => ' $(LIB_ASFLAGS)', - lib => ' $(LIB_ASFLAGS)', - dso => ' $(DSO_ASFLAGS)', - bin => ' $(BIN_ASFLAGS)' } -> {$args{intent}}; + my $asflags = { shlib => $lib_asflags, + lib => $lib_asflags, + dso => $dso_asflags, + bin => $bin_asflags } -> {$args{intent}}; my @incs_cmds = includes({ shlib => '$(LIB_INCLUDES)', lib => '$(LIB_INCLUDES)', @@ -1131,7 +1118,7 @@ $shlib : $deps $write_opt1 $write_opt2 CLOSE OPT_FILE - LINK \$(LIB_LDFLAGS)/SHARE=\$\@ $defs[0]-translated/OPT,- + LINK ${lib_ldflags}/SHARE=\$\@ $defs[0]-translated/OPT,- $shlibname-components.OPT/OPT \$(LIB_EX_LIBS) DELETE $defs[0]-translated;*,$shlibname-components.OPT;* PURGE $shlibname.EXE,$shlibname.MAP @@ -1176,7 +1163,7 @@ $dso : $deps $write_opt1 $write_opt2 CLOSE OPT_FILE - LINK \$(DSO_LDFLAGS)/SHARE=\$\@ $defs[0]/OPT,- + LINK ${dso_ldflags}/SHARE=\$\@ $defs[0]/OPT,- $dsoname-components.OPT/OPT \$(DSO_EX_LIBS) - PURGE $dsoname.EXE,$dsoname.OPT,$dsoname.MAP EOF @@ -1275,7 +1262,7 @@ $bin : $deps @ CLOSE OPT_FILE TYPE $binname.OPT ! For debugging - pipe SPAWN/WAIT/NOLOG/OUT=$binname.LINKLOG - - LINK \$(BIN_LDFLAGS)/EXEC=\$\@ $binname.OPT/OPT \$(BIN_EX_LIBS) ; - + LINK ${bin_ldflags}/EXEC=\$\@ $binname.OPT/OPT \$(BIN_EX_LIBS) ; - link_status = \$status ; link_severity = link_status .AND. 7 @ search_severity = 1 -@ IF link_severity .EQ. 0 THEN - |