| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.98 2012/06/03 08:27:53 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.99 2012/08/22 16:03:08 vapier Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: multilib.eclass |
5 | # @ECLASS: multilib.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # amd64@gentoo.org |
7 | # amd64@gentoo.org |
| 8 | # toolchain@gentoo.org |
8 | # toolchain@gentoo.org |
| … | |
… | |
| 285 | |
285 | |
| 286 | case ${CTARGET} in |
286 | case ${CTARGET} in |
| 287 | x86_64*) |
287 | x86_64*) |
| 288 | export CFLAGS_x86=${CFLAGS_x86--m32} |
288 | export CFLAGS_x86=${CFLAGS_x86--m32} |
| 289 | export CHOST_x86=${CTARGET/x86_64/i686} |
289 | export CHOST_x86=${CTARGET/x86_64/i686} |
|
|
290 | CHOST_x86=${CHOST_x86/%-gnux32/-gnu} |
| 290 | export CTARGET_x86=${CHOST_x86} |
291 | export CTARGET_x86=${CHOST_x86} |
| 291 | if [[ ${SYMLINK_LIB} == "yes" ]] ; then |
292 | if [[ ${SYMLINK_LIB} == "yes" ]] ; then |
| 292 | export LIBDIR_x86="lib32" |
293 | export LIBDIR_x86="lib32" |
| 293 | else |
294 | else |
| 294 | export LIBDIR_x86="lib" |
295 | export LIBDIR_x86="lib" |
| 295 | fi |
296 | fi |
| 296 | |
297 | |
| 297 | export CFLAGS_amd64=${CFLAGS_amd64--m64} |
298 | export CFLAGS_amd64=${CFLAGS_amd64--m64} |
| 298 | export CHOST_amd64=${CTARGET} |
299 | export CHOST_amd64=${CTARGET/%-gnux32/-gnu} |
| 299 | export CTARGET_amd64=${CHOST_amd64} |
300 | export CTARGET_amd64=${CHOST_amd64} |
| 300 | export LIBDIR_amd64="lib64" |
301 | export LIBDIR_amd64="lib64" |
| 301 | |
302 | |
| 302 | export CFLAGS_x32=${CFLAGS_x32--mx32} |
303 | export CFLAGS_x32=${CFLAGS_x32--mx32} |
| 303 | export CHOST_x32=${CTARGET} |
304 | export CHOST_x32=${CTARGET/%-gnu/-gnux32} |
| 304 | export CTARGET_x32=${CHOST_x32} |
305 | export CTARGET_x32=${CHOST_x32} |
| 305 | export LIBDIR_x32="libx32" |
306 | export LIBDIR_x32="libx32" |
| 306 | |
307 | |
|
|
308 | case ${CTARGET} in |
|
|
309 | *-gnux32) |
|
|
310 | : ${MULTILIB_ABIS=x32 amd64 x86} |
|
|
311 | : ${DEFAULT_ABI=x32} |
|
|
312 | ;; |
|
|
313 | *) |
| 307 | : ${MULTILIB_ABIS=amd64 x86} |
314 | : ${MULTILIB_ABIS=amd64 x86} |
| 308 | : ${DEFAULT_ABI=amd64} |
315 | : ${DEFAULT_ABI=amd64} |
|
|
316 | ;; |
|
|
317 | esac |
| 309 | ;; |
318 | ;; |
| 310 | mips64*) |
319 | mips64*) |
| 311 | export CFLAGS_o32=${CFLAGS_o32--mabi=32} |
320 | export CFLAGS_o32=${CFLAGS_o32--mabi=32} |
| 312 | export CHOST_o32=${CTARGET/mips64/mips} |
321 | export CHOST_o32=${CTARGET/mips64/mips} |
| 313 | export CTARGET_o32=${CHOST_o32} |
322 | export CTARGET_o32=${CHOST_o32} |