openpkg/openssl.patch

Fri, 03 Aug 2012 20:11:53 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 20:11:53 +0200
changeset 470
f8813e60f168
parent 428
f880f219c566
child 472
0746a003fc03
permissions
-rw-r--r--

Neutralize buggy code causing OpenPKG to have 'fatal problems' in
spite of correct installation, configuration, and operation. An
administrator suffering from this failure is even unable to
uninstall the flawed software.

michael@13 1 Index: Configure
michael@428 2 --- Configure.orig 2012-03-14 23:20:40.000000000 +0100
michael@428 3 +++ Configure 2012-06-27 10:10:05.000000000 +0200
michael@13 4 @@ -6,7 +6,6 @@
michael@13 5 ##
michael@13 6
michael@13 7 require 5.000;
michael@13 8 -use strict;
michael@13 9
michael@13 10 # see INSTALL for instructions.
michael@13 11
michael@13 12 @@ -34,6 +33,7 @@
michael@13 13 # (Default: KRB5_DIR/include)
michael@13 14 # --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently
michael@13 15 # supported values are "MIT" and "Heimdal". A value is required.
michael@13 16 +# --with-cc compiler to use for $CC (useful if cc is a disguised gcc)
michael@13 17 #
michael@13 18 # --test-sanity Make a number of sanity checks on the data in this file.
michael@13 19 # This is a debugging tool for OpenSSL developers.
michael@428 20 @@ -123,6 +123,7 @@
michael@13 21 #$bits2="THIRTY_TWO_BIT ";
michael@13 22 my $bits1="THIRTY_TWO_BIT ";
michael@13 23 my $bits2="SIXTY_FOUR_BIT ";
michael@13 24 +my $ccarg;
michael@13 25
michael@428 26 my $x86_asm="x86cpuid.o:bn-586.o co-586.o x86-mont.o x86-gf2m.o:des-586.o crypt586.o:aes-586.o vpaes-x86.o aesni-x86.o:bf-586.o:md5-586.o:sha1-586.o sha256-586.o sha512-586.o:cast-586.o:rc4-586.o:rmd-586.o:rc5-586.o:wp_block.o wp-mmx.o:cmll-x86.o:ghash-x86.o:";
michael@428 27
michael@428 28 @@ -460,12 +461,12 @@
michael@13 29
michael@13 30 #### IBM's AIX.
michael@13 31 "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::",
michael@428 32 -"aix-gcc", "gcc:-O -DB_ENDIAN::-pthread:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X32",
michael@428 33 -"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64",
michael@428 34 +"aix-gcc", "gcc:-O -DB_ENDIAN::-pthread:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
michael@428 35 +"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
michael@13 36 # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE
michael@13 37 # at build time. $OBJECT_MODE is respected at ./config stage!
michael@428 38 -"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32",
michael@428 39 -"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64",
michael@428 40 +"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR:${ppc32_asm}:aix32:dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
michael@428 41 +"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR:${ppc64_asm}:aix64:dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::",
michael@428 42
michael@428 43 #
michael@428 44 # Cray T90 and similar (SDSC)
michael@428 45 @@ -828,6 +829,10 @@
michael@13 46 {
michael@428 47 $strict_warnings = 1;
michael@13 48 }
michael@13 49 + elsif (/^--with-cc=(.*)$/)
michael@13 50 + {
michael@13 51 + $ccarg=$1
michael@13 52 + }
michael@13 53 elsif (/^reconfigure/ || /^reconf/)
michael@13 54 {
michael@13 55 if (open(IN,"<$Makefile"))
michael@428 56 @@ -1143,7 +1148,7 @@
michael@13 57 print "IsMK1MF=$IsMK1MF\n";
michael@13 58
michael@13 59 my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1);
michael@13 60 -my $cc = $fields[$idx_cc];
michael@13 61 +my $cc = $ccarg ? $ccarg : $fields[$idx_cc];
michael@428 62 # Allow environment CC to override compiler...
michael@428 63 if($ENV{CC}) {
michael@428 64 $cc = $ENV{CC};
michael@13 65 Index: config
michael@428 66 --- config.orig 2011-11-14 22:12:53.000000000 +0100
michael@428 67 +++ config 2012-06-27 10:10:05.000000000 +0200
michael@428 68 @@ -277,6 +277,9 @@
michael@428 69 Power*)
michael@428 70 echo "ppc-apple-darwin${VERSION}"
michael@428 71 ;;
michael@428 72 + x86_64 )
michael@428 73 + echo "x86_64-apple-darwin${VERSION}"
michael@428 74 + ;;
michael@428 75 *)
michael@428 76 echo "i686-apple-darwin${VERSION}"
michael@428 77 ;;
michael@428 78 @@ -413,7 +416,7 @@
michael@13 79
michael@428 80 # Only set CC if not supplied already
michael@428 81 if [ -z "$CROSS_COMPILE$CC" ]; then
michael@428 82 - GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
michael@428 83 + GCCVER=`sh -c "${CC-gcc} -dumpversion" 2>/dev/null`
michael@428 84 if [ "$GCCVER" != "" ]; then
michael@428 85 # then strip off whatever prefix egcs prepends the number with...
michael@428 86 # Hopefully, this will work for any future prefixes as well.
michael@432 87 @@ -424,8 +427,17 @@
michael@428 88 # peak single digit before and after first dot, e.g. 2.95.1 gives 29
michael@428 89 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
michael@428 90 CC=gcc
michael@428 91 + SUFFIX=gcc
michael@432 92 + else
michael@432 93 + CC=cc
michael@428 94 + SUFFIX=cc
michael@428 95 + fi
michael@428 96 +else
michael@428 97 + if [ "$GCCVER" != "" ]; then
michael@428 98 + SUFFIX=gcc
michael@432 99 else
michael@432 100 CC=cc
michael@432 101 + SUFFIX=cc
michael@428 102 fi
michael@13 103 fi
michael@13 104 GCCVER=${GCCVER:-0}
michael@432 105 @@ -435,7 +447,7 @@
michael@13 106 if [ $GCCVER -ge 30 ]; then
michael@13 107 # PA64 support only came in with gcc 3.0.x.
michael@13 108 # We check if the preprocessor symbol __LP64__ is defined...
michael@13 109 - if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
michael@13 110 + if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
michael@13 111 : # __LP64__ has slipped through, it therefore is not defined
michael@13 112 else
michael@13 113 GCC_BITS="64"
michael@432 114 @@ -446,13 +458,14 @@
michael@13 115 if [ $GCCVER -ge 30 ]; then
michael@13 116 # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
michael@13 117 # to be working, at the very least 'make test' passes...
michael@13 118 - if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
michael@13 119 + if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
michael@13 120 GCC_ARCH="-m64"
michael@13 121 else
michael@13 122 GCC_ARCH="-m32"
michael@13 123 fi
michael@13 124 fi
michael@13 125 # check for WorkShop C, expected output is "cc: blah-blah C x.x"
michael@13 126 + if [ $GCCVER -eq 0 ]; then
michael@13 127 CCVER=`(cc -V 2>&1) 2>/dev/null | \
michael@13 128 egrep -e '^cc: .* C [0-9]\.[0-9]' | \
michael@13 129 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
michael@432 130 @@ -465,6 +478,7 @@
michael@13 131 sleep 5
michael@13 132 fi
michael@13 133 fi
michael@13 134 + fi
michael@13 135 fi
michael@13 136
michael@13 137 if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
michael@432 138 @@ -482,6 +496,7 @@
michael@13 139
michael@13 140 if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
michael@13 141 (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
michael@13 142 + (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc
michael@13 143 fi
michael@13 144
michael@13 145 CCVER=${CCVER:-0}
michael@432 146 @@ -507,7 +522,7 @@
michael@13 147 if [ $CPU -ge 4000 ]; then
michael@13 148 options="$options -mips2"
michael@13 149 fi
michael@13 150 - OUT="irix-$CC"
michael@13 151 + OUT="irix-$SUFFIX"
michael@13 152 ;;
michael@13 153 mips3-sgi-irix)
michael@13 154 #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
michael@432 155 @@ -517,11 +532,11 @@
michael@13 156 #else
michael@13 157 # options="$options -mips3"
michael@13 158 #fi
michael@13 159 - OUT="irix-mips3-$CC"
michael@13 160 + OUT="irix-mips3-$SUFFIX"
michael@13 161 ;;
michael@13 162 mips4-sgi-irix64)
michael@13 163 echo "WARNING! If you wish to build 64-bit library, then you have to"
michael@13 164 - echo " invoke './Configure irix64-mips4-$CC' *manually*."
michael@13 165 + echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*."
michael@13 166 if [ "$TEST" = "false" -a -t 1 ]; then
michael@13 167 echo " You have about 5 seconds to press Ctrl-C to abort."
michael@13 168 (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
michael@432 169 @@ -533,7 +548,7 @@
michael@13 170 #else
michael@13 171 # options="$options -mips3"
michael@13 172 #fi
michael@13 173 - OUT="irix-mips3-$CC"
michael@13 174 + OUT="irix-mips3-$SUFFIX"
michael@13 175 ;;
michael@13 176 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
michael@428 177 ppc-apple-darwin*)
michael@432 178 @@ -566,6 +581,9 @@
michael@428 179 else
michael@428 180 OUT="darwin-i386-cc"
michael@428 181 fi ;;
michael@428 182 + x86_64-apple-darwin*)
michael@428 183 + OUT="darwin64-x86_64-cc"
michael@428 184 + ;;
michael@428 185 armv6+7-*-iphoneos)
michael@428 186 options="$options -arch%20armv6 -arch%20armv7"
michael@428 187 OUT="iphoneos-cross" ;;
michael@432 188 @@ -575,10 +593,10 @@
michael@13 189 alpha-*-linux2)
michael@13 190 ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo`
michael@13 191 case ${ISA:-generic} in
michael@13 192 - *[678]) OUT="linux-alpha+bwx-$CC" ;;
michael@13 193 - *) OUT="linux-alpha-$CC" ;;
michael@13 194 + *[678]) OUT="linux-alpha+bwx-$SUFFIX" ;;
michael@13 195 + *) OUT="linux-alpha-$SUFFIX" ;;
michael@13 196 esac
michael@13 197 - if [ "$CC" = "gcc" ]; then
michael@13 198 + if [ $GCCVER -gt 0 ]; then
michael@13 199 case ${ISA:-generic} in
michael@13 200 EV5|EV45) options="$options -mcpu=ev5";;
michael@13 201 EV56|PCA56) options="$options -mcpu=ev56";;
michael@432 202 @@ -662,7 +680,7 @@
michael@428 203 ;;
michael@13 204 x86_64-*-linux?) OUT="linux-x86_64" ;;
michael@13 205 *86-*-linux2) OUT="linux-elf"
michael@13 206 - if [ "$GCCVER" -gt 28 ]; then
michael@13 207 + if [ $GCCVER -gt 28 ]; then
michael@13 208 if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
michael@13 209 options="$options -march=pentium"
michael@13 210 fi
michael@432 211 @@ -676,17 +694,17 @@
michael@13 212 *-*-linux1) OUT="linux-aout" ;;
michael@13 213 *-*-linux2) OUT="linux-generic32" ;;
michael@13 214 sun4[uv]*-*-solaris2)
michael@13 215 - OUT="solaris-sparcv9-$CC"
michael@13 216 + OUT="solaris-sparcv9-$SUFFIX"
michael@13 217 ISA64=`(isalist) 2>/dev/null | grep sparcv9`
michael@428 218 if [ "$ISA64" != "" -a "$KERNEL_BITS" = "" ]; then
michael@13 219 - if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then
michael@13 220 + if [ $GCCVER -eq 0 -a $CCVER -ge 50 ]; then
michael@13 221 echo "WARNING! If you wish to build 64-bit library, then you have to"
michael@13 222 echo " invoke './Configure solaris64-sparcv9-cc' *manually*."
michael@13 223 if [ "$TEST" = "false" -a -t 1 ]; then
michael@13 224 echo " You have about 5 seconds to press Ctrl-C to abort."
michael@13 225 (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
michael@13 226 fi
michael@13 227 - elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
michael@13 228 + elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then
michael@13 229 # $GCC_ARCH denotes default ABI chosen by compiler driver
michael@13 230 # (first one found on the $PATH). I assume that user
michael@13 231 # expects certain consistency with the rest of his builds
michael@432 232 @@ -712,21 +730,21 @@
michael@428 233 OUT="solaris64-sparcv9-$CC"
michael@13 234 fi
michael@13 235 ;;
michael@13 236 - sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
michael@13 237 - sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
michael@13 238 - sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;;
michael@13 239 + sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;;
michael@13 240 + sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;;
michael@13 241 + sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;;
michael@13 242 *86*-*-solaris2)
michael@13 243 ISA64=`(isalist) 2>/dev/null | grep amd64`
michael@432 244 if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then
michael@13 245 - OUT="solaris64-x86_64-$CC"
michael@13 246 + OUT="solaris64-x86_64-$SUFFIX"
michael@13 247 else
michael@13 248 - OUT="solaris-x86-$CC"
michael@13 249 + OUT="solaris-x86-$SUFFIX"
michael@13 250 if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
michael@13 251 options="$options no-sse2"
michael@13 252 fi
michael@13 253 fi
michael@13 254 ;;
michael@13 255 - *-*-sunos4) OUT="sunos-$CC" ;;
michael@13 256 + *-*-sunos4) OUT="sunos-$SUFFIX" ;;
michael@13 257
michael@13 258 *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;;
michael@13 259 alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
michael@432 260 @@ -750,7 +768,7 @@
michael@13 261 *-*-osf) OUT="osf1-alpha-cc" ;;
michael@13 262 *-*-tru64) OUT="tru64-alpha-cc" ;;
michael@13 263 *-*-[Uu]nix[Ww]are7)
michael@13 264 - if [ "$CC" = "gcc" ]; then
michael@13 265 + if [ $GCCVER -gt 0 ]; then
michael@13 266 OUT="unixware-7-gcc" ; options="$options no-sse2"
michael@13 267 else
michael@13 268 OUT="unixware-7" ; options="$options no-sse2 -D__i386__"
michael@432 269 @@ -761,12 +779,12 @@
michael@13 270 *-*-vos)
michael@13 271 options="$options no-threads no-shared no-asm no-dso"
michael@13 272 EXE=".pm"
michael@13 273 - OUT="vos-$CC" ;;
michael@13 274 + OUT="vos-$SUFFIX" ;;
michael@13 275 BS2000-siemens-sysv4) OUT="BS2000-OSD" ;;
michael@13 276 RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
michael@13 277 *-siemens-sysv4) OUT="SINIX" ;;
michael@13 278 *-hpux1*)
michael@13 279 - if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
michael@13 280 + if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then
michael@13 281 OUT="hpux64-parisc2-gcc"
michael@13 282 fi
michael@428 283 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
michael@432 284 @@ -781,8 +799,8 @@
michael@428 285 OUT="hpux-ia64-cc"
michael@428 286 fi
michael@13 287 elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
michael@13 288 - OUT=${OUT:-"hpux-parisc2-${CC}"}
michael@13 289 - if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
michael@13 290 + OUT=${OUT:-"hpux-parisc2-${SUFFIX}"}
michael@13 291 + if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then
michael@13 292 echo "WARNING! If you wish to build 64-bit library then you have to"
michael@13 293 echo " invoke './Configure hpux64-parisc2-cc' *manually*."
michael@13 294 if [ "$TEST" = "false" -a -t 1 ]; then
michael@432 295 @@ -791,9 +809,9 @@
michael@13 296 fi
michael@13 297 fi
michael@13 298 elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU
michael@13 299 - OUT="hpux-parisc-${CC}"
michael@13 300 + OUT="hpux-parisc-${SUFFIX}"
michael@13 301 elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU
michael@13 302 - OUT="hpux-parisc-${CC}"
michael@13 303 + OUT="hpux-parisc-${SUFFIX}"
michael@13 304 else # Motorola(?) CPU
michael@428 305 OUT="hpux-$CC"
michael@13 306 fi
michael@432 307 @@ -803,7 +821,7 @@
michael@428 308 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
michael@13 309 KERNEL_BITS=${KERNEL_BITS:-32}
michael@13 310 OBJECT_MODE=${OBJECT_MODE:-32}
michael@13 311 - if [ "$CC" = "gcc" ]; then
michael@13 312 + if [ $GCCVER -gt 0 ]; then
michael@13 313 OUT="aix-gcc"
michael@428 314 if [ $OBJECT_MODE -eq 64 ]; then
michael@428 315 echo 'Your $OBJECT_MODE was found to be set to 64'
michael@432 316 @@ -913,7 +931,7 @@
michael@13 317 #fi
michael@13 318
michael@13 319 if [ -z "$OUT" ]; then
michael@13 320 - OUT="$CC"
michael@13 321 + OUT="$SUFFIX"
michael@13 322 fi
michael@13 323
michael@13 324 if [ ".$PERL" = . ] ; then
michael@432 325 @@ -945,9 +963,9 @@
michael@13 326 # compiler for the platform ... in which case we add it on
michael@13 327 # the end ... otherwise we leave it off
michael@13 328
michael@13 329 -$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
michael@13 330 +$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null
michael@13 331 if [ $? = "0" ]; then
michael@13 332 - OUT="$OUT-$CC"
michael@13 333 + OUT="$OUT-$SUFFIX"
michael@13 334 fi
michael@13 335
michael@13 336 OUT="$PREFIX$OUT"
michael@432 337 @@ -957,9 +975,9 @@
michael@13 338 echo Configuring for $OUT
michael@13 339
michael@13 340 if [ "$TEST" = "true" ]; then
michael@13 341 - echo $PERL ./Configure $OUT $options
michael@13 342 + echo $PERL ./Configure $OUT --with-cc=$CC $options
michael@13 343 else
michael@13 344 - $PERL ./Configure $OUT $options
michael@13 345 + $PERL ./Configure $OUT --with-cc=$CC $options
michael@13 346 fi
michael@13 347 else
michael@13 348 echo "This system ($OUT) is not supported. See file INSTALL for details."
michael@428 349 Index: crypto/aes/asm/aesni-sha1-x86_64.pl
michael@428 350 --- crypto/aes/asm/aesni-sha1-x86_64.pl.orig 2011-08-23 22:53:31.000000000 +0200
michael@428 351 +++ crypto/aes/asm/aesni-sha1-x86_64.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 352 @@ -206,7 +206,7 @@
michael@428 353 ___
michael@428 354
michael@428 355 my $aesenc=sub {
michael@428 356 - use integer;
michael@428 357 +
michael@428 358 my ($n,$k)=($r/10,$r%10);
michael@428 359 if ($k==0) {
michael@428 360 $code.=<<___;
michael@428 361 @@ -249,7 +249,7 @@
michael@428 362 };
michael@428 363
michael@428 364 sub Xupdate_ssse3_16_31() # recall that $Xi starts wtih 4
michael@428 365 -{ use integer;
michael@428 366 +{
michael@428 367 my $body = shift;
michael@428 368 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 369 my ($a,$b,$c,$d,$e);
michael@428 370 @@ -330,7 +330,7 @@
michael@428 371 }
michael@428 372
michael@428 373 sub Xupdate_ssse3_32_79()
michael@428 374 -{ use integer;
michael@428 375 +{
michael@428 376 my $body = shift;
michael@428 377 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 378 my ($a,$b,$c,$d,$e);
michael@428 379 @@ -397,7 +397,7 @@
michael@428 380 }
michael@428 381
michael@428 382 sub Xuplast_ssse3_80()
michael@428 383 -{ use integer;
michael@428 384 +{
michael@428 385 my $body = shift;
michael@428 386 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 387 my ($a,$b,$c,$d,$e);
michael@428 388 @@ -431,7 +431,7 @@
michael@428 389 }
michael@428 390
michael@428 391 sub Xloop_ssse3()
michael@428 392 -{ use integer;
michael@428 393 +{
michael@428 394 my $body = shift;
michael@428 395 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 396 my ($a,$b,$c,$d,$e);
michael@428 397 @@ -456,7 +456,7 @@
michael@428 398 }
michael@428 399
michael@428 400 sub Xtail_ssse3()
michael@428 401 -{ use integer;
michael@428 402 +{
michael@428 403 my $body = shift;
michael@428 404 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 405 my ($a,$b,$c,$d,$e);
michael@428 406 @@ -465,7 +465,7 @@
michael@428 407 }
michael@428 408
michael@428 409 sub body_00_19 () {
michael@428 410 - use integer;
michael@428 411 +
michael@428 412 my ($k,$n);
michael@428 413 my @r=(
michael@428 414 '($a,$b,$c,$d,$e)=@V;'.
michael@428 415 @@ -488,7 +488,7 @@
michael@428 416 }
michael@428 417
michael@428 418 sub body_20_39 () {
michael@428 419 - use integer;
michael@428 420 +
michael@428 421 my ($k,$n);
michael@428 422 my @r=(
michael@428 423 '($a,$b,$c,$d,$e)=@V;'.
michael@428 424 @@ -509,7 +509,7 @@
michael@428 425 }
michael@428 426
michael@428 427 sub body_40_59 () {
michael@428 428 - use integer;
michael@428 429 +
michael@428 430 my ($k,$n);
michael@428 431 my @r=(
michael@428 432 '($a,$b,$c,$d,$e)=@V;'.
michael@428 433 @@ -723,7 +723,7 @@
michael@428 434 ___
michael@428 435
michael@428 436 my $aesenc=sub {
michael@428 437 - use integer;
michael@428 438 +
michael@428 439 my ($n,$k)=($r/10,$r%10);
michael@428 440 if ($k==0) {
michael@428 441 $code.=<<___;
michael@428 442 @@ -766,7 +766,7 @@
michael@428 443 };
michael@428 444
michael@428 445 sub Xupdate_avx_16_31() # recall that $Xi starts wtih 4
michael@428 446 -{ use integer;
michael@428 447 +{
michael@428 448 my $body = shift;
michael@428 449 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 450 my ($a,$b,$c,$d,$e);
michael@428 451 @@ -842,7 +842,7 @@
michael@428 452 }
michael@428 453
michael@428 454 sub Xupdate_avx_32_79()
michael@428 455 -{ use integer;
michael@428 456 +{
michael@428 457 my $body = shift;
michael@428 458 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 459 my ($a,$b,$c,$d,$e);
michael@428 460 @@ -907,7 +907,7 @@
michael@428 461 }
michael@428 462
michael@428 463 sub Xuplast_avx_80()
michael@428 464 -{ use integer;
michael@428 465 +{
michael@428 466 my $body = shift;
michael@428 467 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 468 my ($a,$b,$c,$d,$e);
michael@428 469 @@ -941,7 +941,7 @@
michael@428 470 }
michael@428 471
michael@428 472 sub Xloop_avx()
michael@428 473 -{ use integer;
michael@428 474 +{
michael@428 475 my $body = shift;
michael@428 476 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 477 my ($a,$b,$c,$d,$e);
michael@428 478 @@ -965,7 +965,7 @@
michael@428 479 }
michael@428 480
michael@428 481 sub Xtail_avx()
michael@428 482 -{ use integer;
michael@428 483 +{
michael@428 484 my $body = shift;
michael@428 485 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 486 my ($a,$b,$c,$d,$e);
michael@428 487 Index: crypto/asn1/charmap.pl
michael@428 488 --- crypto/asn1/charmap.pl.orig 2000-07-28 03:58:11.000000000 +0200
michael@428 489 +++ crypto/asn1/charmap.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 490 @@ -1,7 +1,5 @@
michael@428 491 #!/usr/local/bin/perl -w
michael@428 492
michael@428 493 -use strict;
michael@428 494 -
michael@428 495 my ($i, @arr);
michael@428 496
michael@428 497 # Set up an array with the type of ASCII characters
michael@428 498 Index: crypto/bn/asm/modexp512-x86_64.pl
michael@428 499 --- crypto/bn/asm/modexp512-x86_64.pl.orig 2011-12-12 16:12:09.000000000 +0100
michael@428 500 +++ crypto/bn/asm/modexp512-x86_64.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 501 @@ -70,7 +70,6 @@
michael@428 502
michael@428 503 open STDOUT,"| $^X $xlate $flavour $output";
michael@428 504
michael@428 505 -use strict;
michael@428 506 my $code=".text\n\n";
michael@428 507 my $m=0;
michael@428 508
michael@428 509 Index: crypto/md5/asm/md5-x86_64.pl
michael@428 510 --- crypto/md5/asm/md5-x86_64.pl.orig 2008-12-19 12:17:27.000000000 +0100
michael@428 511 +++ crypto/md5/asm/md5-x86_64.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 512 @@ -7,8 +7,6 @@
michael@428 513 # in the public domain.
michael@428 514 #
michael@428 515
michael@428 516 -use strict;
michael@428 517 -
michael@428 518 my $code;
michael@428 519
michael@428 520 # round1_step() does:
michael@13 521 Index: crypto/objects/obj_dat.pl
michael@428 522 --- crypto/objects/obj_dat.pl.orig 2007-09-18 23:05:21.000000000 +0200
michael@428 523 +++ crypto/objects/obj_dat.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 524 @@ -2,7 +2,6 @@
michael@428 525
michael@428 526 # fixes bug in floating point emulation on sparc64 when
michael@428 527 # this script produces off-by-one output on sparc64
michael@428 528 -use integer;
michael@428 529
michael@428 530 sub obj_cmp
michael@428 531 {
michael@428 532 Index: crypto/objects/objxref.pl
michael@428 533 --- crypto/objects/objxref.pl.orig 2009-04-06 18:16:23.000000000 +0200
michael@428 534 +++ crypto/objects/objxref.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 535 @@ -1,7 +1,5 @@
michael@13 536 #!/usr/local/bin/perl
michael@13 537
michael@428 538 -use strict;
michael@13 539 -
michael@428 540 my %xref_tbl;
michael@428 541 my %oid_tbl;
michael@428 542
michael@428 543 Index: crypto/perlasm/x86_64-xlate.pl
michael@428 544 --- crypto/perlasm/x86_64-xlate.pl.orig 2012-03-13 20:19:31.000000000 +0100
michael@428 545 +++ crypto/perlasm/x86_64-xlate.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 546 @@ -248,7 +248,6 @@
michael@428 547
michael@428 548 # Solaris /usr/ccs/bin/as can't handle multiplications
michael@428 549 # in $self->{label}, new gas requires sign extension...
michael@428 550 - use integer;
michael@428 551 $self->{label} =~ s/(?<![\w\$\.])(0x?[0-9a-f]+)/oct($1)/egi;
michael@428 552 $self->{label} =~ s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/eg;
michael@428 553 $self->{label} =~ s/([0-9]+)/$1<<32>>32/eg;
michael@428 554 Index: crypto/sha/asm/sha1-586.pl
michael@428 555 --- crypto/sha/asm/sha1-586.pl.orig 2011-06-28 15:53:49.000000000 +0200
michael@428 556 +++ crypto/sha/asm/sha1-586.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 557 @@ -523,7 +523,7 @@
michael@428 558 # round]...
michael@428 559 #
michael@428 560 sub Xupdate_ssse3_16_31() # recall that $Xi starts wtih 4
michael@428 561 -{ use integer;
michael@428 562 +{
michael@428 563 my $body = shift;
michael@428 564 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 565 my ($a,$b,$c,$d,$e);
michael@428 566 @@ -607,7 +607,7 @@
michael@428 567 }
michael@428 568
michael@428 569 sub Xupdate_ssse3_32_79()
michael@428 570 -{ use integer;
michael@428 571 +{
michael@428 572 my $body = shift;
michael@428 573 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 574 my ($a,$b,$c,$d,$e);
michael@428 575 @@ -675,7 +675,7 @@
michael@428 576 }
michael@428 577
michael@428 578 sub Xuplast_ssse3_80()
michael@428 579 -{ use integer;
michael@428 580 +{
michael@428 581 my $body = shift;
michael@428 582 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 583 my ($a,$b,$c,$d,$e);
michael@428 584 @@ -710,7 +710,7 @@
michael@428 585 }
michael@428 586
michael@428 587 sub Xloop_ssse3()
michael@428 588 -{ use integer;
michael@428 589 +{
michael@428 590 my $body = shift;
michael@428 591 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 592 my ($a,$b,$c,$d,$e);
michael@428 593 @@ -735,7 +735,7 @@
michael@428 594 }
michael@428 595
michael@428 596 sub Xtail_ssse3()
michael@428 597 -{ use integer;
michael@428 598 +{
michael@428 599 my $body = shift;
michael@428 600 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 601 my ($a,$b,$c,$d,$e);
michael@428 602 @@ -945,7 +945,7 @@
michael@428 603 &jmp (&label("loop"));
michael@428 604
michael@428 605 sub Xupdate_avx_16_31() # recall that $Xi starts wtih 4
michael@428 606 -{ use integer;
michael@428 607 +{
michael@428 608 my $body = shift;
michael@428 609 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 610 my ($a,$b,$c,$d,$e);
michael@428 611 @@ -1023,7 +1023,7 @@
michael@428 612 }
michael@428 613
michael@428 614 sub Xupdate_avx_32_79()
michael@428 615 -{ use integer;
michael@428 616 +{
michael@428 617 my $body = shift;
michael@428 618 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 619 my ($a,$b,$c,$d,$e);
michael@428 620 @@ -1088,7 +1088,7 @@
michael@428 621 }
michael@428 622
michael@428 623 sub Xuplast_avx_80()
michael@428 624 -{ use integer;
michael@428 625 +{
michael@428 626 my $body = shift;
michael@428 627 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 628 my ($a,$b,$c,$d,$e);
michael@428 629 @@ -1123,7 +1123,7 @@
michael@428 630 }
michael@428 631
michael@428 632 sub Xloop_avx()
michael@428 633 -{ use integer;
michael@428 634 +{
michael@428 635 my $body = shift;
michael@428 636 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 637 my ($a,$b,$c,$d,$e);
michael@428 638 @@ -1147,7 +1147,7 @@
michael@428 639 }
michael@428 640
michael@428 641 sub Xtail_avx()
michael@428 642 -{ use integer;
michael@428 643 +{
michael@428 644 my $body = shift;
michael@428 645 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 646 my ($a,$b,$c,$d,$e);
michael@428 647 Index: crypto/sha/asm/sha1-x86_64.pl
michael@428 648 --- crypto/sha/asm/sha1-x86_64.pl.orig 2011-07-04 15:01:42.000000000 +0200
michael@428 649 +++ crypto/sha/asm/sha1-x86_64.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 650 @@ -367,7 +367,7 @@
michael@428 651 }
michael@428 652
michael@428 653 sub Xupdate_ssse3_16_31() # recall that $Xi starts wtih 4
michael@428 654 -{ use integer;
michael@428 655 +{
michael@428 656 my $body = shift;
michael@428 657 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 658 my ($a,$b,$c,$d,$e);
michael@428 659 @@ -448,7 +448,7 @@
michael@428 660 }
michael@428 661
michael@428 662 sub Xupdate_ssse3_32_79()
michael@428 663 -{ use integer;
michael@428 664 +{
michael@428 665 my $body = shift;
michael@428 666 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 667 my ($a,$b,$c,$d,$e);
michael@428 668 @@ -515,7 +515,7 @@
michael@428 669 }
michael@428 670
michael@428 671 sub Xuplast_ssse3_80()
michael@428 672 -{ use integer;
michael@428 673 +{
michael@428 674 my $body = shift;
michael@428 675 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 676 my ($a,$b,$c,$d,$e);
michael@428 677 @@ -549,7 +549,7 @@
michael@428 678 }
michael@428 679
michael@428 680 sub Xloop_ssse3()
michael@428 681 -{ use integer;
michael@428 682 +{
michael@428 683 my $body = shift;
michael@428 684 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 685 my ($a,$b,$c,$d,$e);
michael@428 686 @@ -574,7 +574,7 @@
michael@428 687 }
michael@428 688
michael@428 689 sub Xtail_ssse3()
michael@428 690 -{ use integer;
michael@428 691 +{
michael@428 692 my $body = shift;
michael@428 693 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 694 my ($a,$b,$c,$d,$e);
michael@428 695 @@ -778,7 +778,7 @@
michael@428 696 ___
michael@428 697
michael@428 698 sub Xupdate_avx_16_31() # recall that $Xi starts wtih 4
michael@428 699 -{ use integer;
michael@428 700 +{
michael@428 701 my $body = shift;
michael@428 702 my @insns = (&$body,&$body,&$body,&$body); # 40 instructions
michael@428 703 my ($a,$b,$c,$d,$e);
michael@428 704 @@ -854,7 +854,7 @@
michael@428 705 }
michael@428 706
michael@428 707 sub Xupdate_avx_32_79()
michael@428 708 -{ use integer;
michael@428 709 +{
michael@428 710 my $body = shift;
michael@428 711 my @insns = (&$body,&$body,&$body,&$body); # 32 to 48 instructions
michael@428 712 my ($a,$b,$c,$d,$e);
michael@428 713 @@ -919,7 +919,7 @@
michael@428 714 }
michael@428 715
michael@428 716 sub Xuplast_avx_80()
michael@428 717 -{ use integer;
michael@428 718 +{
michael@428 719 my $body = shift;
michael@428 720 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 721 my ($a,$b,$c,$d,$e);
michael@428 722 @@ -953,7 +953,7 @@
michael@428 723 }
michael@428 724
michael@428 725 sub Xloop_avx()
michael@428 726 -{ use integer;
michael@428 727 +{
michael@428 728 my $body = shift;
michael@428 729 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 730 my ($a,$b,$c,$d,$e);
michael@428 731 @@ -977,7 +977,7 @@
michael@428 732 }
michael@428 733
michael@428 734 sub Xtail_avx()
michael@428 735 -{ use integer;
michael@428 736 +{
michael@428 737 my $body = shift;
michael@428 738 my @insns = (&$body,&$body,&$body,&$body); # 32 instructions
michael@428 739 my ($a,$b,$c,$d,$e);
michael@428 740 Index: util/clean-depend.pl
michael@428 741 --- util/clean-depend.pl.orig 2007-09-19 16:53:18.000000000 +0200
michael@428 742 +++ util/clean-depend.pl 2012-06-27 10:10:05.000000000 +0200
michael@428 743 @@ -2,8 +2,6 @@
michael@428 744 # Clean the dependency list in a makefile of standard includes...
michael@428 745 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
michael@428 746
michael@428 747 -use strict;
michael@428 748 -
michael@428 749 while(<STDIN>) {
michael@428 750 print;
michael@428 751 last if /^# DO NOT DELETE THIS LINE/;
michael@13 752 Index: util/mklink.pl
michael@428 753 --- util/mklink.pl.orig 2008-12-19 14:35:09.000000000 +0100
michael@428 754 +++ util/mklink.pl 2012-06-27 10:10:05.000000000 +0200
michael@13 755 @@ -15,13 +15,12 @@
michael@13 756 # Apart from this, this script should be able to handle even the most
michael@13 757 # pathological cases.
michael@13 758
michael@13 759 -use Cwd;
michael@13 760 -
michael@13 761 my $from = shift;
michael@13 762 my @files = @ARGV;
michael@13 763
michael@13 764 my @from_path = split(/[\\\/]/, $from);
michael@13 765 -my $pwd = getcwd();
michael@13 766 +my $pwd = `pwd`;
michael@428 767 +$pwd =~ s/\r?\n$//s;
michael@13 768 chomp($pwd);
michael@13 769 my @pwd_path = split(/[\\\/]/, $pwd);
michael@13 770

mercurial