michael@13: Index: Configure michael@13: --- Configure.orig 2007-09-16 14:24:17 +0200 michael@13: +++ Configure 2007-10-17 12:14:14 +0200 michael@13: @@ -6,7 +6,6 @@ michael@13: ## michael@13: michael@13: require 5.000; michael@13: -use strict; michael@13: michael@13: # see INSTALL for instructions. michael@13: michael@13: @@ -34,6 +33,7 @@ michael@13: # (Default: KRB5_DIR/include) michael@13: # --with-krb5-flavor Declare what flavor of Kerberos 5 is used. Currently michael@13: # supported values are "MIT" and "Heimdal". A value is required. michael@13: +# --with-cc compiler to use for $CC (useful if cc is a disguised gcc) michael@13: # michael@13: # --test-sanity Make a number of sanity checks on the data in this file. michael@13: # This is a debugging tool for OpenSSL developers. michael@13: @@ -113,6 +113,7 @@ michael@13: #$bits2="THIRTY_TWO_BIT "; michael@13: my $bits1="THIRTY_TWO_BIT "; michael@13: my $bits2="SIXTY_FOUR_BIT "; michael@13: +my $ccarg; michael@13: michael@13: my $x86_elf_asm="x86cpuid-elf.o:bn86-elf.o co86-elf.o:dx86-elf.o yx86-elf.o:ax86-elf.o:bx86-elf.o:mx86-elf.o:sx86-elf.o s512sse2-elf.o:cx86-elf.o:rx86-elf.o:rm86-elf.o:r586-elf.o"; michael@13: my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o"; michael@13: @@ -402,8 +403,8 @@ michael@13: michael@13: #### IBM's AIX. michael@13: "aix3-cc", "cc:-O -DB_ENDIAN -qmaxmem=16384::(unknown):AIX::BN_LLONG RC4_CHAR:::", michael@13: -"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", michael@13: -"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", michael@13: +"aix-gcc", "gcc:-O -DB_ENDIAN::-D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared:::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", michael@13: +"aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::", michael@13: # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE michael@13: # at build time. $OBJECT_MODE is respected at ./config stage! michael@13: "aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", michael@13: @@ -697,6 +698,10 @@ michael@13: { michael@13: exit(&test_sanity()); michael@13: } michael@13: + elsif (/^--with-cc=(.*)$/) michael@13: + { michael@13: + $ccarg=$1 michael@13: + } michael@13: elsif (/^reconfigure/ || /^reconf/) michael@13: { michael@13: if (open(IN,"<$Makefile")) michael@13: @@ -949,7 +954,7 @@ michael@13: print "IsMK1MF=$IsMK1MF\n"; michael@13: michael@13: my @fields = split(/\s*:\s*/,$table{$target} . ":" x 30 , -1); michael@13: -my $cc = $fields[$idx_cc]; michael@13: +my $cc = $ccarg ? $ccarg : $fields[$idx_cc]; michael@13: my $cflags = $fields[$idx_cflags]; michael@13: my $unistd = $fields[$idx_unistd]; michael@13: my $thread_cflag = $fields[$idx_thread_cflag]; michael@13: Index: config michael@13: --- config.orig 2007-08-01 13:21:35 +0200 michael@13: +++ config 2007-10-17 12:13:48 +0200 michael@13: @@ -401,9 +401,9 @@ michael@13: michael@13: # figure out if gcc is available and if so we use it otherwise michael@13: # we fallback to whatever cc does on the system michael@13: -GCCVER=`(gcc -dumpversion) 2>/dev/null` michael@13: +GCCVER=`(gcc -dumpversion 2>/dev/null && exit; cc --version 2>/dev/null | grep GCC >/dev/null && cc -dumpversion )` michael@13: if [ "$GCCVER" != "" ]; then michael@13: - CC=gcc michael@13: + CC=cc; gcc -dumpversion >/dev/null 2>&1 && CC=gcc michael@13: # then strip off whatever prefix egcs prepends the number with... michael@13: # Hopefully, this will work for any future prefixes as well. michael@13: GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'` michael@13: @@ -412,8 +412,10 @@ michael@13: # major and minor version numbers. michael@13: # peak single digit before and after first dot, e.g. 2.95.1 gives 29 michael@13: GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` michael@13: + SUFFIX=gcc michael@13: else michael@13: CC=cc michael@13: + SUFFIX=cc michael@13: fi michael@13: GCCVER=${GCCVER:-0} michael@13: if [ "$SYSTEM" = "HP-UX" ];then michael@13: @@ -422,7 +424,7 @@ michael@13: if [ $GCCVER -ge 30 ]; then michael@13: # PA64 support only came in with gcc 3.0.x. michael@13: # We check if the preprocessor symbol __LP64__ is defined... michael@13: - if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then michael@13: + if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then michael@13: : # __LP64__ has slipped through, it therefore is not defined michael@13: else michael@13: GCC_BITS="64" michael@13: @@ -433,13 +435,14 @@ michael@13: if [ $GCCVER -ge 30 ]; then michael@13: # 64-bit ABI isn't officially supported in gcc 3.0, but it appears michael@13: # to be working, at the very least 'make test' passes... michael@13: - if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then michael@13: + if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then michael@13: GCC_ARCH="-m64" michael@13: else michael@13: GCC_ARCH="-m32" michael@13: fi michael@13: fi michael@13: # check for WorkShop C, expected output is "cc: blah-blah C x.x" michael@13: + if [ $GCCVER -eq 0 ]; then michael@13: CCVER=`(cc -V 2>&1) 2>/dev/null | \ michael@13: egrep -e '^cc: .* C [0-9]\.[0-9]' | \ michael@13: sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` michael@13: @@ -452,6 +455,7 @@ michael@13: sleep 5 michael@13: fi michael@13: fi michael@13: + fi michael@13: fi michael@13: michael@13: if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then michael@13: @@ -469,6 +473,7 @@ michael@13: michael@13: if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc michael@13: (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc michael@13: + (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc michael@13: fi michael@13: michael@13: CCVER=${CCVER:-0} michael@13: @@ -488,7 +493,7 @@ michael@13: if [ $CPU -ge 4000 ]; then michael@13: options="$options -mips2" michael@13: fi michael@13: - OUT="irix-$CC" michael@13: + OUT="irix-$SUFFIX" michael@13: ;; michael@13: mips3-sgi-irix) michael@13: #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` michael@13: @@ -498,11 +503,11 @@ michael@13: #else michael@13: # options="$options -mips3" michael@13: #fi michael@13: - OUT="irix-mips3-$CC" michael@13: + OUT="irix-mips3-$SUFFIX" michael@13: ;; michael@13: mips4-sgi-irix64) michael@13: echo "WARNING! If you wish to build 64-bit library, then you have to" michael@13: - echo " invoke './Configure irix64-mips4-$CC' *manually*." michael@13: + echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*." michael@13: if [ "$TEST" = "false" -a -t 1 ]; then michael@13: echo " You have about 5 seconds to press Ctrl-C to abort." michael@13: (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 michael@13: @@ -514,7 +519,7 @@ michael@13: #else michael@13: # options="$options -mips3" michael@13: #fi michael@13: - OUT="irix-mips3-$CC" michael@13: + OUT="irix-mips3-$SUFFIX" michael@13: ;; michael@13: ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; michael@13: ppc-apple-darwin*) OUT="darwin-ppc-cc" ;; michael@13: @@ -522,10 +527,10 @@ michael@13: alpha-*-linux2) michael@13: ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` michael@13: case ${ISA:-generic} in michael@13: - *[678]) OUT="linux-alpha+bwx-$CC" ;; michael@13: - *) OUT="linux-alpha-$CC" ;; michael@13: + *[678]) OUT="linux-alpha+bwx-$SUFFIX" ;; michael@13: + *) OUT="linux-alpha-$SUFFIX" ;; michael@13: esac michael@13: - if [ "$CC" = "gcc" ]; then michael@13: + if [ $GCCVER -gt 0 ]; then michael@13: case ${ISA:-generic} in michael@13: EV5|EV45) options="$options -mcpu=ev5";; michael@13: EV56|PCA56) options="$options -mcpu=ev56";; michael@13: @@ -592,7 +597,7 @@ michael@13: s390x-*-linux2) OUT="linux-generic64"; options="$options -DB_ENDIAN" ;; michael@13: x86_64-*-linux?) OUT="linux-x86_64" ;; michael@13: *86-*-linux2) OUT="linux-elf" michael@13: - if [ "$GCCVER" -gt 28 ]; then michael@13: + if [ $GCCVER -gt 28 ]; then michael@13: if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then michael@13: options="$options -march=pentium" michael@13: fi michael@13: @@ -606,17 +611,17 @@ michael@13: *-*-linux1) OUT="linux-aout" ;; michael@13: *-*-linux2) OUT="linux-generic32" ;; michael@13: sun4[uv]*-*-solaris2) michael@13: - OUT="solaris-sparcv9-$CC" michael@13: + OUT="solaris-sparcv9-$SUFFIX" michael@13: ISA64=`(isalist) 2>/dev/null | grep sparcv9` michael@13: if [ "$ISA64" != "" ]; then michael@13: - if [ "$CC" = "cc" -a $CCVER -ge 50 ]; then michael@13: + if [ $GCCVER -eq 0 -a $CCVER -ge 50 ]; then michael@13: echo "WARNING! If you wish to build 64-bit library, then you have to" michael@13: echo " invoke './Configure solaris64-sparcv9-cc' *manually*." michael@13: if [ "$TEST" = "false" -a -t 1 ]; then michael@13: echo " You have about 5 seconds to press Ctrl-C to abort." michael@13: (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 michael@13: fi michael@13: - elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then michael@13: + elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then michael@13: # $GCC_ARCH denotes default ABI chosen by compiler driver michael@13: # (first one found on the $PATH). I assume that user michael@13: # expects certain consistency with the rest of his builds michael@13: @@ -639,21 +644,21 @@ michael@13: fi michael@13: fi michael@13: ;; michael@13: - sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; michael@13: - sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; michael@13: - sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; michael@13: + sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; michael@13: + sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; michael@13: + sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;; michael@13: *86*-*-solaris2) michael@13: ISA64=`(isalist) 2>/dev/null | grep amd64` michael@13: - if [ "$ISA64" != "" ]; then michael@13: - OUT="solaris64-x86_64-$CC" michael@13: + if [ "$ISA64" != "" -a $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then michael@13: + OUT="solaris64-x86_64-$SUFFIX" michael@13: else michael@13: - OUT="solaris-x86-$CC" michael@13: + OUT="solaris-x86-$SUFFIX" michael@13: if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then michael@13: options="$options no-sse2" michael@13: fi michael@13: fi michael@13: ;; michael@13: - *-*-sunos4) OUT="sunos-$CC" ;; michael@13: + *-*-sunos4) OUT="sunos-$SUFFIX" ;; michael@13: michael@13: *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; michael@13: alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;; michael@13: @@ -677,7 +682,7 @@ michael@13: *-*-osf) OUT="osf1-alpha-cc" ;; michael@13: *-*-tru64) OUT="tru64-alpha-cc" ;; michael@13: *-*-[Uu]nix[Ww]are7) michael@13: - if [ "$CC" = "gcc" ]; then michael@13: + if [ $GCCVER -gt 0 ]; then michael@13: OUT="unixware-7-gcc" ; options="$options no-sse2" michael@13: else michael@13: OUT="unixware-7" ; options="$options no-sse2 -D__i386__" michael@13: @@ -688,12 +693,12 @@ michael@13: *-*-vos) michael@13: options="$options no-threads no-shared no-asm no-dso" michael@13: EXE=".pm" michael@13: - OUT="vos-$CC" ;; michael@13: + OUT="vos-$SUFFIX" ;; michael@13: BS2000-siemens-sysv4) OUT="BS2000-OSD" ;; michael@13: RM*-siemens-sysv4) OUT="ReliantUNIX" ;; michael@13: *-siemens-sysv4) OUT="SINIX" ;; michael@13: *-hpux1*) michael@13: - if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then michael@13: + if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then michael@13: OUT="hpux64-parisc2-gcc" michael@13: fi michael@13: KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` michael@13: @@ -711,8 +716,8 @@ michael@13: fi michael@13: OUT="hpux64-ia64-cc" michael@13: elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU michael@13: - OUT=${OUT:-"hpux-parisc2-${CC}"} michael@13: - if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then michael@13: + OUT=${OUT:-"hpux-parisc2-${SUFFIX}"} michael@13: + if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then michael@13: echo "WARNING! If you wish to build 64-bit library then you have to" michael@13: echo " invoke './Configure hpux64-parisc2-cc' *manually*." michael@13: if [ "$TEST" = "false" -a -t 1 ]; then michael@13: @@ -721,19 +726,19 @@ michael@13: fi michael@13: fi michael@13: elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU michael@13: - OUT="hpux-parisc-${CC}" michael@13: + OUT="hpux-parisc-${SUFFIX}" michael@13: elif [ $CPU_VERSION -ge 523 ]; then # PA-RISC 1.0 CPU michael@13: - OUT="hpux-parisc-${CC}" michael@13: + OUT="hpux-parisc-${SUFFIX}" michael@13: else # Motorola(?) CPU michael@13: - OUT="hpux-$CC" michael@13: + OUT="hpux-$SUFFIX" michael@13: fi michael@13: options="$options -D_REENTRANT" ;; michael@13: - *-hpux) OUT="hpux-parisc-$CC" ;; michael@13: + *-hpux) OUT="hpux-parisc-$SUFFIX" ;; michael@13: *-aix) michael@13: KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` michael@13: KERNEL_BITS=${KERNEL_BITS:-32} michael@13: OBJECT_MODE=${OBJECT_MODE:-32} michael@13: - if [ "$CC" = "gcc" ]; then michael@13: + if [ $GCCVER -gt 0 ]; then michael@13: OUT="aix-gcc" michael@13: elif [ $OBJECT_MODE -eq 64 ]; then michael@13: echo 'Your $OBJECT_MODE was found to be set to 64' michael@13: @@ -828,7 +833,7 @@ michael@13: #fi michael@13: michael@13: if [ -z "$OUT" ]; then michael@13: - OUT="$CC" michael@13: + OUT="$SUFFIX" michael@13: fi michael@13: michael@13: if [ ".$PERL" = . ] ; then michael@13: @@ -860,9 +865,9 @@ michael@13: # compiler for the platform ... in which case we add it on michael@13: # the end ... otherwise we leave it off michael@13: michael@13: -$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null michael@13: +$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null michael@13: if [ $? = "0" ]; then michael@13: - OUT="$OUT-$CC" michael@13: + OUT="$OUT-$SUFFIX" michael@13: fi michael@13: michael@13: OUT="$PREFIX$OUT" michael@13: @@ -872,9 +877,9 @@ michael@13: echo Configuring for $OUT michael@13: michael@13: if [ "$TEST" = "true" ]; then michael@13: - echo $PERL ./Configure $OUT $options michael@13: + echo $PERL ./Configure $OUT --with-cc=$CC $options michael@13: else michael@13: - $PERL ./Configure $OUT $options michael@13: + $PERL ./Configure $OUT --with-cc=$CC $options michael@13: fi michael@13: else michael@13: echo "This system ($OUT) is not supported. See file INSTALL for details." michael@13: Index: crypto/objects/obj_dat.pl michael@13: --- crypto/objects/obj_dat.pl.orig 2005-08-29 01:20:47 +0200 michael@13: +++ crypto/objects/obj_dat.pl 2007-10-17 12:13:48 +0200 michael@13: @@ -1,9 +1,5 @@ michael@13: #!/usr/local/bin/perl michael@13: michael@13: -# fixes bug in floating point emulation on sparc64 when michael@13: -# this script produces off-by-one output on sparc64 michael@13: -use integer; michael@13: - michael@13: sub obj_cmp michael@13: { michael@13: local(@a,@b,$_,$r); michael@13: Index: util/mklink.pl michael@13: --- util/mklink.pl.orig 2006-02-09 13:28:30 +0100 michael@13: +++ util/mklink.pl 2007-10-17 12:13:48 +0200 michael@13: @@ -15,13 +15,12 @@ michael@13: # Apart from this, this script should be able to handle even the most michael@13: # pathological cases. michael@13: michael@13: -use Cwd; michael@13: - michael@13: my $from = shift; michael@13: my @files = @ARGV; michael@13: michael@13: my @from_path = split(/[\\\/]/, $from); michael@13: -my $pwd = getcwd(); michael@13: +my $pwd = `pwd`; michael@13: +$pwd =~ s/\n$//s; michael@13: chomp($pwd); michael@13: my @pwd_path = split(/[\\\/]/, $pwd); michael@13: