QorIQ Linux SDK not using correct compiler

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QorIQ Linux SDK not using correct compiler

1,223 Views
bigdogdan2
Contributor I

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

Labels (1)
0 Kudos
1 Reply

858 Views
Pavel
NXP Employee
NXP Employee

NXP recommends the following command sequence for SDK 2.0-1701 using under Ubuntu 12 or 14 or 16

 

  1. sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm

Extra packages are needed for Ubuntu-64b:

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 ia32-libs lib32ncurses5-dev

 

  1. a) command: ls -l /bin/sh

                Message:  /bin/sh -> dash

  1. b) command: sudo dpkg-reconfigure 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'

  1. c) command for checking: ls -l /bin/sh

                Message: /bin/sh -> bash

 

  1. mount QorIQ Linux SDK v2.0 SOURCE.iso
  2. install SDK after mounting this source
  3. ./sources/meta-freescale/scripts/host-prepare.sh

 

  1. usually Linux recommends also run the following command: sudo usr/sbin/visudo

 

  1. install SDK 2.0-1701 update

 

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos