Liviu
    I actually do this for my arduino eclipse plugin. Arduino
      supports arm, avr and arc-32 gnu toolchains (There may be more -it
      is not relevant to the plugin-). The plugin runs in windows, Linux
      and Mac. It does this with full support of the CDT indexer and
      discovery features. 
    
    The way I do this is by using environment variables for all the
      command lines. Below an example for the C++ compiler.
    
    
    The way I set the environment variables is fully based on the
      Arduino way but that is simply because it is an: "Arduino eclipse
      plugin."
    Below is part of my plugin.xml that shows all commands are
      environment variables and as such can be anything (I sometimes use
      echo because the action is not needed).
    I have not much experience in moving workspaces from system A to
      B (well some between linux and windows) but basically if you reset
      all the environment variables (which you do in my plugin by
      selecting the board again) all is working fine again. I know some
      people use the plugin for bigger projects with version control and
      multiple users. It is very unlikely they are all on the same OS.
    
    The only problem I'm aware off that I have not really fixed is
      the situation where the environment settings are not yet properly
      set (moving stuff around so links no longer work...). In that case
      the discovery will cause a null pointer exception. Once the
      environment variables are properly set they go away.
    Best regards
    Jantje
    PS in case you wonder how much this is used: about 6390 builds
      per day the last month.
    
           <toolChain
                    archList="all"
                    id="it.baeyens.arduino.core.toolChain.release"
                    isAbstract="false"
                   
      languageSettingsProviders="it.baeyens.arduino.languageSettingsProvider"
                    name="%toolChain.name"
                    osList="all"
                    targetTool="it.baeyens.arduino.tool.size">
                 <targetPlatform
                       archList="all"
                       binaryParser="org.eclipse.cdt.core.ELF"
                       id="it.baeyens.arduino.targetplatform"
                       name="%targetPlatform.name"
                       osList="all">
                 </targetPlatform>
                 <builder
                       id="it.baeyens.arduino.sketch.builder"
                       name="%builder.name.0"
                       superClass="it.baeyens.arduino.gnu.builder">
                 </builder>
                 <optionCategory
                      
      id="it.baeyens.arduino.core.optionCategory.includePaths"
                       name="%optionCategory.name">
                 </optionCategory>
                 <tool
                       announcement="%tool.Arduino.CPP.announcement"
                       command="${A.RECIPE.CPP.O.PATTERN}"
                       commandLinePattern="${A.RECIPE.CPP.O.PATTERN.1}
      ${FLAGS} -D__IN_ECLIPSE__=1 -x c++ ${INPUTS}
      ${A.RECIPE.CPP.O.PATTERN.2} ${OUTPUT} ${A.RECIPE.CPP.O.PATTERN.3}
      ${JANTJE.WARNING_LEVEL} ${JANTJE.EXTRA.COMPILE}
      ${JANTJE.EXTRA.CPP.COMPILE}"
                      
      errorParsers="org.eclipse.cdt.core.GCCErrorParser"
                       id="it.baeyens.arduino.tool.sketch.compiler.cpp"
                       name="%tool.Arduino.CPP2O.name"
                       natureFilter="both">
                    <optionCategory
                         
      id="it.baeyens.arduino.core.cpp.optionCategory.includePaths"
                          name="%optionCategory.include.name">
                    </optionCategory>
                    <option
                          browseType="directory"
                         
      category="it.baeyens.arduino.core.cpp.optionCategory.includePaths"
                          command="-I"
                         
      id="it.baeyens.arduino.compiler.cpp.sketch.option.incpath"
                          name="%option.include.path.name"
                          resourceFilter="project"
                          valueType="includePath">
                    </option>
                    <inputType
                          buildVariable="CPP_SKETCH_FILES"
                         
dependencyCalculator="it.baeyens.arduino.toolchain.ArduinoDependencyCalculator"
                         
      dependencyContentType="org.eclipse.cdt.core.cxxHeader"
                         
      id="it.baeyens.arduino.compiler.cpp.sketch.input"
                          name="%inputType.CPP.name"
                          primaryInput="true"
                         
      sourceContentType="org.eclipse.cdt.core.cxxSource">
                    </inputType>
                    <outputType
                          buildVariable="LINK_OBJ"
                         
      id="it.baeyens.arduino.compiler.cpp.sketch.link.output"
                          name="%outputType.CPP.link.name"
                         
      nameProvider="it.baeyens.arduino.toolchain.LinkNameProvider"
                          outputs="o"
                          primaryOutput="true">
                    </outputType>
                    <outputType
                          buildVariable="AR_OBJ"
                          id="it.baeyens.arduino.compiler.cpp.ar.output"
                          name="%outputType.CPP.AR.name"
                         
      nameProvider="it.baeyens.arduino.toolchain.ArchiveNameProvider"
                          outputs="o"
                          primaryOutput="true">
                    </outputType>
                 </tool>
      ...
    
    
    Op 30/05/2016 om 19:57 schreef Doug
      Schaefer:
    
    
      I know this isn't going to be helpful, but it's
        issues like these that have driven me to do a new, much simpler
        build system. My hope is to make toolchain configuration
        automatic and seemless auto discovering as much as it can and
        minimizing the setup you need to do, especially if you're using
        an external build system like CMake or autoconf, etc.
        
        
        In the short term, things like dealing with the missing
          LLVM plug-in seem to be bugs. Was there anything interesting
          in the log like an NPE? There might be some quick fixes we
          could do to avoid these issues.
      
      
      
      _______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev