diff --git a/waftools/waf_customizations.py b/waftools/waf_customizations.py index 8163c9ffb4..fb5f130276 100644 --- a/waftools/waf_customizations.py +++ b/waftools/waf_customizations.py @@ -33,7 +33,13 @@ def build(ctx): cls = Task.classes['cprogram'] class cprogram(cls): - run_str = cls.hcode + '${LAST_LINKFLAGS}' + try: + run_str = cls.orig_run_str + '${LAST_LINKFLAGS}' + except AttributeError: + try: + run_str = cls.hcode + '${LAST_LINKFLAGS}' + except TypeError: + run_str = cls.hcode.decode('iso8859-1') + '${LAST_LINKFLAGS}' cls = Task.classes['macplist'] class macplist(cls):