[OE-core] [PATCH] cmake: add CMAKE_SYSROOT to generated toolchain file

Khem Raj raj.khem at gmail.com
Fri Aug 24 15:44:28 UTC 2018


On Fri, Aug 24, 2018 at 8:19 AM Bach, Pascal <pascal.bach at siemens.com>
wrote:

>
> > > Fixes problems which we have also seen on sumo branch. Thanks for this!
> >
> > Sorry, spoke too soon. This fixes compilation on a few recipes in my
> tree but
> > there are still lots failures with the same error message. We had a hacky
> > patch to cmake as a workaround but that too causes some problems:
>
> I have not yet figured out what CMake based projects are affected and why.
> The error seems to happen only for certain projects.
>
> > --- a/Modules/Compiler/GNU.cmake
> > +++ b/Modules/Compiler/GNU.cmake
> > @@ -45,7 +45,7 @@
> >    set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE
> > "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E
> > <SOURCE> > <PREPROCESSED_SOURCE>")
> >    set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE
> > "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S
> > <SOURCE> -o <ASSEMBLY_SOURCE>")
> >    if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS
> > 4) # work around #4462
> > -    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
> > +    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-I ")
> >    endif()
> >
> >    set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
> >
> > I wonder what the real fix could be...
> >
>
> This looks similar to another workaround I saw.
> Setting CMAKE_NO_SYSTEM_FROM_IMPORTED to True. I'm also not sure what the
> real fix is.
> The issue is also discussed here:
> https://gitlab.kitware.com/cmake/cmake/issues/16291
>

IIRC this was a defect in cmake

>
> Pascal
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180824/2a3744c2/attachment-0002.html>


More information about the Openembedded-core mailing list