Wind River Support Network

HomeDefectsLIN8-4840
Fixed

LIN8-4840 : Cannot compile due to missing gnu/stubs-soft.h on aarch64

Created: Oct 12, 2016    Updated: Dec 3, 2018
Resolved Date: Jul 24, 2018
Found In Version: 8.0.0.9
Fix Version: 8.0.0.15
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Toolchain

Description

Our customer encountered a problem that when they built a LS1043 project (i.e. aarch64) and exported the SDK, gcc included the SDK cannot compile 64-bit application.

The error message says there is not gnu/stubs-soft.h in the sysroot.  It seems that __ARM_PCS_VFP macro is not defined when compiling 64-bit application.

I think this issue relate to following link:

- bootstrap build fails on ARM hard float system
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62099

I checked my gcc's configure options, the -with-float=hard option is not specified.

% aarch64-wrs-linux-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-wrs-linux-gcc
COLLECT_LTO_WRAPPER=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/libexec/aarch64-wrs-linux/gcc/aarch64-wrs-linux/5.2.0/lto-wrapper
Target: aarch64-wrs-linux
Configured with: /WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/configure --build=x86_64-linux --host=x86_64-wrlinuxsdk-linux --target=aarch64-wrs-linux --prefix=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr --exec_prefix=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr --bindir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/aarch64-wrs-linux --sbindir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/aarch64-wrs-linux --libexecdir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/libexec/aarch64-wrs-linux --datadir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/share --sysconfdir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/etc --sharedstatedir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/com --localstatedir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/var --libdir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/aarch64-wrs-linux --includedir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/include --oldincludedir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/include --infodir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/share/info --mandir=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/x86_64-wrlinuxsdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/sysroots/x86_64-nativesdk-wrlinuxsdk-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=aarch64-wrs-linux- --without-local-prefix --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/5.2.0 --with-build-time-tools=/WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/sysroots/x86_64-linux/usr/aarch64-wrs-linux/bin --with-sysroot=/not/exist --with-build-sysroot=/WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/sysroots/fsl-ls1043 --enable-poison-system-directories --with-mpfr=/WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/sysroots/x86_64-nativesdk-wrlinuxsdk-linux --with-mpc=/WindRiver-wrlinux-8/workspace/ls1043_prj/bitbake_build/tmp/sysroots/x86_64-nativesdk-wrlinuxsdk-linux --enable-nls --enable-__cxa_atexit --with-pkgversion='Wind River Linux 5.2.0-8.0-fsl-ls1043' --with-bugurl=support@windriver.com
Thread model: posix
gcc version 5.2.0 (Wind River Linux 5.2.0-8.0-fsl-ls1043)

Workaround

delete the multilib setup in layers/wr-bsps/fsl-ls1043/conf/machine/ls1043.inc

-# multilib support
-MULTILIBS ?= "multilib:lib32"
-DEFAULTTUNE_virtclass-multilib-lib32 ?= "armv7athf-neon"

Steps to Reproduce

1. configure a project with following options:
$WIND_BASE/wrlinux/configure --enable-reconfig --enable-board=fsl-ls1043 --enable-kernel=standard --enable-rootfs=glibc-std+debug --enable-build=production --with-rcpl-version=0009

2. make

3. make export-sdk

4. Install the SDK
e.x. /opt/windriver/wrlinux/8.0-fsl-ls1043

5. source the environment file of SDK
. /opt/windriver/wrlinux/8.0-fsl-ls1043/environment-setup-aarch64-wrs-linux

6. Compile hello.c

#include <stdio.h>

int main(void)
{
        printf("Hello World!\n");
        return 0;
}

7. Following error will be occurred

% aarch64-wrs-linux-gcc  --sysroot=/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/aarch64-wrs-linux hello.c
In file included from /opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/aarch64-wrs-linux/usr/include/features.h:389:0,
                 from /opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/aarch64-wrs-linux/usr/include/stdio.h:27,
                 from hello.c:1:
/opt/windriver/wrlinux/8.0-fsl-ls1043/sysroots/aarch64-wrs-linux/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
compilation terminated.

Other Downloads


Live chat
Online