targets/Linux/__init__.py
changeset 3732 929276eea252
parent 1881 091005ec69c4
child 3750 f62625418bff
equal deleted inserted replaced
3731:549763a28934 3732:929276eea252
    30 class Linux_target(toolchain_gcc):
    30 class Linux_target(toolchain_gcc):
    31     dlopen_prefix = "./"
    31     dlopen_prefix = "./"
    32     extension = ".so"
    32     extension = ".so"
    33 
    33 
    34     def getBuilderCFLAGS(self):
    34     def getBuilderCFLAGS(self):
    35         return toolchain_gcc.getBuilderCFLAGS(self) + ["-fPIC"]
    35         additional_cflags = ["-fPIC"]
       
    36         build_for_realtime = self.CTRInstance.GetTarget().getcontent().getRealTime()
       
    37         if build_for_realtime:
       
    38             additional_cflags.append("-DREALTIME_LINUX")
       
    39         return toolchain_gcc.getBuilderCFLAGS(self) + additional_cflags
    36 
    40 
    37     def getBuilderLDFLAGS(self):
    41     def getBuilderLDFLAGS(self):
    38         return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-lrt"]
    42         return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-lrt"]