[poky] Handling CC/CXX and CFLAGS/CXXFLAGS environment variable

Adam Oleksy adam.oleksy at gmail.com
Thu Sep 6 07:06:37 PDT 2018


Hi,
I'm user of the SDK built with yocto with populate_sdk task for image.
I've found that some of the IDEs and CMake has a problem with environment
setup script (e.g. environment-setup-aarch64-poky-linux), which is produced
by toolchain-scripts.bbclass.

The problem is that, the CC and CXX variables contains arguments for the
compiler (march, mtune and sysroot). It causes problems when CMake or IDE
(e.g. CLion) works under such configured environment (look at this bug
report
https://youtrack.jetbrains.com/issue/CPP-11250#focus=streamItem-27-2564925-0-0
for CLion, and this merge request
https://gitlab.kitware.com/cmake/cmake/merge_requests/2352/diffs for
CMake). Authors of these tools are of the opinion that CC/CXX variables
should points only to the compiler program, but not contain any arguments.
It agrees with the definition of these variables, which can be found at
http://www.gnu.org/software/make/manual/make.html#Implicit-Variables.

Could you consider changing the  toolchain-scripts.bbclass that any
argument for the compiler goes to CFLAGS/CXXFLAGS? Is there any rationale
to not change the current status quo?

-- 
Pozdrawiam,
Adam Oleksy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20180906/6580f15a/attachment.html>


More information about the poky mailing list