Yagarto: Do not include the standard header files
From the GCC man page:


  -nostdinc
             Do not search the standard system directories for header files.
             Only the directories you have specified with -I options (and the
             directory of the current file, if appropriate) are searched.
  
  -nostdinc++
             Do not search for header files in the C++-specific standard
             directories, but do still search the other standard directories.
             (This option is used when building the C++ library.)


Other options would be explicitly referencing the header files you do want to include, specifying their directory with -I (which is searched before the standard includes).  Or you could simply remove (or move) the incompatibly licensed headers' directory from the installation.

You may also want -nostdlib to the linker.