Hi,
I am using the QorIQ Linux SDK and for some reason the make files is choosing the wrong compiler for .cpp files. The make system should be using gcc for c files and g++ for .cpp files.
Any idea why make is not using g++ for .ccp files? I've tried other cross compilers and they choose the right gcc/g++ compiler.
This is one of the output from make command
powerpc64-fsl-linux-gcc -E -mhard-float -m64 -mcpu=e6500 --sysroot=/data/ppce6500_cross_compiler/sysroots/ppc64e6500-fsl-linux -g -c DiagUtils.cpp -o DiagUtils.o
Makefile:
all:
$(MAKE) -f make.include -e LIBNAME=`$(SUPPORT)/srctree \`pwd\``
Objects file
#
# objects to build
#
SOURCES = \
DiagUtils.cpp \
DeviceUtils.c \
Utils.c
cross compile environment variables
root@slow:~$ echo $CROSS_COMPILE
powerpc64-fsl-linux-
root@slow:~$ echo $CXX
powerpc64-fsl-linux-g++ -mhard-float -m64 -mcpu=e6500 --sysroot=/data/ppce6500_cross_compiler/sysroots/ppc64e6500-fsl-linux
root@slow:~$ echo $CC
powerpc64-fsl-linux-gcc -mhard-float -m64 -mcpu=e6500 --sysroot=/data/ppce6500_cross_compiler/sysroots/ppc64e6500-fsl-linux
root@slow:~$
version
powerpc64-fsl-linux-gcc (GCC) 4.9.2
I understand the makefile can be forced to use g++, but i was wondering why other cross compilers choose the correct gcc/g++ but the FSL one isn't.
Thanks,
Dan
NXP recommends the following command sequence for SDK 2.0-1701 using under Ubuntu 12 or 14 or 16
Extra packages are needed for Ubuntu-64b:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 ia32-libs lib32ncurses5-dev
Message: /bin/sh -> dash
Answer after password – No
Message:
Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
Message: /bin/sh -> bash
Test your board using this command sequence.
Usually EULA file also should be copied to the QorIQ-SDK-V2.0-20160527-yocto/build_t1024rdb/tmp/work/t1024rdb-fsl-linux/rcw/git-r0/git folder.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------