Gentoo Archives: gentoo-commits

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