-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable experimental libstdc++ in Yocto Toolchain #69
Comments
Hello @alistair23 and to build
|
Ah, it looks like the experimental features are enabled by the command line when calling GCC. I had tried -std-gnu++14 previously but apparently -std=gnu++17 is required. I'll close this issue as I don't think changes to Yocto are required. Now, the next error of a missing diskio.h file. |
right c++17 is sort of complete in gcc 8, so the project should explicitly ask for it since the default for gcc is gnu++14 standard but you can demand a different std in CMakeLists.txt add
and that should help. |
Ok, progress! Now it looks like the Linux toolchain is missing "machine/syscall.h" which is available in the elf toolchain but that causes all sorts of conflicts. |
|
This isn't really baremetal as it relied on a lot of libraries and uses the Linux toolchain. The problem is that the Linux toolchain doesn't include |
I should have said, stand-alone app ( which is not hosted on an OperatingSystem ), this header is part of the runtime ABI of a platform. If it is expecting this from toolchain then toolchain has to contain the target ABI support like Linux/Freebsd/ etc. OE builds either toolchain for building applications for Linux or free-standing ( which provide their own runtime), hope that makes it a bit clear. |
Ok, I almost have it working. Now I see this weird error of missing standard libraries:
Any ideas why GCC thinks they are missing? |
there was a bug in gcc multilib in OE which is fixed now via patch |
Thanks, I'll check the patch and let you know |
I'm using Yocto to generate a baremetal tool chain with the following command:
MACHINE=baremetal-riscv64 bitbake meta-toolchain
I'm then trying to use that toolchain to build the Kendryte FreeRTOS port.
I source the toolchain
. /usr/local/oecore-x86_64/environment-setup-riscv64-oe-elf
. /usr/local/oecore-x86_64/environment-setup-riscv64-oe-linux
Then I fix their cmake file (see diff at end) and disable reent as that seems to only work with newlib. After that I try and build FreeRTOS but I see this error:
After grepping through the GCC code it looks like in_place_t is an experimental feature. Is it possible to enable experimental libstdc++ features in the Yocto toolchain?
Fix CMake
Disable reent
The text was updated successfully, but these errors were encountered: