Force argv to be an array of long pointers on VMS
[openssl.git] / Configurations / 10-main.conf
index 8909700510910385119f6cf995acc40b66170f6c..1b32b10f3c0890b2f42b5ea4b1a1114d6af5ac62 100644 (file)
@@ -74,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 = (
 
@@ -1237,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 {
@@ -1268,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} },
@@ -1285,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" },
@@ -1700,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",
@@ -1719,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; $_ } @_) },
     },
 
 );