Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Add a custom toolchain to the Autotools CDT plugin

Hello,

I am developing an Eclipse plugin[1] which integrate cross-compilation toolchains generated with Buildroot[2].

I already integrate successfully the toolchain to the CDT executable/shared libraries/static libraries build artefact types. To do this, I contribute a new project type which refers to the org.eclipse.cdt.build.core.buildArtefactType.exe/shareLib/staticLib build artefact type (see the attached exe_plugin.xml). As we can see on the screenshot [3], in this case I got exactly what I expect, my toolchain is contributed to the "Executable" build artefact type. Of course, the provided exe_plugin.xml is just a minimal example that allows the toolchain to appear, our real code further customizes the toolchain for our needs, but this is beyond the scope of this e-mail.

Now I am trying to integrate my toolchain to the autotools build artefact type (because we want for example to set a default value for the --host= argument for our toolchain).

I contribute in the same way my toolchain (see the attached autotools_plugin.xml) but this time to the org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools build artefact type.

If we have a look to the second screenshot [4], we can see that my toolchain is not contributed under the "GNU Autotools" and a second "GNU Autotools" section shows up in the wizard, but this second section is empty.

Does someone can explain to me how to contribute a cross compiled toolchain to the Autotools build artefact type thanks to the managed builder build definitions extension point?

Thanks for your help,
Mélanie

[1]https://github.com/mbats/eclipse-buildroot-toolchain-plugin
[2]http://buildroot.org/
[3]http://bit.ly/Z737CO
[4]http://bit.ly/15qZEUS

PS: As I saw that Jeff Johnston was contributing the Autotools plugin to the CDT project I add him as cc to this email.
--
Mélanie Bats, Obeo
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <projectType
            buildArtefactType="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
            id="org.buildroot.autotools.projectType"
            isAbstract="false">
         <configuration
               buildProperties="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
               id="org.buildroot.autotools.configuration"
               name="Configuration"
               parent="org.eclipse.linuxtools.cdt.autotools.core.configuration.build">
            <toolChain
                  archList="all"
                  id="org.buildroot.autotools.toolChain"
                  isAbstract="false"
                  name="My Buildroot Toolchain"
                  osList="linux"
                  superClass="org.eclipse.linuxtools.cdt.autotools.core.toolChain">
            </toolChain>
         </configuration>
      </projectType>
   </extension>

</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <projectType
            buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe"
            id="org.buildroot.executable.projectType"
            isAbstract="false">
         <configuration
               buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug"
               id="org.buildroot.executable.configuration"
               name="Configuration"
               parent="cdt.managedbuild.config.gnu.base">
            <toolChain
                  archList="all"
                  id="org.buildroot.executable.toolChain"
                  isAbstract="false"
                  name="My Buildroot Toolchain"
                  osList="linux"
                  superClass="cdt.managedbuild.toolchain.gnu.base">
            </toolChain>
         </configuration>
      </projectType>
   </extension>

</plugin>

Back to the top