Profiling option for mk1mf.pl
authorUlf Möller <ulf@openssl.org>
Fri, 21 Jul 2000 19:00:38 +0000 (19:00 +0000)
committerUlf Möller <ulf@openssl.org>
Fri, 21 Jul 2000 19:00:38 +0000 (19:00 +0000)
util/mk1mf.pl
util/pl/linux.pl

index ffb3c1083421cfaa705bd22d5e4588187690683d..367484ae7fff62fcea5a7a85ad4ba5d87107e221 100755 (executable)
@@ -65,6 +65,7 @@ and [options] can be one of
        no-err                                  - No error strings
        dll/shlib                               - Build shared libraries (MS)
        debug                                   - Debug build
+        profile                                 - Profiling build
        gcc                                     - Use Gcc (unix)
        rsaref                                  - Build to require RSAref
 
@@ -217,9 +218,10 @@ $cflags.=" -DNO_SSL3" if $no_ssl3;
 $cflags.=" -DNO_ERR"  if $no_err;
 $cflags.=" -DRSAref"  if $rsaref ne "";
 
-if ($unix)
-       { $cflags="$c_flags" if ($c_flags ne ""); }
-else   { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
+## if ($unix)
+##     { $cflags="$c_flags" if ($c_flags ne ""); }
+##else
+       { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
 $ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
 
@@ -878,6 +880,7 @@ sub read_options
        elsif (/^rsaref$/)      { $rsaref=1; }
        elsif (/^gcc$/)         { $gcc=1; }
        elsif (/^debug$/)       { $debug=1; }
+       elsif (/^profile$/)     { $profile=1; }
        elsif (/^shlib$/)       { $shlib=1; }
        elsif (/^dll$/)         { $shlib=1; }
        elsif (/^([^=]*)=(.*)$/){ $VARS{$1}=$2; }
index 3e497553265f00f178783d6780137e1441e6996b..8924ed54808a12a491bc1ed9e6e874d825563cfb 100644 (file)
@@ -12,6 +12,8 @@ $rm='/bin/rm -f';
 $cc='gcc';
 if ($debug)
        { $cflags="-g2 -ggdb -DREF_CHECK -DCRYPTO_MDEBUG"; }
+elsif ($profile)
+       { $cflags="-pg -O3"; }
 else
        { $cflags="-O3 -fomit-frame-pointer"; }