Yes it is possible. Just select "External Builder" on the "Builder Options" tab in the "C / C ++ Build" section. I selected a script that executes the following commands:
sudo chroot $HOME/mychroot/ bash -c 'cd /myproject-location/; make clean; make'
To avoid password verification, I added the following line to the / etc / sudoers file:
%sudo ALL= NOPASSWD: /usr/sbin/chroot
To avoid the erroneous assembly / syntax error message, you need to add the included files from the chroot environment to the eclipse cdt project.
source share