From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R3EGl-0004NX-Si for garchives@archives.gentoo.org; Mon, 12 Sep 2011 21:42:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B4C321C309; Mon, 12 Sep 2011 21:42:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ECFEB21C30A for ; Mon, 12 Sep 2011 21:42:10 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3661B1B4010 for ; Mon, 12 Sep 2011 21:42:10 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id E9EE52004C; Mon, 12 Sep 2011 21:42:08 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: toolchain-funcs.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: toolchain-funcs.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Message-Id: <20110912214208.E9EE52004C@flycatcher.gentoo.org> Date: Mon, 12 Sep 2011 21:42:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 99e7316bdbafab18dd8f3ac995841d6c vapier 11/09/12 21:42:08 Modified: toolchain-funcs.eclass Log: add more BUILD_xxx helpers, and unify the variable lookup logic a bit m= ore in tc-getBUILD_PROG Revision Changes Path 1.107 eclass/toolchain-funcs.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.107&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-f= uncs.eclass?rev=3D1.107&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain-f= uncs.eclass?r1=3D1.106&r2=3D1.107 Index: toolchain-funcs.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v retrieving revision 1.106 retrieving revision 1.107 diff -u -r1.106 -r1.107 --- toolchain-funcs.eclass 9 Sep 2011 19:14:19 -0000 1.106 +++ toolchain-funcs.eclass 12 Sep 2011 21:42:08 -0000 1.107 @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.106= 2011/09/09 19:14:19 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.107= 2011/09/12 21:42:08 vapier Exp $ =20 # @ECLASS: toolchain-funcs.eclass # @MAINTAINER: @@ -41,7 +41,7 @@ export ${var}=3D${prog} echo "${!var}" } -tc-getBUILD_PROG() { _tc-getPROG CBUILD "$@"; } +tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "= ${@:2}"; } tc-getPROG() { _tc-getPROG CHOST "$@"; } =20 # @FUNCTION: tc-getAR @@ -109,18 +109,50 @@ # @RETURN: name of the Windows dllwrap utility tc-getDLLWRAP() { tc-getPROG DLLWRAP dllwrap "$@"; } =20 +# @FUNCTION: tc-getBUILD_AR +# @USAGE: [toolchain prefix] +# @RETURN: name of the archiver for building binaries to run on the buil= d machine +tc-getBUILD_AR() { tc-getBUILD_PROG AR ar "$@"; } +# @FUNCTION: tc-getBUILD_AS +# @USAGE: [toolchain prefix] +# @RETURN: name of the assembler for building binaries to run on the bui= ld machine +tc-getBUILD_AS() { tc-getBUILD_PROG AS as "$@"; } # @FUNCTION: tc-getBUILD_CC # @USAGE: [toolchain prefix] # @RETURN: name of the C compiler for building binaries to run on the bu= ild machine -tc-getBUILD_CC() { tc-getBUILD_PROG "BUILD_CC CC_FOR_BUILD HOSTCC" gcc "= $@"; } +tc-getBUILD_CC() { tc-getBUILD_PROG CC gcc "$@"; } # @FUNCTION: tc-getBUILD_CPP # @USAGE: [toolchain prefix] # @RETURN: name of the C preprocessor for building binaries to run on th= e build machine -tc-getBUILD_CPP() { tc-getBUILD_PROG "BUILD_CPP CPP_FOR_BUILD HOSTCPP" c= pp "$@"; } +tc-getBUILD_CPP() { tc-getBUILD_PROG CPP cpp "$@"; } # @FUNCTION: tc-getBUILD_CXX # @USAGE: [toolchain prefix] # @RETURN: name of the C++ compiler for building binaries to run on the = build machine -tc-getBUILD_CXX() { tc-getBUILD_PROG "BUILD_CXX CXX_FOR_BUILD HOSTCXX" g= ++ "$@"; } +tc-getBUILD_CXX() { tc-getBUILD_PROG CXX g++ "$@"; } +# @FUNCTION: tc-getBUILD_LD +# @USAGE: [toolchain prefix] +# @RETURN: name of the linker for building binaries to run on the build = machine +tc-getBUILD_LD() { tc-getBUILD_PROG LD ld "$@"; } +# @FUNCTION: tc-getBUILD_STRIP +# @USAGE: [toolchain prefix] +# @RETURN: name of the strip program for building binaries to run on the= build machine +tc-getBUILD_STRIP() { tc-getBUILD_PROG STRIP strip "$@"; } +# @FUNCTION: tc-getBUILD_NM +# @USAGE: [toolchain prefix] +# @RETURN: name of the symbol/object thingy for building binaries to run= on the build machine +tc-getBUILD_NM() { tc-getBUILD_PROG NM nm "$@"; } +# @FUNCTION: tc-getBUILD_RANLIB +# @USAGE: [toolchain prefix] +# @RETURN: name of the archiver indexer for building binaries to run on = the build machine +tc-getBUILD_RANLIB() { tc-getBUILD_PROG RANLIB ranlib "$@"; } +# @FUNCTION: tc-getBUILD_OBJCOPY +# @USAGE: [toolchain prefix] +# @RETURN: name of the object copier for building binaries to run on the= build machine +tc-getBUILD_OBJCOPY() { tc-getBUILD_PROG OBJCOPY objcopy "$@"; } +# @FUNCTION: tc-getBUILD_PKG_CONFIG +# @USAGE: [toolchain prefix] +# @RETURN: name of the pkg-config tool for building binaries to run on t= he build machine +tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; = } =20 # @FUNCTION: tc-export # @USAGE: