Wind River Support Network


LIN1021-125 : Build spec warning for nxp-s32g2xx SDK

Created: May 17, 2021    Updated: Jun 8, 2021
Found In Version:
Severity: Standard
Applicable for: Wind River Linux LTS 21
Component/s: Build & Config


Build the nxp-s32g2xx SDK from scratch may lead to a "_FORTIFY_SOURCE requires compiling with optimization" warning.

Steps to Reproduce

1. Clone a Linux CD install
2. Configure the project with the option
3. Source the environment
4. Add the following to local.conf
WRTEMPLATE ?= "feature/debug"
5. Build the rootfs and SDK image
bitbake wrlinux-image-std
bitbake -c do_populate_sdk wrlinux-image-std
6. Extract the generated sdk somewhere
7. In workbench 4, go to file->new->example->Wind River Linux Application Sample Project -> The Hello World Demonstration Program
8. Right click the project -> Import -> Wind RIver Linux SDK and import the generated SDK from step 6. 
9. Change the build spec to the SDK. 
10. Right click the project -> Rebuild
You will get a warning similar to this:

In file included from /media/felix/workspace/SDK-lincd-nxp-s32g2xx/sysroots/cortexa53-wrs-linux/usr/include/bits/libc-header-start.h:33,
 from /media/felix/workspace/SDK-lincd-nxp-s32g2xx/sysroots/cortexa53-wrs-linux/usr/include/stdio.h:27,
 from /media/felix/workspace/WB_WORKSPACE/hello_Linux/hello.c:1:
/media/felix/workspace/SDK-lincd-nxp-s32g2xx/sysroots/cortexa53-wrs-linux/usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 397 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
 | ^~~~~~~

Live chat