def __init__(self, *args, **kargs): GCC.__init__(self, *args, **kargs) self._memory_model = None self.define_macro("__linux__") self.define_macro("BB_HAS_STDINT_H") self.define_macro("printf", "__simple_printf") self.set_memory_model("LMM") # case insensetive self.set_extra_preopts(["-Os", "-Wall"])
def _link(self, objects, output_dir=None, libraries=None, library_dirs=None, debug=False, extra_preargs=None, extra_postargs=None, target_lang=None): if not extra_preargs: extra_preargs = [] if self.get_memory_model(): extra_preargs.append("-m%s" % self.get_memory_model()) extra_preargs.extend(self.get_linker().get_opts()) # remove this! GCC._link(self, objects, output_dir, libraries, library_dirs, debug, extra_preargs, extra_postargs, target_lang)
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): if self.get_memory_model(): cc_args.append("-m%s" % self.get_memory_model()) GCC._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)