Add /fixed flag for FIPS links where appropriate.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 15 Feb 2014 17:16:19 +0000 (17:16 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 15 Feb 2014 20:30:08 +0000 (20:30 +0000)
(cherry picked from commit c55fef76f77aa54e85ca534785b2b19cebbe940c)

Conflicts:

util/pl/VC-32.pl

util/pl/VC-32.pl

index 6c550f54aedfa44c7a53e42b8b329438edbf44eb..3705fc73b70ce732029922ecdc8c1557c22ce01c 100644 (file)
@@ -27,6 +27,8 @@ $zlib_lib="zlib1.lib";
 $l_flags =~ s/-L("\[^"]+")/\/libpath:$1/g;
 $l_flags =~ s/-L(\S+)/\/libpath:$1/g;
 
+my $ff = "";
+
 # C compiler stuff
 $cc='cl';
 if ($FLAVOR =~ /WIN64/)
@@ -126,6 +128,7 @@ else        # Win32
     $base_cflags= " $mf_cflag";
     my $f = $shlib || $fips ?' /MD':' /MT';
     $lib_cflag='/Zl' if (!$shlib);     # remove /DEFAULTLIBs from static lib
+    $ff = "/fixed";
     $opt_cflags=$f.' /Ox /O2 /Ob2';
     $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
     $lflags="/nologo /subsystem:console /opt:ref";
@@ -318,7 +321,7 @@ sub do_lib_rule
                        $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
                        $ret.="\tSET FIPS_TARGET=$target\n";
                        $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
-                       $ret.="\t\$(FIPSLINK) \$(MLFLAGS) /map $base_arg $efile$target ";
+                       $ret.="\t\$(FIPSLINK) \$(MLFLAGS) $ff /map $base_arg $efile$target ";
                        $ret.="$name @<<\n  \$(SHLIB_EX_OBJ) $objs \$(EX_LIBS) ";
                        $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n";
                        }
@@ -355,7 +358,7 @@ sub do_link_rule
                $ret.="\tSET FIPS_TARGET=$target\n";
                $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
                $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
-               $ret.="\t\$(FIPSLINK) \$(LFLAGS) /map $efile$target @<<\n";
+               $ret.="\t\$(FIPSLINK) \$(LFLAGS) $ff /map $efile$target @<<\n";
                $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n";
                }
        else