[odb-users] Add --sysroot support to ODB compiler

Boris Kolpackov boris at codesynthesis.com
Fri Mar 8 15:02:26 EST 2013


Hi Paul,

Stath Paul <pstath at axxcelera.com> writes:

> I believe that passing through the "--sysroot" argument is also required,
> since "--sysroot" effects the default search path.

Yes, you are correct. Here is the patch:

http://scm.codesynthesis.com/?p=odb/odb.git;a=patch;h=113a5dd44ebef3b358fe09015b03576cff583043

I tried it on my setup and it does the trick. Can you verify it also
works for you?


> I'm also unsure if the compiler is always "c++", or might be modified 
> by "-x /path/to/gcc/non-installed-g++".

The "c++" you are seeing is the compilation mode (-x c++), not the
compiler executable. The actual compiler is the same as what's used
for normal compilation, and, yes, it can be overridden with -x.


> There seems to be some fragility with parsing the "c++ -v -E -P - < 
> /dev/null" output.  (NLS, possible change or message by GCC, etc.)

The code actually tries to avoid relying on any natural language
text (which can be translated). Are you seeing any specific issues?


> Since you already have a plug-in, would it be possible to have it 
> obtain the gcc search path from GCC and output it in a fixed, easy
> to parse format that is under your control?

While doable that would be quite awkward. The plugin doesn't just
get control of the compilation process. Rather, it can register
to be called at certain points in the compilation process. For
example, if all we are doing is preprocessing, then the plugin
is not even get called. So we would actually have to compile
something real in order to give the plugin a chance to run. And
I would prefer not to go this way unless there is a really good
reason to.

Boris



More information about the odb-users mailing list