Bug 5761

Summary: powerpc toolchain for p2020rdb fails with "error: not configured for SPE instruction set"
Product: [Yocto Project Subprojects] ADT Reporter: Maxin B. John (inactive) <maxin.baby.john>
Component: adtAssignee: Zhenhua Luo <zhenhua.luo>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: david.nystrom, poky.adt.watcher, poky.watcher
Version: 1.5.1   
Target Milestone: 1.5.2   
Hardware: x86   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Maxin B. John (inactive) 2014-01-28 12:48:59 UTC
powerpc-poky-linux-gnuspe-gcc fails to compile with "error: not configured for SPE instruction set"

How to reproduce the bug:

# git clone git://git.yoctoproject.org/poky
# cd poky
# git clone git://git.yoctoproject.org/meta-fsl-ppc

Configure for p2020rdb , build meta-toolchain and Install it

# bitbake meta-toolchain
# cd tmp/deploy/sdk/
# bash poky-eglibc-x86_64-meta-toolchain-ppce500v2-toolchain-1.5+snapshot.sh
# source /opt/poky/1.5+snapshot/environment-setup-ppce500v2-poky-linux-gnuspe

Compile a hello world application:

# cat test.c
#include <stdio.h>

int main()
{
    printf("Test \n");
    return 0;
}

# cat Makefile
all:
	$(CC) test.c -o test

# make
powerpc-poky-linux-gnuspe-gcc  -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot=/opt/poky/1.5+snapshot/sysroots/ppce500v2-poky-linux-gnuspe test.c -o test
test.c:1:0: error: not configured for SPE ABI
 #include <stdio.h>
 ^
test.c:1:0: error: not configured for SPE instruction set
make: *** [all] Error 1


# powerpc-poky-linux-gnuspe-gcc  -v
Using built-in specs.
COLLECT_GCC=powerpc-poky-linux-gnuspe-gcc
COLLECT_LTO_WRAPPER=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/powerpc-poky-linux/gcc/powerpc-poky-linux/4.8.2/lto-wrapper
Target: powerpc-poky-linux
Configured with: /media/sdc1/fb/majo/vfy/poky/build/tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=powerpc-poky-linux --prefix=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux --sbindir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/powerpc-poky-linux --libexecdir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/libexec/powerpc-poky-linux --datadir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib/powerpc-poky-linux --includedir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/media/sdc1/fb/majo/vfy/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-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=powerpc-poky-linux- --without-local-prefix --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 --enable-e500_double --with-gxx-include-dir=/opt/poky/1.5+snapshot/sysroots/ppce500v2-poky-linux/usr/include/c++ --with-build-time-tools=/media/sdc1/fb/majo/vfy/poky/build/tmp/sysroots/x86_64-linux/usr/powerpc-poky-linux/bin --with-sysroot=/opt/poky/1.5+snapshot/sysroots/ppce500v2-poky-linux --with-build-sysroot=/media/sdc1/fb/majo/vfy/poky/build/tmp/sysroots/p2020rdb --enable-targets=powerpc64 --disable-libunwind-exceptions --disable-libssp --disable-libgomp --disable-libmudflap --with-mpfr=/media/sdc1/fb/majo/vfy/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --with-mpc=/media/sdc1/fb/majo/vfy/poky/build/tmp/sysroots/x86_64-nativesdk-pokysdk-linux --enable-nls --with-long-double-128 --enable-__cxa_atexit
Thread model: posix
gcc version 4.8.2 (GCC)
Comment 1 Maxin B. John (inactive) 2014-01-29 09:21:54 UTC
reverting commit 11d9127ac57514394f8297f9fdfc7b31e163fcb8  resolves this problem.
Comment 2 Jessica 2014-01-30 15:47:18 UTC
Hi Zhenhua,

Can you take a look since the issue is related to ppc.
Comment 3 Paul Eggleton 2014-02-26 22:12:13 UTC
*** Bug 5886 has been marked as a duplicate of this bug. ***
Comment 5 Maxin B. John (inactive) 2014-03-05 14:30:13 UTC
Toolchain works now. Thank you very much!

make
powerpc-poky-linux-gnuspe-gcc  -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot=/opt/poky/1.5+snapshot/sysroots/ppce500v2-poky-linux-gnuspe test.c -o test
1|majo@sestofb10:~
> file test
test: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=71da408c0111e9f86f3dbe97812287e7335556ed, not stripped