Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Using gcc discovery scanner with gcc cross compiler within a tool chain
Using gcc discovery scanner with gcc cross compiler within a tool chain [message #119562] Mon, 06 September 2004 09:42 Go to next message
Sebastian Bauer is currently offline Sebastian BauerFriend
Messages: 25
Registered: July 2009
Junior Member
Hello,

I'm trying to write a toolchain (managed build) which uses a gcc cross
compiler (so cdt doesn't call "gcc" but "ppc-amigaos-gcc" to compile). If I
use DefaultGCCScannerInfoCollector for my newly created target, I only get
the include paths for the host gcc compiler but not for the target compiler.
Is there a possibilty to tell the discovery scanner to use a different
command? (it iss possible to do this manually within standard makefile
project, but by using the plugin the developer shouldn't care about this).

Thanks in advance!

Ciao,
Sebastian
Re: Using gcc discovery scanner with gcc cross compiler within a tool chain [message #119800 is a reply to message #119562] Tue, 07 September 2004 15:11 Go to previous messageGo to next message
Sean Evoy is currently offline Sean EvoyFriend
Messages: 195
Registered: July 2009
Senior Member
Sebastien,
If you call 'ppc-amigaos-gcc -E -P -v foo.cpp' does the cross compiler
give you a list of valid includes paths and symbols?

Sean

Sebastian Bauer wrote:

> Hello,
>
> I'm trying to write a toolchain (managed build) which uses a gcc cross
> compiler (so cdt doesn't call "gcc" but "ppc-amigaos-gcc" to compile). If I
> use DefaultGCCScannerInfoCollector for my newly created target, I only get
> the include paths for the host gcc compiler but not for the target compiler.
> Is there a possibilty to tell the discovery scanner to use a different
> command? (it iss possible to do this manually within standard makefile
> project, but by using the plugin the developer shouldn't care about this).
>
> Thanks in advance!
>
> Ciao,
> Sebastian
>
>
Re: Using gcc discovery scanner with gcc cross compiler within a tool chain [message #119826 is a reply to message #119800] Tue, 07 September 2004 15:49 Go to previous messageGo to next message
Sebastian Bauer is currently offline Sebastian BauerFriend
Messages: 25
Registered: July 2009
Junior Member
Sean Evoy wrote:
> Sebastien,
> If you call 'ppc-amigaos-gcc -E -P -v foo.cpp' does the cross compiler
> give you a list of valid includes paths and symbols?

Yes. As said it works if I alter the command within the standard makefile
project manually. But my plugin is a toolchain for the managed build. So for
the scannerInfoCollector property within the my own target I use the
DefaultGCCScannerInfoCollector. But I don't see a possibility to specify a
different compiler command somewhere. So how does CTD know which command to
call?

I must admit, that I haven't understood this issue fully. So for example I
don't exactly know who invokes the gcc call to determine the includes as
DefaultGCCScannerInfoCollector seems only parse the result of an previous
call.

Ciao,
Sebastian
Re: Using gcc discovery scanner with gcc cross compiler within a tool chain [message #119865 is a reply to message #119826] Tue, 07 September 2004 17:05 Go to previous messageGo to next message
Sean Evoy is currently offline Sean EvoyFriend
Messages: 195
Registered: July 2009
Senior Member
Sebastien,
This collection of includes paths and defines from the compiler takes
place when the project info is created/loaded into the MBS. There are
two strategies; dynamic discovery or a fall-back to ahrd-coded entries.

Unfortunately, the MBS is using the default external scanner info
provider which calls 'gcc' for the dynamic bit and I ran out of time to
make this configurable. Specifying an alternative (either by extending
the IManagedScannerInfoCollector interface or specifying it in the
toolchain spec) is on the list of items TODO for 2.1.

All is not lost, though. If you do not specify a
IManagedScannerInfoCollector, the default is to look through the
includes paths and defined symbols in the toolchain specification and
extract any with the 'builtIn' attribute set to true.

Let me know if this helps.

Sean


Sebastian Bauer wrote:

> Sean Evoy wrote:
>
>>Sebastien,
>>If you call 'ppc-amigaos-gcc -E -P -v foo.cpp' does the cross compiler
>>give you a list of valid includes paths and symbols?
>
>
> Yes. As said it works if I alter the command within the standard makefile
> project manually. But my plugin is a toolchain for the managed build. So for
> the scannerInfoCollector property within the my own target I use the
> DefaultGCCScannerInfoCollector. But I don't see a possibility to specify a
> different compiler command somewhere. So how does CTD know which command to
> call?
>
> I must admit, that I haven't understood this issue fully. So for example I
> don't exactly know who invokes the gcc call to determine the includes as
> DefaultGCCScannerInfoCollector seems only parse the result of an previous
> call.
>
> Ciao,
> Sebastian
>
>
Re: Using gcc discovery scanner with gcc cross compiler within a tool chain [message #119891 is a reply to message #119865] Tue, 07 September 2004 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vhirsl.ca.ibm.com

Sebastien,
there is another way to get proper compiler scanner info discovered.

In CDT Preferences, C/C++ -> New Make Projects preference page, Discovery
Options tab you can set Generate scanner info command options for new
projects (this applies to both new standard and managed projects). You
should uncheck 'Use default' radio button and in the next edit field
replace 'gcc' with 'ppc-amigaos-gcc'. Then recreate your project (or
create a new one) and import your files.

Hope this helps,
Vladimir Hirsl
Re: Using gcc discovery scanner with gcc cross compiler within a tool chain [message #120097 is a reply to message #119891] Wed, 08 September 2004 12:21 Go to previous message
Sebastian Bauer is currently offline Sebastian BauerFriend
Messages: 25
Registered: July 2009
Junior Member
Hello Sean and Vladimir,

I think specifing the includes manually with the builtin option is not
possible, because I don't know where the system includes exactly are located
on the users system.

Altering the prefs has the disadvantage, that then the discovery scanner
works only properly for the cross compiler. But I guess at the moment it is
the only possibility until 2.1.0 is out (I'll mention this in the docs).
Thanks for the hint.

Ciao,
Sebastian
Previous Topic:definedSymbols
Next Topic:Problems Opening Editor
Goto Forum:
  


Current Time: Wed Jul 17 03:15:07 GMT 2024

Powered by FUDForum. Page generated in 0.03942 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top