Re: [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: export compilers to environment instead of setting in toolchain file, bug 542530

2016-11-04 Thread Maciej Mrozowski
On piÄ…tek, 4 listopada 2016 20:58:23 CET James Le Cuirot wrote:
> On Fri, 4 Nov 2016 13:37:42 +0100
> 
> Alexis Ballier  wrote:
> > On Fri, 4 Nov 2016 12:33:37 +
> > 
> > James Le Cuirot  wrote:
> > > On Fri, 4 Nov 2016 13:20:16 +0100
> > > 
> > > Alexis Ballier  wrote:
> > > > On Thu,  3 Nov 2016 00:52:17 +0100
> > > > 
> > > > Maciej Mrozowski  wrote:
> > > > > From: Maciej Mrozowski 
> > > > > 
> > > > > ---
> > > > > 
> > > > >  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..23cc094 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
> > > > 
> > > > Have you tested cross compiling ?
> > > > IIRC toolchain file is used *before* getting those vars from env and
> > > > is used to determine system & compiler type. Without this you get
> > > > bugs like #503216
> > > 
> > > I was dubious (since I filed that bug) but I briefly tested by
> > > cross-compiling media-libs/openal and it worked. I didn't think to
> > > try older CMake versions though. The behaviour might have changed.
> > 
> > could you please send me (in private) build logs with & without the
> > changes please ?
> > 
> > (dont have easy access to a x compile setup atm)
> 
> I diff'd the logs (needed MAKEOPTS="-j1") and they were practically
> identical, save for the expected change in configure arguments. I also
> tested with CMake 2.8 and that worked too. To further convince myself,
> I took the current eclass and loosely reversed the change we made for
> bug #503216. It failed with CMake 3.6 in exactly the same way it failed
> back then. I am therefore happy for this to proceed. Would you agree?

Env way w/ CMake is used (without toolchain file) where I work for a couple of 
years with quite a bunch of exotic cross-compilers so I never doubted it would 
work (with toolchain file lacking CMAKE__COMPILER variable).
The only thing surprised me here was CMake handling CC/CXX var multi-param 
abuse acceptably.

-- 
regards
MM

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: export compilers to environment instead of setting in toolchain file, bug 542530

2016-11-04 Thread Alexis Ballier
On Fri, 4 Nov 2016 12:33:37 +
James Le Cuirot  wrote:

> On Fri, 4 Nov 2016 13:20:16 +0100
> Alexis Ballier  wrote:
> 
> > On Thu,  3 Nov 2016 00:52:17 +0100
> > Maciej Mrozowski  wrote:
> >   
> > > From: Maciej Mrozowski 
> > > 
> > > ---
> > >  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..23cc094 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
> > 
> > 
> > Have you tested cross compiling ?
> > IIRC toolchain file is used *before* getting those vars from env and
> > is used to determine system & compiler type. Without this you get
> > bugs like #503216  
> 
> I was dubious (since I filed that bug) but I briefly tested by
> cross-compiling media-libs/openal and it worked. I didn't think to try
> older CMake versions though. The behaviour might have changed.
> 

could you please send me (in private) build logs with & without the
changes please ?

(dont have easy access to a x compile setup atm)



Re: [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: export compilers to environment instead of setting in toolchain file, bug 542530

2016-11-04 Thread James Le Cuirot
On Fri, 4 Nov 2016 13:20:16 +0100
Alexis Ballier  wrote:

> On Thu,  3 Nov 2016 00:52:17 +0100
> Maciej Mrozowski  wrote:
> 
> > From: Maciej Mrozowski 
> > 
> > ---
> >  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..23cc094 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  
> 
> 
> Have you tested cross compiling ?
> IIRC toolchain file is used *before* getting those vars from env and
> is used to determine system & compiler type. Without this you get
> bugs like #503216

I was dubious (since I filed that bug) but I briefly tested by
cross-compiling media-libs/openal and it worked. I didn't think to try
older CMake versions though. The behaviour might have changed.

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer



Re: [gentoo-dev] [PATCH 2/2] cmake-utils.eclass: export compilers to environment instead of setting in toolchain file, bug 542530

2016-11-04 Thread Alexis Ballier
On Thu,  3 Nov 2016 00:52:17 +0100
Maciej Mrozowski  wrote:

> From: Maciej Mrozowski 
> 
> ---
>  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..23cc094 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


Have you tested cross compiling ?
IIRC toolchain file is used *before* getting those vars from env and is
used to determine system & compiler type. Without this you get bugs like
#503216