X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=Configurations%2F10-main.conf;h=f66e35bd5211765f6ebc2aa89b20f5ff0bf751a8;hb=d8e2b4f9bf2e387ee533723a2d668fe7254b025c;hp=6830294e47830ea2cede8ca8eab046f7003e2ce5;hpb=e548c1fe98e35888e8ad90b16a4fdcd3ab577210;p=openssl.git diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index 6830294e47..f66e35bd52 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -116,13 +116,19 @@ sub vc_wince_info { # Helper functions for the VMS configs my $vms_info = {}; sub vms_info { - unless (%$vms_info) { - my $pointer_size = shift; - my $pointer_size_str = $pointer_size == 0 ? "" : "$pointer_size"; + my $pointer_size_str = $config{target} =~ m|-p(\d+)$| ? $1 : ""; + + # For the case where Configure iterate through all config targets, such + # as when listing them and their details, we reset info if the pointer + # size changes. + if (%$vms_info && $vms_info->{pointer_size} ne $pointer_size_str) { + $vms_info = {}; + } + unless (%$vms_info) { $vms_info->{disable_warns} = [ ]; $vms_info->{pointer_size} = $pointer_size_str; - if ($pointer_size == 64) { + if ($pointer_size_str eq "64") { `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; if ($? == 0) { push @{$vms_info->{disable_warns}}, "MAYLOSEDATA3"; @@ -199,7 +205,7 @@ my %targets = ( debug => "-O0 -g", release => "-O3 -fomit-frame-pointer"), threads("-pthread")), - cppflags => add("-DL_DEBIAN"), + cppflags => add("-DL_ENDIAN"), ex_libs => add(threads("-pthread")), bn_ops => "BN_LLONG", shared_cflag => "-fPIC", @@ -220,7 +226,7 @@ my %targets = ( debug => "-O0 -g", release => "-O3"), threads("-pthread")), - cppflags => add("-DL_DEBIAN"), + cppflags => add("-DL_ENDIAN"), ex_libs => add(threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", perlasm_scheme => "elf", @@ -248,7 +254,7 @@ my %targets = ( cflags => add_before(picker(default => "-xarch=generic64 -xstrconst -Xa", debug => "-g", release => "-xO5 -xdepend -xbuiltin")), - cppflags => add("-DL_DEBIAN", threads("-D_REENTRANT")), + cppflags => add("-DL_ENDIAN", threads("-D_REENTRANT")), thread_scheme => "pthreads", lflags => add(threads("-mt")), ex_libs => add(threads("-lpthread")), @@ -267,7 +273,7 @@ my %targets = ( debug => "-O0 -g", release => "-O3"), threads("-pthread")), - cppflags => add("-DB_DEBIAN -DBN_DIV2W"), + cppflags => add("-DB_ENDIAN -DBN_DIV2W"), ex_libs => add(threads("-pthread")), bn_ops => "BN_LLONG RC4_CHAR", shared_cflag => "-fPIC", @@ -300,7 +306,7 @@ my %targets = ( cflags => add_before(picker(default => "-xstrconst -Xa", debug => "-g", release => "-xO5 -xdepend")), - cppflags => add("-DB_DEBIAN -DBN_DIV2W", + cppflags => add("-DB_ENDIAN -DBN_DIV2W", threads("-D_REENTRANT")), lflags => add(threads("-mt")), ex_libs => add(threads("-lpthread")), @@ -332,7 +338,7 @@ my %targets = ( cflags => combine(picker(default => "-mabi=n32", debug => "-g -O0", release => "-O3")), - cppflags => combine("-DB_DEBIAN -DBN_DIV3W", + cppflags => combine("-DB_ENDIAN -DBN_DIV3W", threads("-D_SGI_MP_SOURCE")), ex_libs => add(threads("-lpthread")), bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", @@ -349,7 +355,7 @@ my %targets = ( cflags => combine(picker(default => "-n32 -mips3 -use_readonly_const -G0 -rdata_shared", debug => "-g -O0", release => "-O2")), - cppflags => combine("-DB_DEBIAN -DBN_DIV3W", + cppflags => combine("-DB_ENDIAN -DBN_DIV3W", threads("-D_SGI_MP_SOURCE")), ex_libs => add(threads("-lpthread")), bn_ops => "RC4_CHAR SIXTY_FOUR_BIT", @@ -367,7 +373,7 @@ my %targets = ( cflags => combine(picker(default => "-mabi=64 -mips4", debug => "-g -O0", release => "-O3")), - cppflags => combine("-DB_DEBIAN -DBN_DIV3W", + cppflags => combine("-DB_ENDIAN -DBN_DIV3W", threads("-D_SGI_MP_SOURCE")), ex_libs => add(threads("-lpthread")), bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", @@ -384,7 +390,7 @@ my %targets = ( cflags => combine(picker(default => "-64 -mips4 -use_readonly_const -G0 -rdata_shared", debug => "-g -O0", release => "-O2")), - cppflags => combine("-DB_DEBIAN -DBN_DIV3W", + cppflags => combine("-DB_ENDIAN -DBN_DIV3W", threads("-D_SGI_MP_SOURCE")), ex_libs => add(threads("-lpthread")), bn_ops => "RC4_CHAR SIXTY_FOUR_BIT_LONG", @@ -429,7 +435,7 @@ my %targets = ( cflags => combine(picker(debug => "-O0 -g", release => "-O3"), threads("-pthread")), - cppflags => "-DB_DEBIAN -DBN_DIV2W", + cppflags => "-DB_ENDIAN -DBN_DIV2W", ex_libs => add("-Wl,+s -ldld", threads("-pthread")), bn_ops => "BN_LLONG", thread_scheme => "pthreads", @@ -448,7 +454,7 @@ my %targets = ( cc => "gcc", cflags => combine(picker(debug => "-O0 -g", release => "-O3")), - cppflags => combine("-DB_DEBIAN", threads("-D_REENTRANT")), + cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")), ex_libs => add("-ldl"), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", thread_scheme => "pthreads", @@ -467,7 +473,7 @@ my %targets = ( cflags => combine(picker(default => "+Optrs_strongly_typed -Ae +ESlit", debug => "+O0 +d -g", release => "+O3")), - cppflags => combine("-DB_DEBIAN -DBN_DIV2W -DMD32_XARRAY", + cppflags => combine("-DB_ENDIAN -DBN_DIV2W -DMD32_XARRAY", threads("-D_REENTRANT")), ex_libs => add("-Wl,+s -ldld",threads("-lpthread")), bn_ops => "RC4_CHAR", @@ -489,7 +495,7 @@ my %targets = ( cflags => combine(picker(default => "+DD64 +Optrs_strongly_typed -Ae +ESlit", debug => "+O0 +d -g", release => "+O3")), - cppflags => combine("-DB_DEBIAN -DMD32_XARRAY", + cppflags => combine("-DB_ENDIAN -DMD32_XARRAY", threads("-D_REENTRANT")), ex_libs => add("-ldl",threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", @@ -509,7 +515,7 @@ my %targets = ( cflags => combine(picker(default => "-Ae +DD32 +Olit=all -z", debug => "+O0 +d -g", release => "+O2")), - cppflags => combine("-DB_DEBIAN", threads("-D_REENTRANT")), + cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")), ex_libs => add("-ldl",threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT", thread_scheme => "pthreads", @@ -526,7 +532,7 @@ my %targets = ( cflags => combine(picker(default => "-Ae +DD64 +Olit=all -z", debug => "+O0 +d -g", release => "+O3")), - cppflags => combine("-DB_DEBIAN", threads("-D_REENTRANT")), + cppflags => combine("-DB_ENDIAN", threads("-D_REENTRANT")), ex_libs => add("-ldl", threads("-lpthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", thread_scheme => "pthreads", @@ -544,7 +550,7 @@ my %targets = ( cflags => combine(picker(debug => "-O0 -g", release => "-O3"), threads("-pthread")), - cppflags => "-DB_DEBIAN", + cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT", thread_scheme => "pthreads", @@ -562,7 +568,7 @@ my %targets = ( debug => "-O0 -g", release => "-O3"), threads("-pthread")), - cppflags => "-DB_DEBIAN", + cppflags => "-DB_ENDIAN", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "SIXTY_FOUR_BIT_LONG", thread_scheme => "pthreads", @@ -580,7 +586,7 @@ my %targets = ( cc => "gcc", cflags => "-O3", cppflags => "-D_ENDIAN -DBN_DIV2W -D_POSIX_SOURCE -D_SOCKET_SOURCE", - includes => [ "/SYSLOG/PUB" ], + includes => add("/SYSLOG/PUB"), sys_id => "MPE", lflags => add("-L/SYSLOG/PUB"), ex_libs => add("-lsyslog -lsocket -lcurses"), @@ -632,6 +638,10 @@ my %targets = ( debug => "-O0 -g", release => "-O3"), threads("-pthread")), + cxxflags => combine(picker(default => "-std=c++11 -Wall", + debug => "-O0 -g", + release => "-O3"), + threads("-pthread")), cppflags => "-DOPENSSL_USE_NODELETE", ex_libs => add("-ldl", threads("-pthread")), bn_ops => "BN_LLONG RC4_CHAR", @@ -1298,6 +1308,7 @@ my %targets = ( inherit_from => [ "BASE_Windows" ], template => 1, cc => "cl", + cpp => '$(CC) /EP /C', cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo", defines => add("OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", "L_ENDIAN", "_CRT_SECURE_NO_DEPRECATE", @@ -1440,10 +1451,11 @@ my %targets = ( "NO_CHMOD", "OPENSSL_SMALL_FOOTPRINT" ], debug => [ "DEBUG", "_DEBUG" ]), includes => - combine(sub { defined(env('WCECOMPAT')) - ? '$(WCECOMPAT)/include' : (); }, - sub { defined(env('PORTSDK_LIBPATH')) - ? '$(PORTSDK_LIBPATH)/../../include' : (); }), + add(combine(sub { defined(env('WCECOMPAT')) + ? '$(WCECOMPAT)/include' : (); }, + sub { defined(env('PORTSDK_LIBPATH')) + ? '$(PORTSDK_LIBPATH)/../../include' + : (); })), lflags => add(combine("/nologo /opt:ref", sub { vc_wince_info()->{lflags}; }, sub { defined(env('PORTSDK_LIBPATH')) @@ -1829,14 +1841,29 @@ my %targets = ( }, ##### VMS + # Most things happen in vms-generic. + # Note that vms_info extracts the pointer size from the end of + # the target name, and will assume that anything matching /-p\d+$/ + # indicates the pointer size setting for the desired target. "vms-generic" => { inherit_from => [ "BASE_VMS" ], template => 1, cc => "CC/DECC", - cflags => picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", - debug => "/NOOPTIMIZE/DEBUG", - release => "/OPTIMIZE/NODEBUG"), - defines => add("OPENSSL_USE_NODELETE"), + cpp => '$(CC)/PREPROCESS_ONLY=SYS$OUTPUT:', + cflags => + combine(picker(default => "/STANDARD=(ISOC94,RELAXED)/NOLIST/PREFIX=ALL", + debug => "/NOOPTIMIZE/DEBUG", + release => "/OPTIMIZE/NODEBUG"), + sub { my @warnings = + @{vms_info()->{disable_warns}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), + defines => + add("OPENSSL_USE_NODELETE", + sub { + return vms_info()->{def_zlib} + ? "LIBZ=\"\"\"".vms_info()->{def_zlib}."\"\"\"" : (); + }), lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'", debug => "/DEBUG/TRACEBACK", release => "/NODEBUG/NOTRACEBACK"), @@ -1844,116 +1871,58 @@ my %targets = ( # no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl # for object files belonging to selected internal libraries no_inst_lib_cflags => "", + ex_libs => add(sub { return vms_info()->{zlib} || (); }), shared_target => "vms-shared", dso_scheme => "vms", thread_scheme => "pthreads", - apps_aux_src => "vms_decc_init.c vms_term_sock.c", + apps_aux_src => "vms_term_sock.c", + apps_init_src => "vms_decc_init.c", }, + # From HELP CC/POINTER_SIZE: + # + # ---------- + # LONG[=ARGV] The compiler assumes 64-bit pointers. If the ARGV option to + # LONG or 64 is present, the main argument argv will be an + # array of long pointers instead of an array of short pointers. + # + # 64[=ARGV] Same as LONG. + # ---------- + # + # We don't want the hassle of dealing with 32-bit pointers with argv, so + # we force it to have 64-bit pointers, see the added cflags in the -p64 + # config targets below. + "vms-alpha" => { inherit_from => [ "vms-generic" ], - cflags => add(sub { my @warnings = - @{vms_info(0)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), - defines => - add(sub { - return vms_info(0)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), - pointer_size => sub { return vms_info(0)->{pointer_size} }, - #as => "???", - #debug_aflags => "/NOOPTIMIZE/DEBUG", - #release_aflags => "/OPTIMIZE/NODEBUG", - bn_opts => "SIXTY_FOUR_BIT RC4_INT", + bn_ops => "SIXTY_FOUR_BIT RC4_INT", + pointer_size => "", }, "vms-alpha-p32" => { - inherit_from => [ "vms-generic" ], - cflags => - add("/POINTER_SIZE=32", - sub { my @warnings = - @{vms_info(32)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); - } ), - defines => - add(sub { - return vms_info(32)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), - pointer_size => sub { return vms_info(32)->{pointer_size} }, + inherit_from => [ "vms-alpha" ], + cflags => add("/POINTER_SIZE=32"), + pointer_size => "32", }, "vms-alpha-p64" => { - inherit_from => [ "vms-generic" ], - cflags => - add("/POINTER_SIZE=64=ARGV", - sub { my @warnings = - @{vms_info(64)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); - } ), - defines => - add(sub { - return vms_info(64)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), - pointer_size => sub { return vms_info(64)->{pointer_size} }, + inherit_from => [ "vms-alpha" ], + cflags => add("/POINTER_SIZE=64=ARGV"), + pointer_size => "64", }, "vms-ia64" => { inherit_from => [ "vms-generic" ], - cflags => add(sub { my @warnings = - @{vms_info(0)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), - defines => - add(sub { - return vms_info(0)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(0)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(0)->{zlib} || (); }), - pointer_size => sub { return vms_info(0)->{pointer_size} }, - #as => "I4S", - #debug_aflags => "/NOOPTIMIZE/DEBUG", - #release_aflags => "/OPTIMIZE/NODEBUG", - bn_opts => "SIXTY_FOUR_BIT RC4_INT", + bn_ops => "SIXTY_FOUR_BIT RC4_INT", + pointer_size => "", }, "vms-ia64-p32" => { - inherit_from => [ "vms-generic" ], - cflags => - add("/POINTER_SIZE=32", - sub { my @warnings = - @{vms_info(32)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); - } ), - defines => - add(sub { - return vms_info(32)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(32)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(32)->{zlib} || (); }), - pointer_size => sub { return vms_info(32)->{pointer_size} }, + inherit_from => [ "vms-ia64" ], + cflags => add("/POINTER_SIZE=32"), + pointer_size => "32", }, "vms-ia64-p64" => { - inherit_from => [ "vms-generic" ], - cflags => - add("/POINTER_SIZE=64=ARGV", - sub { my @warnings = - @{vms_info(64)->{disable_warns}}; - @warnings - ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); - } ), - defines => - add(sub { - return vms_info(64)->{def_zlib} - ? "LIBZ=\"\"\"".vms_info(64)->{def_zlib}."\"\"\"" : (); - }), - ex_libs => add(sub { return vms_info(64)->{zlib} || (); }), - pointer_size => sub { return vms_info(64)->{pointer_size} }, + inherit_from => [ "vms-ia64" ], + cflags => add("/POINTER_SIZE=64=ARGV"), + pointer_size => "64", }, );