I'm trying to create a "hello world project" using

  • Jam (perforce) build system
  • C ++
  • Linux
  • arm-poky-linux-gnueabi-gcc compiler

helloworld-perforce-jam.cpp

#include <stdio.h> int main(int args, char* argv[]) { printf("\n\n\nHello World from HELLOWORLD-PERFORCE-JAM!!!\n\n\n\n"); return 0; } 

Jamfile

 Echo $(CC) ; Main helloworld-perforce-jam : helloworld-perforce-jam.cpp ; 

No problem if I use arm-poky-linux-gnueabi-gcc directly bypassing the Jam (build system) as shown below:

 ygyerts@ygyerts:$ /home/user/full_path/arm-poky-linux-gnueabi-gcc helloworld-perforce-jam.cpp 

Successfully created a binary for Linux ARM .

No problem if I use gcc by default (as determined by the Jam build system itself), example:

 ygyerts@ygyerts:$ jam cc ...found 66 target(s)... ...updating 1 target(s)... Link helloworld-perforce-jam Chmod1 helloworld-perforce-jam ...updated 1 target(s)... 

A binary is created, just not the one needed, it is intended for !!! x86 architecture !!!. The idea is to use the predefined gcc compiler (/ home / user / full_path / arm-poky-linux-gnueabi-gcc). This is a blocker, I don’t know how to explain to the Jam build system which compiler to use ...

I played with the build launch parameters as below:

 ygyerts@ygyerts:$ jam -s CC=/home/user/full_path/arm-poky-linux-gnueabi-gcc /home/user/full_path/arm-poky-linux-gnueabi-gcc ...found 66 target(s)... ...updating 2 target(s)... C++ helloworld-perforce-jam.o Link helloworld-perforce-jam helloworld-perforce-jam.o: file not recognized: File format not recognized collect2: error: ld returned 1 exit status /home/ygyerts/TOOLING/TeamCity/TeamCity-9.1.7/buildAgent/work/e58af29ade3fd40c/fsl-community-bsp/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -o helloworld-perforce-jam helloworld-perforce-jam.o ...failed Link helloworld-perforce-jam ... ...failed updating 1 target(s)... ...updated 1 target(s)... 

Please help me understand what I have to install in the environment variables in order to successfully hit my helloworld example for arm-linux architecture, not for x86_64-linux ...

    0