[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] Changing toolchain default values via CDT extension point
|
> There is nothing wrong with your toolchain definition that I can see
> upon cursory inspection, but there *is* a bug in the managed build
> system whereby enumerated option defaults specified in option references
> do not work right if you specify them by ID and not by the name that
> appears in the GUI for that option, which is what you are doing.
> I ran into the same problem and hacked around it temporarilty...
There have been no problems with the enumerated option values.
I found out there is something wrong with the "outputs" tag in the relationship between the "tool" tag and the "toolReference" tag.
Finally I was able to create a really BIG workaround for my needs.
I redefined all needed "tool" tags in my own extension. Afterwards my plugin.xml looked like this:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin
id="at.medek.unc20.eclipse.cdt.develop"
name="UNC20 Developer's Plugin"
version="1.0.0"
provider-name="Medek & Schörner Ges.m.b.H">
<runtime>
<library name="unc20_cdt.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="org.eclipse.cdt.managedbuilder.ui"/>
<import plugin="org.eclipse.cdt.managedbuilder.core"/>
</requires>
<extension
id="at.medek.unc20.eclipse.cdt.develop.build"
name="UNC20 CDT Develop Build"
point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo">
<target
name="Binary for UNC20 (Cygwin on Windows)"
id="cdt.managedbuild.target.gnu.cygwin.test"
isTest="false"
defaultExtension="elf"
scannerInfoCollector="org.eclipse.cdt.managedbuilder.internal.scannerconfig.DefaultGnuWinScannerInfoCollector"
makefileGenerator="org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator"
isAbstract="false"
binaryParser="org.eclipse.cdt.core.PE"
osList="win32"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
makeCommand="make"
makeArguments="-k">
<tool
sources="c"
name="GCC C Compiler"
id="at.medek.unc20.gnu.c.compiler"
command="gcc"
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.gnu.DefaultGCCDependencyCalculator"
headerExtensions="h"
natureFilter="cnature"
outputs="o"
outputFlag="-o">
***************************************************
* Plugin 'org.eclipse.cdt.managedbuilder.ui'
* plugin.xml line 720 until line 947
* with changed "id" tags
*
***************************************************
</tool>
<tool
command="as"
sources="s,S"
outputs="o"
name="GCC Assembler"
outputFlag="-o"
id="at.medek.unc20.gnu.c.assembler"
natureFilter="both">
***************************************************
* Plugin 'org.eclipse.cdt.managedbuilder.ui'
* plugin.xml line 449 until line 480
* with changed "id" tags
*
***************************************************
</tool>
<tool
natureFilter="cnature"
sources="o"
name="GCC C Linker"
outputFlag="-o"
command="gcc"
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultNoDependencyCalculator"
id="at.medek.unc20.gnu.c.linker"
outputs="elf">
***************************************************
* Plugin 'org.eclipse.cdt.managedbuilder.ui'
* plugin.xml line 104 until line 228
* with changed "id" tags
*
***************************************************
</tool>
<configuration
name="Debug"
id="at.medek.unc20.cygwin.windows.debug">
<toolReference
command="arm-elf-gcc"
id="at.medek.unc20.gnu.c.compiler">
<optionReference
defaultValue="at.medek.unc20.gnu.c.compiler.optimization.level.none"
id="at.medek.unc20.gnu.c.compiler.option.optimization.level">
</optionReference>
<optionReference
defaultValue="at.medek.unc20.gnu.c.compiler.debugging.level.default"
id="at.medek.unc20.gnu.c.compiler.option.debugging.level">
</optionReference>
<optionReference
defaultValue="false"
id="at.medek.unc20.gnu.c.compiler.option.warnings.allwarn">
</optionReference>
<optionReference
defaultValue="-c -mbig-endian -mcpu=arm7tdmi"
id="at.medek.unc20.gnu.c.compiler.option.misc.other">
</optionReference>
</toolReference>
<toolReference
command="arm-elf-gcc"
output="o"
id="at.medek.unc20.gnu.c.assembler">
<optionReference
defaultValue="-c -mbig-endian -mcpu=arm7tdmi -Wall"
id="at.medek.unc20.gnu.c.assembler.option.flags">
</optionReference>
</toolReference>
<toolReference
outputs="elf"
command="arm-elf-gcc"
id="at.medek.unc20.gnu.c.linker">
<optionReference
defaultValue="true"
id="at.medek.unc20.gnu.c.linker.option.nostart">
</optionReference>
<optionReference
defaultValue="-mbig-endian -mcpu=arm7tdmi -L.. -Tdebug.ld"
id="at.medek.unc20.gnu.c.linker.option.ldflags">
</optionReference>
</toolReference>
</configuration>
<configuration
name="Release"
id="at.medek.unc20.cygwin.windows.release">
<toolReference
command="arm-elf-gcc"
id="at.medek.unc20.gnu.c.compiler">
<optionReference
defaultValue="at.medek.unc20.gnu.c.compiler.optimization.level.none"
id="at.medek.unc20.gnu.c.compiler.option.optimization.level">
</optionReference>
<optionReference
defaultValue="at.medek.unc20.gnu.c.compiler.debugging.level.default"
id="at.medek.unc20.gnu.c.compiler.option.debugging.level">
</optionReference>
<optionReference
defaultValue="false"
id="at.medek.unc20.gnu.c.compiler.option.warnings.allwarn">
</optionReference>
<optionReference
defaultValue="-mbig-endian -mcpu=arm7tdmi"
id="at.medek.unc20.gnu.c.compiler.option.misc.other">
</optionReference>
</toolReference>
<toolReference
command="arm-elf-gcc"
output="o"
id="at.medek.unc20.gnu.c.assembler">
<optionReference
defaultValue="-c -mbig-endian -mcpu=arm7tdmi -Wall"
id="at.medek.unc20.gnu.c.assembler.option.flags">
</optionReference>
</toolReference>
<toolReference
outputs="elf"
command="arm-elf-gcc"
id="at.medek.unc20.gnu.c.linker">
<optionReference
defaultValue="true"
id="at.medek.unc20.gnu.c.linker.option.nostart">
</optionReference>
<optionReference
defaultValue="-mbig-endian -mcpu=arm7tdmi -L.. -Trelease.ld"
id="at.medek.unc20.gnu.c.linker.option.ldflags">
</optionReference>
</toolReference>
</configuration>
</target>
</extension>
</plugin>
This worked as well as the extension I posted here before. (same bug)
However, I found out how to fix the bug in this special case.
I simply added the line 'outputs=""' to the basic linker tool in my extension (at.medek.unc20.gnu.c.linker).
After this little change my extension worked fine. (no bug anymore)
There seems to be a little bug somewhere in the org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo
extension point.