[odb-users] Add --sysroot support to ODB compiler
Stath Paul
pstath at axxcelera.com
Mon Mar 11 08:26:11 EDT 2013
Boris --
> > 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=113a5dd44ebef3b35
> 8fe09015b03576cff583043
>
> I tried it on my setup and it does the trick. Can you verify it also
> works for you?
>
The patch work great.
Thanks so much.
Now just specifying "-x --sysroot" does as I would expect, and I don't need to add
the "-I<sysroot-path>/usr/include" argument.
> > 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.
>
Ah. Got it.
> > 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?
>
I am not. Just noticed the comments in profile_paths() method.
I'm always wary about parsing text which is not "machine readable". (XML, JSON, et. al.)
I was not aware that the odb.so plugin was not even getting loaded during preprocessing.
Given the lack of options for getting information out of the CPP (other than -v) I guess
that parsing the -v output it the best of the rather limited options. ;)
-- Paul
More information about the odb-users
mailing list