1 |
vapier 10/08/23 06:02:48 |
2 |
|
3 |
Added: gentoo.config-1.0.0 |
4 |
Log: |
5 |
Split off gentoo.config for openssl-1.0.0 to take advantage of newer optimized targets #333679 by Sergei Trofimovich. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-libs/openssl/files/gentoo.config-1.0.0 |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/files/gentoo.config-1.0.0?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/files/gentoo.config-1.0.0?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: gentoo.config-1.0.0 |
15 |
=================================================================== |
16 |
#!/usr/bin/env bash |
17 |
# Copyright 1999-2009 Gentoo Foundation |
18 |
# Distributed under the terms of the GNU General Public License v2 |
19 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/files/gentoo.config-1.0.0,v 1.1 2010/08/23 06:02:48 vapier Exp $ |
20 |
# |
21 |
# Openssl doesn't play along nicely with cross-compiling |
22 |
# like autotools based projects, so let's teach it new tricks. |
23 |
# |
24 |
# Review the bundled 'config' script to see why kind of targets |
25 |
# we can pass to the 'Configure' script. |
26 |
|
27 |
|
28 |
# Testing routines |
29 |
if [[ $1 == "test" ]] ; then |
30 |
for c in \ |
31 |
"arm-gentoo-linux-uclibc |linux-generic32 -DL_ENDIAN" \ |
32 |
"armv5b-linux-gnu |linux-armv4 -DB_ENDIAN" \ |
33 |
"x86_64-pc-linux-gnu |linux-x86_64" \ |
34 |
"alphaev56-unknown-linux-gnu |linux-alpha+bwx-gcc" \ |
35 |
"i686-pc-linux-gnu |linux-elf" \ |
36 |
"whatever-gentoo-freebsdX.Y |BSD-generic32" \ |
37 |
"i686-gentoo-freebsdX.Y |BSD-x86-elf" \ |
38 |
"sparc64-alpha-freebsdX.Y |BSD-sparc64" \ |
39 |
"ia64-gentoo-freebsd5.99234 |BSD-ia64" \ |
40 |
"x86_64-gentoo-freebsdX.Y |BSD-x86_64" \ |
41 |
"hppa64-aldsF-linux-gnu5.3 |linux-generic32 -DB_ENDIAN" \ |
42 |
"powerpc-gentOO-linux-uclibc |linux-ppc" \ |
43 |
"powerpc64-unk-linux-gnu |linux-ppc64" \ |
44 |
"x86_64-apple-darwinX |darwin64-x86_64-cc" \ |
45 |
"powerpc64-apple-darwinX |darwin64-ppc-cc" \ |
46 |
"i686-apple-darwinX |darwin-i386-cc" \ |
47 |
"i386-apple-darwinX |darwin-i386-cc" \ |
48 |
"powerpc-apple-darwinX |darwin-ppc-cc" \ |
49 |
"i586-pc-winnt |winnt-parity" \ |
50 |
"s390-ibm-linux-gnu |linux-generic32 -DB_ENDIAN" \ |
51 |
"s390x-linux-gnu |linux-s390x" \ |
52 |
;do |
53 |
CHOST=${c/|*} |
54 |
ret_want=${c/*|} |
55 |
ret_got=$(CHOST=${CHOST} "$0") |
56 |
|
57 |
if [[ ${ret_want} == "${ret_got}" ]] ; then |
58 |
echo "PASS: ${CHOST}" |
59 |
else |
60 |
echo "FAIL: ${CHOST}" |
61 |
echo -e "\twanted: ${ret_want}" |
62 |
echo -e "\twe got: ${ret_got}" |
63 |
fi |
64 |
done |
65 |
exit 0 |
66 |
fi |
67 |
[[ -z ${CHOST} && -n $1 ]] && CHOST=$1 |
68 |
|
69 |
|
70 |
# Detect the operating system |
71 |
case ${CHOST} in |
72 |
*-aix*) system="aix";; |
73 |
*-darwin*) system="darwin";; |
74 |
*-freebsd*) system="BSD";; |
75 |
*-hpux*) system="hpux";; |
76 |
*-linux*) system="linux";; |
77 |
*-solaris*) system="solaris";; |
78 |
*-winnt*) system="winnt";; |
79 |
*) exit 0;; |
80 |
esac |
81 |
|
82 |
|
83 |
# Compiler munging |
84 |
compiler="gcc" |
85 |
if [[ ${CC} == "ccc" ]] ; then |
86 |
compiler=${CC} |
87 |
fi |
88 |
|
89 |
|
90 |
# Detect target arch |
91 |
machine="" |
92 |
chost_machine=${CHOST%%-*} |
93 |
case ${system} in |
94 |
linux) |
95 |
case ${chost_machine} in |
96 |
alphaev56*) machine=alpha+bwx-${compiler};; |
97 |
alphaev[678]*)machine=alpha+bwx-${compiler};; |
98 |
alpha*) machine=alpha-${compiler};; |
99 |
armv[4-9]*b*) machine="armv4 -DB_ENDIAN";; |
100 |
armv[4-9]*) machine="armv4 -DL_ENDIAN";; |
101 |
arm*b*) machine="generic32 -DB_ENDIAN";; |
102 |
arm*) machine="generic32 -DL_ENDIAN";; |
103 |
avr*) machine="generic32 -DL_ENDIAN";; |
104 |
bfin*) machine="generic32 -DL_ENDIAN";; |
105 |
# hppa64*) machine=parisc64;; |
106 |
hppa*) machine="generic32 -DB_ENDIAN";; |
107 |
i[0-9]86*) machine=elf;; |
108 |
ia64*) machine=ia64;; |
109 |
m68*) machine="generic32 -DB_ENDIAN";; |
110 |
mips*el*) machine="generic32 -DL_ENDIAN";; |
111 |
mips*) machine="generic32 -DB_ENDIAN";; |
112 |
powerpc64*) machine=ppc64;; |
113 |
powerpc*) machine=ppc;; |
114 |
# sh64*) machine=elf;; |
115 |
sh*b*) machine="generic32 -DB_ENDIAN";; |
116 |
sh*) machine="generic32 -DL_ENDIAN";; |
117 |
sparc*v7*) machine="generic32 -DB_ENDIAN";; |
118 |
sparc64*) machine=sparcv9;; |
119 |
sparc*) machine=sparcv8;; |
120 |
s390x*) machine=s390x;; |
121 |
s390*) machine="generic32 -DB_ENDIAN";; |
122 |
x86_64*) machine=x86_64;; |
123 |
esac |
124 |
;; |
125 |
BSD) |
126 |
case ${chost_machine} in |
127 |
alpha*) machine=generic64;; |
128 |
i[6-9]86*) machine=x86-elf;; |
129 |
ia64*) machine=ia64;; |
130 |
sparc64*) machine=sparc64;; |
131 |
x86_64*) machine=x86_64;; |
132 |
*) machine=generic32;; |
133 |
esac |
134 |
;; |
135 |
aix) |
136 |
machine=${compiler} |
137 |
;; |
138 |
darwin) |
139 |
case ${chost_machine} in |
140 |
powerpc64) machine=ppc-cc; system=${system}64;; |
141 |
powerpc) machine=ppc-cc;; |
142 |
i?86*) machine=i386-cc;; |
143 |
x86_64) machine=x86_64-cc; system=${system}64;; |
144 |
esac |
145 |
;; |
146 |
hpux) |
147 |
case ${chost_machine} in |
148 |
ia64) machine=ia64-${compiler} ;; |
149 |
esac |
150 |
;; |
151 |
solaris) |
152 |
case ${chost_machine} in |
153 |
i386) machine=x86-${compiler} ;; |
154 |
x86_64*) machine=x86_64-${compiler}; system=${system}64;; |
155 |
sparcv9*) machine=sparcv9-${compiler}; system=${system}64;; |
156 |
sparc*) machine=sparcv8-${compiler};; |
157 |
esac |
158 |
;; |
159 |
winnt) |
160 |
machine=parity |
161 |
;; |
162 |
esac |
163 |
|
164 |
|
165 |
# If we have something, show it |
166 |
[[ -n ${machine} ]] && echo ${system}-${machine} |