/[gentoo-x86]/eclass/multilib.eclass
Gentoo

Diff of /eclass/multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.103 Revision 1.104
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.103 2013/04/22 01:18:51 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.104 2014/01/17 06:21:15 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
278 278
279# This is for the toolchain to setup profile variables when pulling in 279# This is for the toolchain to setup profile variables when pulling in
280# a crosscompiler (and thus they aren't set in the profile) 280# a crosscompiler (and thus they aren't set in the profile)
281multilib_env() { 281multilib_env() {
282 local CTARGET=${1:-${CTARGET}} 282 local CTARGET=${1:-${CTARGET}}
283 local cpu=${CTARGET%%*-}
283 284
284 case ${CTARGET} in 285 case ${cpu} in
286 aarch64*)
287 # Not possible to do multilib with aarch64 and a single toolchain.
288 export CFLAGS_arm=${CFLAGS_arm-}
289 case ${cpu} in
290 aarch64*be) export CHOST_arm="armv8b-${CTARGET#*-}";;
291 *) export CHOST_arm="armv8l-${CTARGET#*-}";;
292 esac
293 CHOST_arm=${CHOST_arm/%-gnu/-gnueabi}
294 export CTARGET_arm=${CHOST_arm}
295 export LIBDIR_arm="lib"
296
297 export CFLAGS_aarch64=${CFLAGS_aarch64-}
298 export CHOST_aarch64=${CTARGET}
299 export CTARGET_aarch64=${CHOST_aarch64}
300 export LIBDIR_aarch64="lib64"
301
302 : ${MULTILIB_ABIS=aarch64}
303 : ${DEFAULT_ABI=aarch64}
304 ;;
285 x86_64*) 305 x86_64*)
286 export CFLAGS_x86=${CFLAGS_x86--m32} 306 export CFLAGS_x86=${CFLAGS_x86--m32}
287 export CHOST_x86=${CTARGET/x86_64/i686} 307 export CHOST_x86=${CTARGET/x86_64/i686}
288 CHOST_x86=${CHOST_x86/%-gnux32/-gnu} 308 CHOST_x86=${CHOST_x86/%-gnux32/-gnu}
289 export CTARGET_x86=${CHOST_x86} 309 export CTARGET_x86=${CHOST_x86}

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.104

  ViewVC Help
Powered by ViewVC 1.1.20