Wind River Support Network

HomeDefectsLIN6-59
Fixed

LIN6-59 : [wrl60]unrecognized LDFLAGS option '-Wl,-O1' under sdk extract dir

Created: Nov 17, 2013    Updated: Dec 3, 2018
Resolved Date: Dec 9, 2013
Found In Version: 6.0
Fix Version: 6.0.0.1
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Docs

Description

$LD $LDFLAGS
x86_64-wrs-linux-ld: unrecognized option '-Wl,-O1'
x86_64-wrs-linux-ld: use the --help option for usage information

attach the env.sh file
$ cat env.sh  | grep LDFLAGS
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu"

The Wl -O1 should not be the LD flags

Workaround

Applications
When linking applications as part of using the SDK for development, you should only use
$LDFLAGS and $CC, and not use $LD. 

This is required because the compiler has built-in references to the support libraries for building the application(s). 

Kernel modules
When building kernel modules, do not use $LDFLAGS at all. The kernel sources know the
explicit set of variables required when linking kernel modules. If you need to compile kernel modules in the directory created from extracting the SDK, you must first unset
$LDFLAGS using the following command:

$ unset LDFLAGS

Steps to Reproduce

1)configure --enable-board=qemux86-64 --enable-kernel=standard --enable-rootfs=glibc-std

2)make export-sdk

3) extract the sdk script

./wrlinux-6.0.0.0-eglibc-x86_64-qemux86_64-wrlinux-image-glibc-std-sdk.sh

4) under sdk extract dir

 $ source env.sh
 $ $LD $LDFLAGS

Other Downloads


Live chat
Online