[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] Re: [PATCH 2/2] cmake-utils.eclass: export compilers to environment  instead of setting
From:       Maciej Mrozowski <reavertm () gmail ! com>
Date:       2016-11-02 23:04:34
Message-ID: 3156637.Ll189SdJv2 () liwardyna
[Download RAW message or body]


On środa, 2 listopada 2016 04:00:06 CET Maciej Mrozowski wrote:
> ---
>  eclass/cmake-utils.eclass | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
> index 88d2163..f7eac26 100644
> --- a/eclass/cmake-utils.eclass
> +++ b/eclass/cmake-utils.eclass
> @@ -525,13 +525,13 @@ enable_cmake-utils_src_configure() {
> 
>  	local toolchain_file=${BUILD_DIR}/gentoo_toolchain.cmake
>  	cat > ${toolchain_file} <<- _EOF_ || die
> -		SET (CMAKE_C_COMPILER $(tc-getCC))
> -		SET (CMAKE_CXX_COMPILER $(tc-getCXX))
> -		SET (CMAKE_Fortran_COMPILER $(tc-getFC))
>  		SET (CMAKE_AR $(type -P $(tc-getAR)) CACHE FILEPATH "Archive
> manager" FORCE)
>  		SET (CMAKE_RANLIB $(type -P $(tc-getRANLIB)) CACHE FILEPATH "Archive
> index generator" FORCE)
>  	_EOF_
> 
> +	# Bug 542530, export those instead of setting paths in toolchain file
> +	tc-export CC CXX FC
> +
>  	if tc-is-cross-compiler; then
>  		local sysname
>  		case "${KERNEL:-linux}" in

mgorny commented to use local instead:

local -x CC=$(tc-getCC)
...

If no other comments, I'll apply this and commit patches somewhere around next 
weekend. Would be nice if someone using some exotic prefix tried this (should 
work though, we feed various cross-compilers to cmake via env this way at 
work).

-- 
regards
MM
["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic