Wind River Support Network

HomeDefectsLIN8-4823
Fixed

LIN8-4823 : poison-system-directories

Created: Oct 5, 2016    Updated: Dec 3, 2018
Resolved Date: Oct 19, 2016
Found In Version: 8.0.0.8
Fix Version: 8.0.0.11
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Build & Config

Description

It seems the toolchain built in the SDK does not give warnings when using system-paths, as it used to do in wrl6. 
E.g. if using -L/usr/lib when linking. 

Examples: 

WRL6: 
$ i686-wrs-linux-gnu-gcc --sysroot xxxx -o x x.c $ $ i686-wrs-linux-gnu-gcc --sysroot xxxx -L/usr/lib -o x x.c 
...../i686-wrs-linux-gnu/bin/ld: 
warning: library search path "/usr/lib" is unsafe for cross-compilation $ i686-wrs-linux-gnu-gcc --sysroot xxxxx -L/usr/lib -Wpoison-system-directories -o x x.c 
...../i686-wrs-linux-gnu/bin/ld: 
warning: library search path "/usr/lib" is unsafe for cross-compilation $ i686-wrs-linux-gnu-gcc --sysroot xxxxx -L/usr/lib -Wno-poison-system-directories -o x x.c $ 

WRL8: 
$ i586-wrs-linux-gcc --sysroot=xxxx -o x x.c $ i586-wrs-linux-gcc --sysroot=xxxx -L/usr/lib -o x x.c $ i586-wrs-linux-gcc --sysroot=xxxx -L/usr/lib -Wpoison-system-directories -o x x.c $ i586-wrs-linux-gcc --sysroot=xxxx -L/usr/lib -Wno-poison-system-directories -o x x.c 

Looking at the flags used for building the toolchain, it looks like the "--enable-poison-system-directories" option _is_ enabled, but seems the warnings are not produced when wanted. 

This warning is very useful to guard against mistakes in the build-systems. 

Workaround

Apply attached patch to layers/oe-core before generating SDK.

Other Downloads


Live chat
Online