openpkg/openssl.patch

changeset 445
43a74e63d4a3
parent 428
f880f219c566
child 472
0746a003fc03
equal deleted inserted replaced
1:3c446c02311c 2:ad470d9ae840
82 - GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null` 82 - GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null`
83 + GCCVER=`sh -c "${CC-gcc} -dumpversion" 2>/dev/null` 83 + GCCVER=`sh -c "${CC-gcc} -dumpversion" 2>/dev/null`
84 if [ "$GCCVER" != "" ]; then 84 if [ "$GCCVER" != "" ]; then
85 # then strip off whatever prefix egcs prepends the number with... 85 # then strip off whatever prefix egcs prepends the number with...
86 # Hopefully, this will work for any future prefixes as well. 86 # Hopefully, this will work for any future prefixes as well.
87 @@ -424,8 +427,14 @@ 87 @@ -424,8 +427,17 @@
88 # peak single digit before and after first dot, e.g. 2.95.1 gives 29 88 # peak single digit before and after first dot, e.g. 2.95.1 gives 29
89 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` 89 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
90 CC=gcc 90 CC=gcc
91 + SUFFIX=gcc 91 + SUFFIX=gcc
92 else 92 + else
93 CC=cc 93 + CC=cc
94 + SUFFIX=cc 94 + SUFFIX=cc
95 + fi 95 + fi
96 +else 96 +else
97 + if [ "$GCCVER" != "" ]; then 97 + if [ "$GCCVER" != "" ]; then
98 + SUFFIX=gcc 98 + SUFFIX=gcc
99 else
100 CC=cc
101 + SUFFIX=cc
99 fi 102 fi
100 fi 103 fi
101 GCCVER=${GCCVER:-0} 104 GCCVER=${GCCVER:-0}
102 @@ -435,7 +444,7 @@ 105 @@ -435,7 +447,7 @@
103 if [ $GCCVER -ge 30 ]; then 106 if [ $GCCVER -ge 30 ]; then
104 # PA64 support only came in with gcc 3.0.x. 107 # PA64 support only came in with gcc 3.0.x.
105 # We check if the preprocessor symbol __LP64__ is defined... 108 # We check if the preprocessor symbol __LP64__ is defined...
106 - if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then 109 - if echo "__LP64__" | gcc -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
107 + if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then 110 + if echo "__LP64__" | $CC -v -E -x c - 2>/dev/null | grep "^__LP64__" 2>&1 > /dev/null; then
108 : # __LP64__ has slipped through, it therefore is not defined 111 : # __LP64__ has slipped through, it therefore is not defined
109 else 112 else
110 GCC_BITS="64" 113 GCC_BITS="64"
111 @@ -446,13 +455,14 @@ 114 @@ -446,13 +458,14 @@
112 if [ $GCCVER -ge 30 ]; then 115 if [ $GCCVER -ge 30 ]; then
113 # 64-bit ABI isn't officially supported in gcc 3.0, but it appears 116 # 64-bit ABI isn't officially supported in gcc 3.0, but it appears
114 # to be working, at the very least 'make test' passes... 117 # to be working, at the very least 'make test' passes...
115 - if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then 118 - if gcc -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
116 + if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then 119 + if $CC -v -E -x c /dev/null 2>&1 | grep __arch64__ > /dev/null; then
122 # check for WorkShop C, expected output is "cc: blah-blah C x.x" 125 # check for WorkShop C, expected output is "cc: blah-blah C x.x"
123 + if [ $GCCVER -eq 0 ]; then 126 + if [ $GCCVER -eq 0 ]; then
124 CCVER=`(cc -V 2>&1) 2>/dev/null | \ 127 CCVER=`(cc -V 2>&1) 2>/dev/null | \
125 egrep -e '^cc: .* C [0-9]\.[0-9]' | \ 128 egrep -e '^cc: .* C [0-9]\.[0-9]' | \
126 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` 129 sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'`
127 @@ -465,6 +475,7 @@ 130 @@ -465,6 +478,7 @@
128 sleep 5 131 sleep 5
129 fi 132 fi
130 fi 133 fi
131 + fi 134 + fi
132 fi 135 fi
133 136
134 if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then 137 if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then
135 @@ -482,6 +493,7 @@ 138 @@ -482,6 +496,7 @@
136 139
137 if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc 140 if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc
138 (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc 141 (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc
139 + (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc 142 + (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc
140 fi 143 fi
141 144
142 CCVER=${CCVER:-0} 145 CCVER=${CCVER:-0}
143 @@ -507,7 +519,7 @@ 146 @@ -507,7 +522,7 @@
144 if [ $CPU -ge 4000 ]; then 147 if [ $CPU -ge 4000 ]; then
145 options="$options -mips2" 148 options="$options -mips2"
146 fi 149 fi
147 - OUT="irix-$CC" 150 - OUT="irix-$CC"
148 + OUT="irix-$SUFFIX" 151 + OUT="irix-$SUFFIX"
149 ;; 152 ;;
150 mips3-sgi-irix) 153 mips3-sgi-irix)
151 #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` 154 #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
152 @@ -517,11 +529,11 @@ 155 @@ -517,11 +532,11 @@
153 #else 156 #else
154 # options="$options -mips3" 157 # options="$options -mips3"
155 #fi 158 #fi
156 - OUT="irix-mips3-$CC" 159 - OUT="irix-mips3-$CC"
157 + OUT="irix-mips3-$SUFFIX" 160 + OUT="irix-mips3-$SUFFIX"
161 - echo " invoke './Configure irix64-mips4-$CC' *manually*." 164 - echo " invoke './Configure irix64-mips4-$CC' *manually*."
162 + echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*." 165 + echo " invoke './Configure irix64-mips4-$SUFFIX' *manually*."
163 if [ "$TEST" = "false" -a -t 1 ]; then 166 if [ "$TEST" = "false" -a -t 1 ]; then
164 echo " You have about 5 seconds to press Ctrl-C to abort." 167 echo " You have about 5 seconds to press Ctrl-C to abort."
165 (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 168 (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1
166 @@ -533,7 +545,7 @@ 169 @@ -533,7 +548,7 @@
167 #else 170 #else
168 # options="$options -mips3" 171 # options="$options -mips3"
169 #fi 172 #fi
170 - OUT="irix-mips3-$CC" 173 - OUT="irix-mips3-$CC"
171 + OUT="irix-mips3-$SUFFIX" 174 + OUT="irix-mips3-$SUFFIX"
172 ;; 175 ;;
173 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; 176 ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;;
174 ppc-apple-darwin*) 177 ppc-apple-darwin*)
175 @@ -566,6 +578,9 @@ 178 @@ -566,6 +581,9 @@
176 else 179 else
177 OUT="darwin-i386-cc" 180 OUT="darwin-i386-cc"
178 fi ;; 181 fi ;;
179 + x86_64-apple-darwin*) 182 + x86_64-apple-darwin*)
180 + OUT="darwin64-x86_64-cc" 183 + OUT="darwin64-x86_64-cc"
181 + ;; 184 + ;;
182 armv6+7-*-iphoneos) 185 armv6+7-*-iphoneos)
183 options="$options -arch%20armv6 -arch%20armv7" 186 options="$options -arch%20armv6 -arch%20armv7"
184 OUT="iphoneos-cross" ;; 187 OUT="iphoneos-cross" ;;
185 @@ -575,10 +590,10 @@ 188 @@ -575,10 +593,10 @@
186 alpha-*-linux2) 189 alpha-*-linux2)
187 ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` 190 ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo`
188 case ${ISA:-generic} in 191 case ${ISA:-generic} in
189 - *[678]) OUT="linux-alpha+bwx-$CC" ;; 192 - *[678]) OUT="linux-alpha+bwx-$CC" ;;
190 - *) OUT="linux-alpha-$CC" ;; 193 - *) OUT="linux-alpha-$CC" ;;
194 - if [ "$CC" = "gcc" ]; then 197 - if [ "$CC" = "gcc" ]; then
195 + if [ $GCCVER -gt 0 ]; then 198 + if [ $GCCVER -gt 0 ]; then
196 case ${ISA:-generic} in 199 case ${ISA:-generic} in
197 EV5|EV45) options="$options -mcpu=ev5";; 200 EV5|EV45) options="$options -mcpu=ev5";;
198 EV56|PCA56) options="$options -mcpu=ev56";; 201 EV56|PCA56) options="$options -mcpu=ev56";;
199 @@ -662,7 +677,7 @@ 202 @@ -662,7 +680,7 @@
200 ;; 203 ;;
201 x86_64-*-linux?) OUT="linux-x86_64" ;; 204 x86_64-*-linux?) OUT="linux-x86_64" ;;
202 *86-*-linux2) OUT="linux-elf" 205 *86-*-linux2) OUT="linux-elf"
203 - if [ "$GCCVER" -gt 28 ]; then 206 - if [ "$GCCVER" -gt 28 ]; then
204 + if [ $GCCVER -gt 28 ]; then 207 + if [ $GCCVER -gt 28 ]; then
205 if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then 208 if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then
206 options="$options -march=pentium" 209 options="$options -march=pentium"
207 fi 210 fi
208 @@ -676,17 +691,17 @@ 211 @@ -676,17 +694,17 @@
209 *-*-linux1) OUT="linux-aout" ;; 212 *-*-linux1) OUT="linux-aout" ;;
210 *-*-linux2) OUT="linux-generic32" ;; 213 *-*-linux2) OUT="linux-generic32" ;;
211 sun4[uv]*-*-solaris2) 214 sun4[uv]*-*-solaris2)
212 - OUT="solaris-sparcv9-$CC" 215 - OUT="solaris-sparcv9-$CC"
213 + OUT="solaris-sparcv9-$SUFFIX" 216 + OUT="solaris-sparcv9-$SUFFIX"
224 - elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then 227 - elif [ "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then
225 + elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then 228 + elif [ $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then
226 # $GCC_ARCH denotes default ABI chosen by compiler driver 229 # $GCC_ARCH denotes default ABI chosen by compiler driver
227 # (first one found on the $PATH). I assume that user 230 # (first one found on the $PATH). I assume that user
228 # expects certain consistency with the rest of his builds 231 # expects certain consistency with the rest of his builds
229 @@ -712,21 +727,21 @@ 232 @@ -712,21 +730,21 @@
230 OUT="solaris64-sparcv9-$CC" 233 OUT="solaris64-sparcv9-$CC"
231 fi 234 fi
232 ;; 235 ;;
233 - sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;; 236 - sun4m-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
234 - sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;; 237 - sun4d-*-solaris2) OUT="solaris-sparcv8-$CC" ;;
236 + sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; 239 + sun4m-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;;
237 + sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;; 240 + sun4d-*-solaris2) OUT="solaris-sparcv8-$SUFFIX" ;;
238 + sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;; 241 + sun4*-*-solaris2) OUT="solaris-sparcv7-$SUFFIX" ;;
239 *86*-*-solaris2) 242 *86*-*-solaris2)
240 ISA64=`(isalist) 2>/dev/null | grep amd64` 243 ISA64=`(isalist) 2>/dev/null | grep amd64`
241 - if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then 244 if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 ]; then
242 - OUT="solaris64-x86_64-$CC" 245 - OUT="solaris64-x86_64-$CC"
243 + if [ "$ISA64" != "" -a ${KERNEL_BITS:-64} -eq 64 -a $GCCVER -gt 0 -a "$GCC_ARCH" = "-m64" ]; then
244 + OUT="solaris64-x86_64-$SUFFIX" 246 + OUT="solaris64-x86_64-$SUFFIX"
245 else 247 else
246 - OUT="solaris-x86-$CC" 248 - OUT="solaris-x86-$CC"
247 + OUT="solaris-x86-$SUFFIX" 249 + OUT="solaris-x86-$SUFFIX"
248 if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then 250 if [ `uname -r | sed -e 's/5\.//'` -lt 10 ]; then
253 - *-*-sunos4) OUT="sunos-$CC" ;; 255 - *-*-sunos4) OUT="sunos-$CC" ;;
254 + *-*-sunos4) OUT="sunos-$SUFFIX" ;; 256 + *-*-sunos4) OUT="sunos-$SUFFIX" ;;
255 257
256 *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; 258 *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;;
257 alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;; 259 alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;;
258 @@ -750,7 +765,7 @@ 260 @@ -750,7 +768,7 @@
259 *-*-osf) OUT="osf1-alpha-cc" ;; 261 *-*-osf) OUT="osf1-alpha-cc" ;;
260 *-*-tru64) OUT="tru64-alpha-cc" ;; 262 *-*-tru64) OUT="tru64-alpha-cc" ;;
261 *-*-[Uu]nix[Ww]are7) 263 *-*-[Uu]nix[Ww]are7)
262 - if [ "$CC" = "gcc" ]; then 264 - if [ "$CC" = "gcc" ]; then
263 + if [ $GCCVER -gt 0 ]; then 265 + if [ $GCCVER -gt 0 ]; then
264 OUT="unixware-7-gcc" ; options="$options no-sse2" 266 OUT="unixware-7-gcc" ; options="$options no-sse2"
265 else 267 else
266 OUT="unixware-7" ; options="$options no-sse2 -D__i386__" 268 OUT="unixware-7" ; options="$options no-sse2 -D__i386__"
267 @@ -761,12 +776,12 @@ 269 @@ -761,12 +779,12 @@
268 *-*-vos) 270 *-*-vos)
269 options="$options no-threads no-shared no-asm no-dso" 271 options="$options no-threads no-shared no-asm no-dso"
270 EXE=".pm" 272 EXE=".pm"
271 - OUT="vos-$CC" ;; 273 - OUT="vos-$CC" ;;
272 + OUT="vos-$SUFFIX" ;; 274 + OUT="vos-$SUFFIX" ;;
277 - if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then 279 - if [ $CC = "gcc" -a $GCC_BITS = "64" ]; then
278 + if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then 280 + if [ $GCCVER -gt 0 -a $GCC_BITS = "64" ]; then
279 OUT="hpux64-parisc2-gcc" 281 OUT="hpux64-parisc2-gcc"
280 fi 282 fi
281 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` 283 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null`
282 @@ -781,8 +796,8 @@ 284 @@ -781,8 +799,8 @@
283 OUT="hpux-ia64-cc" 285 OUT="hpux-ia64-cc"
284 fi 286 fi
285 elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU 287 elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU
286 - OUT=${OUT:-"hpux-parisc2-${CC}"} 288 - OUT=${OUT:-"hpux-parisc2-${CC}"}
287 - if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then 289 - if [ $KERNEL_BITS -eq 64 -a "$CC" = "cc" ]; then
288 + OUT=${OUT:-"hpux-parisc2-${SUFFIX}"} 290 + OUT=${OUT:-"hpux-parisc2-${SUFFIX}"}
289 + if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then 291 + if [ $KERNEL_BITS -eq 64 -a $GCCVER -eq 0 ]; then
290 echo "WARNING! If you wish to build 64-bit library then you have to" 292 echo "WARNING! If you wish to build 64-bit library then you have to"
291 echo " invoke './Configure hpux64-parisc2-cc' *manually*." 293 echo " invoke './Configure hpux64-parisc2-cc' *manually*."
292 if [ "$TEST" = "false" -a -t 1 ]; then 294 if [ "$TEST" = "false" -a -t 1 ]; then
293 @@ -791,9 +806,9 @@ 295 @@ -791,9 +809,9 @@
294 fi 296 fi
295 fi 297 fi
296 elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU 298 elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU
297 - OUT="hpux-parisc-${CC}" 299 - OUT="hpux-parisc-${CC}"
298 + OUT="hpux-parisc-${SUFFIX}" 300 + OUT="hpux-parisc-${SUFFIX}"
300 - OUT="hpux-parisc-${CC}" 302 - OUT="hpux-parisc-${CC}"
301 + OUT="hpux-parisc-${SUFFIX}" 303 + OUT="hpux-parisc-${SUFFIX}"
302 else # Motorola(?) CPU 304 else # Motorola(?) CPU
303 OUT="hpux-$CC" 305 OUT="hpux-$CC"
304 fi 306 fi
305 @@ -803,7 +818,7 @@ 307 @@ -803,7 +821,7 @@
306 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` 308 [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null`
307 KERNEL_BITS=${KERNEL_BITS:-32} 309 KERNEL_BITS=${KERNEL_BITS:-32}
308 OBJECT_MODE=${OBJECT_MODE:-32} 310 OBJECT_MODE=${OBJECT_MODE:-32}
309 - if [ "$CC" = "gcc" ]; then 311 - if [ "$CC" = "gcc" ]; then
310 + if [ $GCCVER -gt 0 ]; then 312 + if [ $GCCVER -gt 0 ]; then
311 OUT="aix-gcc" 313 OUT="aix-gcc"
312 if [ $OBJECT_MODE -eq 64 ]; then 314 if [ $OBJECT_MODE -eq 64 ]; then
313 echo 'Your $OBJECT_MODE was found to be set to 64' 315 echo 'Your $OBJECT_MODE was found to be set to 64'
314 @@ -913,7 +928,7 @@ 316 @@ -913,7 +931,7 @@
315 #fi 317 #fi
316 318
317 if [ -z "$OUT" ]; then 319 if [ -z "$OUT" ]; then
318 - OUT="$CC" 320 - OUT="$CC"
319 + OUT="$SUFFIX" 321 + OUT="$SUFFIX"
320 fi 322 fi
321 323
322 if [ ".$PERL" = . ] ; then 324 if [ ".$PERL" = . ] ; then
323 @@ -945,9 +960,9 @@ 325 @@ -945,9 +963,9 @@
324 # compiler for the platform ... in which case we add it on 326 # compiler for the platform ... in which case we add it on
325 # the end ... otherwise we leave it off 327 # the end ... otherwise we leave it off
326 328
327 -$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null 329 -$PERL ./Configure LIST | grep "$OUT-$CC" > /dev/null
328 +$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null 330 +$PERL ./Configure LIST | grep "$OUT-$SUFFIX" > /dev/null
330 - OUT="$OUT-$CC" 332 - OUT="$OUT-$CC"
331 + OUT="$OUT-$SUFFIX" 333 + OUT="$OUT-$SUFFIX"
332 fi 334 fi
333 335
334 OUT="$PREFIX$OUT" 336 OUT="$PREFIX$OUT"
335 @@ -957,9 +972,9 @@ 337 @@ -957,9 +975,9 @@
336 echo Configuring for $OUT 338 echo Configuring for $OUT
337 339
338 if [ "$TEST" = "true" ]; then 340 if [ "$TEST" = "true" ]; then
339 - echo $PERL ./Configure $OUT $options 341 - echo $PERL ./Configure $OUT $options
340 + echo $PERL ./Configure $OUT --with-cc=$CC $options 342 + echo $PERL ./Configure $OUT --with-cc=$CC $options

mercurial