Windows build system: get uplink right.
[oweals/openssl.git] / Configurations / 10-main.conf
index 5a3a5faa93624a2c06905df094daa6bd6d02200f..459de9cd307e927e492cfcfffcc184029cf758cf 100644 (file)
@@ -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 {
@@ -1238,6 +1222,8 @@ 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",
+        rc               => "rc",
+        rcoutflag        => "/fo",
         lib_cflags       => sub { join(" ",
                                        ($disabled{shared} ? "/Zl" : ()),
                                        "/Zi /Fdlib") },
@@ -1251,7 +1237,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 {
@@ -1282,7 +1268,8 @@ 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",
@@ -1291,7 +1278,8 @@ sub vc_wince_info {
         perlasm_scheme   => "ias",
     },
     "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} },
@@ -1303,7 +1291,8 @@ sub vc_wince_info {
     "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} ? () : "x86_uplink" } ],
         as               => sub { my $ver=`nasm -v 2>NUL`;
                                   my $vew=`nasmw -v 2>NUL`;
                                   return $ver ge $vew ? "nasm" : "nasmw" },
@@ -1521,15 +1510,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",