Wind River Support Network

HomeDefectsLIN1021-125
Acknowledged

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

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

Description

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
--machines=nxp-s32g2xx
3. Source the environment
4. Add the following to local.conf
WRTEMPLATE ?= "feature/debug"
BB_NO_NETWORK ?= '0'
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
./project-dir/build/tmp-glibc/deploy/sdk/wrlinux-10.20.42.0-glibc-x86_64-nxp_s32g2xx-wrlinux-image-std-sdk.sh
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
Online