How to build gcc compiler source under yocto bitbake

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

How to build gcc compiler source under yocto bitbake

1,953 Views
alsmith
Contributor I

I am trying to make a modification to gcc compiler and rebuild the compiler under bitbake.

I can bitbake gcc and see the file in  ./tmp/work-shared/gcc-4.8.2-r0/gcc-4.8.2/libstdc++-v3/src/c++11/thread.cc

After modifying thread.cc and changing the PR number in the recipe, the change made in thread.cc is overwritten.  

Can you provide what are the proper steps to make a source change to gcc compiler?

Note.  devtool isn't available.  Therefore, I am try to determine how best to make a change in gcc compiler source for debug purposes only and build the load using bitbake.

Tags (1)
0 Kudos
1 Reply

1,622 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Al Smith,

Yocto is meant to be a way to distribute customized Linux distributions so it’s not really fit for development. That’s why Bitbake does not keep track of changes on the source files and most of the times reverts to the default configuration listed on the recipes.

The best way to debug is compiling outside of Yocto and once all your changes are ready making a patch that applies these changes and include it as an append recipe.

I hope this helps!

Regards,

0 Kudos