AnsweredAssumed Answered

QorIQ Linux SDK not using correct compiler

Question asked by Daniel Lee on Mar 14, 2017
Latest reply on Mar 15, 2017 by Pavel Chubakov

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

Outcomes