Bug 12431 - eclipse-poky using host gcc/g++ for indexing
Summary: eclipse-poky using host gcc/g++ for indexing
Status: CLOSED WONTFIX
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 2.4.1
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.99
Assignee: Chin Huat Ang
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-12-19 09:19 UTC by Chin Huat Ang
Modified: 2019-05-23 15:06 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Incorrect include paths listed in project explorer view, incorrect header files resolved in editor view. (110.61 KB, image/png)
2017-12-19 09:19 UTC, Chin Huat Ang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chin Huat Ang 2017-12-19 09:19:11 UTC
Created attachment 4156 [details]
Incorrect include paths listed in project explorer view, incorrect header files resolved in editor view.

To reproduce:

1. Create Yocto Project SDK Autotools ANSI C or C++ project
2. Build the project and expand "Includes" to inspect include paths

Observations:

1. All include paths begins with /usr, e.g. /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include
2. Double-clicking include headers like <iostream> or <stdio.h> would resolve to host locations, e.g. /usr/include/c++/6.3.1/iostream
Comment 1 Chin Huat Ang 2018-02-01 07:07:44 UTC
Apparently eclipse-poky still uses the following to discover include paths:

gcc  -E -P -v -dD "/home/parallels/eclipse-workspace/eclipse-committers-oxygen-R-linux-gtk-x86_64/runtime-New_configuration/.metadata/.plugins/org.eclipse.cdt.managedbuilder.core/spec.c"

The gcc command appears to be missing the target prefix.
Comment 2 Chin Huat Ang 2018-02-01 12:11:48 UTC
The command used by CDT to dump compiler spec is user configuration in project properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers -> CDT GCC Built-in Compiler Settings:

${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"

We might need a way to programmatically set this, presumably when YoctoSDKAutotoolsProjectNature is set to the project.
Comment 3 Armin Kuster 2019-05-23 15:00:13 UTC
eclipse has been dropped.
Comment 4 Armin Kuster 2019-05-23 15:06:55 UTC
closing