Edouard@642: from ..toolchain_gcc import toolchain_gcc lbessard@321: lbessard@321: class Xenomai_target(toolchain_gcc): lbessard@321: extension = ".so" Edouard@633: def getXenoConfig(self, flagsname): lbessard@321: """ Get xeno-config from target parameters """ Edouard@717: xeno_config=self.ConfigTreeRootInstance.GetTarget().getcontent()["value"].getXenoConfig() Edouard@633: if xeno_config: Edouard@722: from ProcessLogger import ProcessLogger Edouard@717: status, result, err_result = ProcessLogger(self.ConfigTreeRootInstance.logger, Edouard@633: xeno_config + " --skin=native --"+flagsname, Edouard@633: no_stdout=True).spin() Edouard@633: if status: Edouard@717: self.ConfigTreeRootInstance.logger.write_error(_("Unable to get Xenomai's %s \n")%flagsname) Edouard@633: return [result.strip()] Edouard@633: return [] lbessard@321: lbessard@321: def getBuilderLDFLAGS(self): Edouard@633: xeno_ldflags = self.getXenoConfig("ldflags") Edouard@634: return toolchain_gcc.getBuilderLDFLAGS(self) + xeno_ldflags + ["-shared"] lbessard@321: lbessard@321: def getBuilderCFLAGS(self): Edouard@633: xeno_cflags = self.getXenoConfig("cflags") Edouard@635: return toolchain_gcc.getBuilderCFLAGS(self) + xeno_cflags + ["-fPIC"] lbessard@321: