author | Laurent Bessard |
Wed, 29 May 2013 00:11:27 +0200 | |
changeset 1183 | a01618805821 |
parent 726 | ae63ccc29444 |
child 1279 | 0eb9f8af479f |
permissions | -rwxr-xr-x |
642 | 1 |
from ..toolchain_gcc import toolchain_gcc |
321 | 2 |
|
3 |
class Xenomai_target(toolchain_gcc): |
|
4 |
extension = ".so" |
|
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
5 |
def getXenoConfig(self, flagsname): |
321 | 6 |
""" Get xeno-config from target parameters """ |
725 | 7 |
xeno_config=self.CTRInstance.GetTarget().getcontent()["value"].getXenoConfig() |
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
8 |
if xeno_config: |
726 | 9 |
from util.ProcessLogger import ProcessLogger |
725 | 10 |
status, result, err_result = ProcessLogger(self.CTRInstance.logger, |
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
11 |
xeno_config + " --skin=native --"+flagsname, |
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
12 |
no_stdout=True).spin() |
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
13 |
if status: |
725 | 14 |
self.CTRInstance.logger.write_error(_("Unable to get Xenomai's %s \n")%flagsname) |
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
15 |
return [result.strip()] |
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
16 |
return [] |
321 | 17 |
|
18 |
def getBuilderLDFLAGS(self): |
|
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
19 |
xeno_ldflags = self.getXenoConfig("ldflags") |
634
5b925a1d8fed
fixed redondant ldflag and a typo in xenomai build
Edouard Tisserant
parents:
633
diff
changeset
|
20 |
return toolchain_gcc.getBuilderLDFLAGS(self) + xeno_ldflags + ["-shared"] |
321 | 21 |
|
22 |
def getBuilderCFLAGS(self): |
|
633
70c84e6ff92c
Xenomai build now ignores xeno-config if not set
Edouard Tisserant
parents:
615
diff
changeset
|
23 |
xeno_cflags = self.getXenoConfig("cflags") |
635 | 24 |
return toolchain_gcc.getBuilderCFLAGS(self) + xeno_cflags + ["-fPIC"] |
321 | 25 |