PowerPC Switch Extensions for Eclipse C/C++ Development Tooling
A plug-in to the Eclipse CDT that provides new C/C++ Project Types with PowerPC-specific GNU toolchain switches available in the project properties.
Date Posted: February 27, 2007
|
|
 |
 |
|
What is PowerPC Switch Extensions for Eclipse C/C++ Development Tooling?
This plug-in adds new project types to the Eclipse C/C++ Development Tooling (CDT); these project types provide a convenient way of setting PowerPC®-specific switches (such as -mcpu=7455) to the GNU C and C++ compilers (GCC, g++), linker (also GCC, g++), and assembler (as).
Without this plug-in, programmers are required to research what switches they need by using the GCC man pages and then adding them to the C/C++ project properties using the Miscellaneous Switches dialog box. This process is inconvenient and error-prone.
Project types in the CDT specify the goal of a particular project: to build an executable, to build a static library, to build a shared library, etc. This plug-in adds the following project types: PowerPC Executable, PowerPC Static Library, and PowerPC Shared Library.
This plug-in limits the number of conflicting switch combinations that are possible (but it does not eliminate them altogether). For example, on the command line of GCC, one could specify the following conflicting combination: -mstrict-align -mno-strict-align, but that is not possible with this plug-in.
The package includes the plug-in, installation and usage instructions, and documentation.
How does it work? PowerPC Switch Extensions for Eclipse CDT plugs into the CDT's managed builder extension point, adding the new project types, taking advantage of (subclassing, to be precise) as much as possible of the original tool definitions so that there is little duplication. The plug-in also adds documentation in the form of tool tips on each option to describe its purpose and some suggested uses. These descriptions are mostly slight modifications of text found in the GCC man pages.
To eliminate conflicting switch combinations, many of the switches are placed in lists where only one can be selected at a time. However, it is still possible to add conflicting switches when they are contained in separate option lists. For example, in the description section above, it was mentioned that one cannot specify both -mstrict-align and -mno-strict-align. This is because the plug has one option line for Strict Alignment; it can be set to Enabled (which emits -mstrict-align), Disabled (emits -mno-strict-align), or not set at all, which emits no switch for that option. Because it cannot be set to both Enabled and Disabled simultaneously, at most one switch is emitted. Where this doesn't work as well is in cases such as -mcpu=* and -mtune=*; one might want to have these set to different values, but not all of the differing values make sense. For example, one might set -mcpu=405 and -mtune=970. This is probably nonsensical, but this plug-in will allow this combination to be set because they are on different option lines.
At this time, the plug-in consists mostly of a plugin.xml file and a properties file. There is no Java™ or other language code in it, nor are there any binaries.
|
|
 |

|  | About the technology author(s): Corey Ashford has been a software engineer with IBM since 2003. Before working starting work with Eclipse in June of 2006, he worked on IBM Rational® Software's Apex Ada Developer in the area of cross-development to PowerPC® and other architectures.
| |
|
| |