I'm attempting to cross-compile for an arm7 board using a toolchain on x86-64 Ubuntu. The headers I need are on the filesystem here:
.../include/<libdir1>
.../include/<libdir2>
[more]
.../include/<libdirN>
but the .../include directory contains incompatible standard headers (for reasons I can't control). Using -I option causes gcc to use these incompatible standard headers rather than the ones it should. Including all the compatible standard header paths with -I options prior to this also does not work.
I want to use the same source paths for when I'm compiling natively and also for the arm7 board:
#include <libdir1/lib1.h>
#include <libdir2/lib2.h>
...
#include <libdirN/libN.h>
Is there a way to do this using the filesystem as it currently exists or do I need to copy the lib1, lib2, ... libN header files somewhere else entirely?