X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=Configurations%2F10-main.conf;h=1b32b10f3c0890b2f42b5ea4b1a1114d6af5ac62;hp=fa9af88e421b8223246f6b4aa5188e3c77a8c3ae;hb=368058d0a79d2e3b853746b09ca86679a86ac233;hpb=2fe730362812e3c7d364197449a9439e3cb5915b diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf index fa9af88e42..1b32b10f3c 100644 --- a/Configurations/10-main.conf +++ b/Configurations/10-main.conf @@ -1,22 +1,6 @@ ## -*- mode: perl; -*- ## Standard openssl configuration targets. -sub picker { - my %opts = @_; - return sub { add($opts{default} || (), - $opts{$config{build_type}} || ())->(); } -} - -sub threads { - my @flags = @_; - return sub { add($disabled{threads} ? () : @flags)->(); } -} - -sub combine { - my @stuff = @_; - return sub { add(@stuff)->(); } -} - # Helper functions for the Windows configs my $vc_win64a_info = {}; sub vc_win64a_info { @@ -52,8 +36,9 @@ sub vc_wince_info { my $wcelflag = "/subsystem:windowsce,$1.$2"; # ...,N.NN my $wceplatf = $ENV{'PLATFORM'}; - my $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d; - my $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; + + $wceplatf =~ tr/a-z0-9 /A-Z0-9_/; + $wcecdefs .= " -DWCE_PLATFORM_$wceplatf"; my $wcetgt = $ENV{'TARGETCPU'}; # just shorter name... SWITCH: for($wcetgt) { @@ -89,6 +74,20 @@ sub vc_wince_info { return $vc_wince_info; } +# Helper functions for the VMS configs +my $vms_info = {}; +sub vms_info { + unless (%$vms_info) { + $vms_info->{disable_warns} = [ ]; + $vms_info->{disable_warns_p32} = [ ]; + $vms_info->{disable_warns_p64} = [ ]; + `PIPE CC /NOCROSS_REFERENCE /NOLIST /NOOBJECT /WARNINGS = DISABLE = ( MAYLOSEDATA3, EMPTYFILE ) NL: 2> NL:`; + if ($? == 0) { + push @{$vms_info->{disable_warns_p64}}, "MAYLOSEDATA3"; + } + } + return $vms_info; +} %targets = ( @@ -532,10 +531,10 @@ sub vc_wince_info { "hpux64-ia64-gcc" => { inherit_from => [ "BASE_unix", asm("ia64_asm") ], cc => "gcc", - cflags => picker(default => "-mlp64 -DB_ENDIAN", - debug => "-O0 -g", - release => "-O3", - threads("-pthread")), + cflags => combine(picker(default => "-mlp64 -DB_ENDIAN", + debug => "-O0 -g", + release => "-O3"), + threads("-pthread")), ex_libs => add("-ldl"), bn_ops => "SIXTY_FOUR_BIT_LONG", thread_scheme => "pthreads", @@ -744,7 +743,7 @@ sub vc_wince_info { inherit_from => [ "linux-generic32", asm("x86_64_asm") ], cflags => add("-mx32 -DL_ENDIAN"), bn_ops => "SIXTY_FOUR_BIT", - perlasm_scheme => "elf", + perlasm_scheme => "elf32", shared_ldflag => "-mx32", multilib => "x32", }, @@ -780,7 +779,7 @@ sub vc_wince_info { # inherit_from => [ "linux-generic32", asm("s390x_asm") ], cflags => add("-m31 -Wa,-mzarch -DB_ENDIAN"), - bn_obj => sub { my $r=join(" ",@_); $r=~s/bn\-s390x/bn_asm/; $r; }, + bn_asm_src => sub { my $r=join(" ",@_); $r=~s|asm/s390x\.S|bn_asm.c|; $r; }, perlasm_scheme => "31", shared_ldflag => "-m31", multilib => "/highgprs", @@ -1237,7 +1236,11 @@ sub vc_wince_info { cc => "cl", cflags => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE", coutflag => "/Fo", - lib_cflags => "/Zl /Zi /Fdlib", + rc => "rc", + rcoutflag => "/fo", + lib_cflags => sub { join(" ", + ($disabled{shared} ? "/Zl" : ()), + "/Zi /Fdlib") }, dso_cflags => "/Zi", bin_cflags => "/Zi /Fdapp", lflags => add("/debug"), @@ -1248,7 +1251,7 @@ sub vc_wince_info { dso_scheme => "win32", }, "VC-noCE-common" => { - inherit_from => [ "VC-common", "uplink_common" ], + inherit_from => [ "VC-common" ], cflags => add(picker(default => "-DUNICODE -D_UNICODE", debug => sub { @@ -1279,16 +1282,20 @@ sub vc_wince_info { build_scheme => add("VC-W64", { separator => undef }), }, "VC-WIN64I" => { - inherit_from => [ "VC-WIN64-common", asm("ia64_asm") ], + inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), + sub { $disabled{shared} ? () : "ia64_uplink" } ], as => "ias", asflags => "-d debug", asoutflag => "-o", sys_id => "WIN64I", - rc4_asm_src => "", + bn_asm_src => sub { return undef unless @_; + my $r=join(" ",@_); $r=~s|bn-ia64.s|bn_asm.c|; $r; }, perlasm_scheme => "ias", + multilib => "-ia64", }, "VC-WIN64A" => { - inherit_from => [ "VC-WIN64-common", asm("x86_64_asm") ], + inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), + sub { $disabled{shared} ? () : "x86_64_uplink" } ], as => sub { vc_win64a_info()->{as} }, asflags => sub { vc_win64a_info()->{asflags} }, asoutflag => sub { vc_win64a_info()->{asoutflag} }, @@ -1296,11 +1303,13 @@ sub vc_wince_info { bn_asm_src => sub { return undef unless @_; my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; }, perlasm_scheme => "auto", + multilib => "-x64", }, "VC-WIN32" => { # x86 Win32 target defaults to ANSI API, if you want UNICODE, # configure with 'perl Configure VC-WIN32 -DUNICODE -D_UNICODE' - inherit_from => [ "VC-noCE-common", asm("x86_asm") ], + inherit_from => [ "VC-noCE-common", asm("x86_asm"), + sub { $disabled{shared} ? () : "uplink_common" } ], as => sub { my $ver=`nasm -v 2>NUL`; my $vew=`nasmw -v 2>NUL`; return $ver ge $vew ? "nasm" : "nasmw" }, @@ -1366,16 +1375,6 @@ sub vc_wince_info { build_scheme => add("VC-WCE", { separator => undef }), }, -###### Borland C++ 4.5 -## "BC-32" => { -## inherit_from => [ "BASE_Windows" ], -## cc => "bcc32", -## sys_id => "WIN32", -## bn_ops => "BN_LLONG EXPORT_VAR_AS_FN", -## dso_scheme => "win32", -## build_scheme => add("BC", { separator => undef }), -## }, - #### MinGW "mingw" => { inherit_from => [ "BASE_unix", asm("x86_asm"), @@ -1454,6 +1453,7 @@ sub vc_wince_info { release => "-O3 -fomit-frame-pointer"), sys_id => "CYGWIN", bn_ops => "BN_LLONG", + thread_scheme => "pthread", perlasm_scheme => "coff", dso_scheme => "dlfcn", shared_target => "cygwin-shared", @@ -1469,6 +1469,7 @@ sub vc_wince_info { release => "-O3"), sys_id => "CYGWIN", bn_ops => "SIXTY_FOUR_BIT_LONG", + thread_scheme => "pthread", perlasm_scheme => "mingw64", dso_scheme => "dlfcn", shared_target => "cygwin-shared", @@ -1494,57 +1495,6 @@ sub vc_wince_info { inherit_from => [ "Cygwin-x86" ] }, -#### NetWare from David Ward (dsward@novell.com) -# requires either MetroWerks NLM development tools, or gcc / nlmconv -# NetWare defaults socket bio to WinSock sockets. However, -# the builds can be configured to use BSD sockets instead. -# netware-clib => legacy CLib c-runtime support - "netware-clib" => { - inherit_from => [ "BASE_Windows" ], - cc => "mwccnlm", - build_scheme => add("netware", { separator => undef }), - }, - "netware-clib-bsdsock" => { - inherit_from => [ "BASE_Windows" ], - cc => "mwccnlm", - build_scheme => add("netware", { separator => undef }), - }, - "netware-clib-gcc" => { - inherit_from => [ "BASE_unix" ], - cc => "i586-netware-gcc", - cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -I/ndk/ws295sdk/include -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall", - }, - "netware-clib-bsdsock-gcc" => { - inherit_from => [ "BASE_unix" ], - cc => "i586-netware-gcc", - cflags => "-nostdinc -I/ndk/nwsdk/include/nlm -DNETWARE_BSDSOCK -DNETDB_USE_INTERNET -DL_ENDIAN -DNETWARE_CLIB -DOPENSSL_SYS_NETWARE -O2 -Wall", - }, - # netware-libc => LibC/NKS support - "netware-libc" => { - inherit_from => [ "BASE_Windows" ], - cc => "mwccnlm", - bn_ops => "BN_LLONG", - build_scheme => add("netware", { separator => undef }), - }, - "netware-libc-bsdsock" => { - inherit_from => [ "BASE_Windows" ], - cc => "mwccnlm", - bn_ops => "BN_LLONG", - build_scheme => add("netware", { separator => undef }), - }, - "netware-libc-gcc" => { - inherit_from => [ "BASE_unix" ], - cc => "i586-netware-gcc", - cflags => "-nostdinc -I/ndk/libc/include -I/ndk/libc/include/winsock -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall", - bn_ops => "BN_LLONG", - }, - "netware-libc-bsdsock-gcc" => { - inherit_from => [ "BASE_unix" ], - cc => "i586-netware-gcc", - cflags => "-nostdinc -I/ndk/libc/include -DNETWARE_BSDSOCK -DL_ENDIAN -DNETWARE_LIBC -DOPENSSL_SYS_NETWARE -DTERMIO -O2 -Wall", - bn_ops => "BN_LLONG", - }, - #### DJGPP "DJGPP" => { inherit_from => [ asm("x86_asm") ], @@ -1556,23 +1506,6 @@ sub vc_wince_info { perlasm_scheme => "a.out", }, -#### Ultrix from Bernhard Simon - "ultrix-cc" => { - inherit_from => [ "BASE_unix" ], - cc => "cc", - cflags => "-std1 -O -Olimit 2500 -DL_ENDIAN", - thread_scheme => "(unknown)", - }, - "ultrix-gcc" => { - inherit_from => [ "BASE_unix" ], - cc => "gcc", - cflags => "-O3 -DL_ENDIAN", - bn_ops => "BN_LLONG", - thread_scheme => "(unknown)", - }, -# K&R C is no longer supported; you need gcc on old Ultrix installations -##"ultrix","cc:-O2 -DNOPROTO -DNOCONST -DL_ENDIAN::(unknown):::::::", - ##### MacOS X (a.k.a. Darwin) setup "darwin-common" => { inherit_from => [ "BASE_unix" ], @@ -1594,15 +1527,18 @@ sub vc_wince_info { shared_ldflag => "-dynamiclib", shared_extension => ".\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib", }, + # Option "freeze" such as -std=gnu9x can't negatively interfere + # with future defaults for below two targets, because MacOS X + # for PPC has no future, it was discontinued by vendor in 2009. "darwin-ppc-cc" => { inherit_from => [ "darwin-common", asm("ppc32_asm") ], - cflags => add("-arch ppc -DB_ENDIAN -Wa,-force_cpusubtype_ALL"), + cflags => add("-arch ppc -std=gnu9x -DB_ENDIAN -Wa,-force_cpusubtype_ALL"), perlasm_scheme => "osx32", shared_ldflag => "-arch ppc -dynamiclib", }, "darwin64-ppc-cc" => { inherit_from => [ "darwin-common", asm("ppc64_asm") ], - cflags => add("-arch ppc64 -DB_ENDIAN"), + cflags => add("-arch ppc64 -std=gnu9x -DB_ENDIAN"), bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", perlasm_scheme => "osx64", shared_ldflag => "-arch ppc64 -dynamiclib", @@ -1675,12 +1611,6 @@ sub vc_wince_info { shared_cflag => "-fPIC", }, -##### OS/2 EMX - "OS2-EMX" => { - inherit_from => [ "BASE_unix" ], - cc => "gcc", - }, - ##### VxWorks for various targets "vxworks-ppc60x" => { inherit_from => [ "BASE_unix" ], @@ -1790,6 +1720,7 @@ sub vc_wince_info { debug => "/DEBUG/TRACEBACK", release => "/NODEBUG/NOTRACEBACK"), shared_target => "vms-shared", + dso_scheme => "vms", thread_scheme => "pthreads", apps_aux_src => "vms_decc_init.c", @@ -1809,37 +1740,69 @@ sub vc_wince_info { #}, "vms-alpha" => { inherit_from => [ "vms-generic" ], + cflags => add(sub { my @warnings = + @{vms_info()->{disable_warns}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), #as => "???", #debug_aflags => "/NOOPTIMIZE/DEBUG", #release_aflags => "/OPTIMIZE/NODEBUG", bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR", }, - "vms-alpha-P32" => { - inherit_from => [ "vms-alpha" ], - cflags => add("/POINTER_SIZE=32"), - ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) }, - }, - "vms-alpha-P64" => { - inherit_from => [ "vms-alpha" ], - cflags => add("/POINTER_SIZE=64"), - ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) }, + "vms-alpha-p32" => { + inherit_from => [ "vms-alpha" ], + cflags => + add("/POINTER_SIZE=32", + sub { my @warnings = + @{vms_info()->{disable_warns_p32}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); + } ), + ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) }, + }, + "vms-alpha-p64" => { + inherit_from => [ "vms-alpha" ], + cflags => + add("/POINTER_SIZE=64=ARGV", + sub { my @warnings = + @{vms_info()->{disable_warns_p64}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); + } ), + ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) }, }, "vms-ia64" => { inherit_from => [ "vms-generic" ], + cflags => add(sub { my @warnings = + @{vms_info()->{disable_warns}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); }), #as => "I4S", #debug_aflags => "/NOOPTIMIZE/DEBUG", #release_aflags => "/OPTIMIZE/NODEBUG", bn_opts => "SIXTY_FOUR_BIT RC4_INT RC4_CHUNK_LL DES_PTR BF_PTR", }, - "vms-ia64-P32" => { - inherit_from => [ "vms-ia64" ], - cflags => add("/POINTER_SIZE=32"), - ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) }, - }, - "vms-ia64-P64" => { - inherit_from => [ "vms-ia64" ], - cflags => add("/POINTER_SIZE=64"), - ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) }, + "vms-ia64-p32" => { + inherit_from => [ "vms-ia64" ], + cflags => + add("/POINTER_SIZE=32", + sub { my @warnings = + @{vms_info()->{disable_warns_p32}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); + } ), + ex_libs => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) }, + }, + "vms-ia64-p64" => { + inherit_from => [ "vms-ia64" ], + cflags => + add("/POINTER_SIZE=64=ARGV", + sub { my @warnings = + @{vms_info()->{disable_warns_p64}}; + @warnings + ? "/WARNINGS=DISABLE=(".join(",",@warnings).")" : (); + } ), + ex_libs => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) }, }, );