File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,11 @@ SREC_CAT = srec_cat
75
75
{%- endif %}
76
76
{%- block additional_executables -%}{%- endblock %}
77
77
78
- {% for flag in c_flags %}C_FLAGS += "{{ flag}}"
78
+ {% for flag in c_flags %}C_FLAGS += {{shell_escape( flag)}}
79
79
{% endfor %}
80
- {% for flag in cxx_flags %}CXX_FLAGS += "{{ flag}}"
80
+ {% for flag in cxx_flags %}CXX_FLAGS += {{shell_escape( flag)}}
81
81
{% endfor %}
82
- {% for flag in asm_flags %}ASM_FLAGS += "{{ flag}}"
82
+ {% for flag in asm_flags %}ASM_FLAGS += {{shell_escape( flag)}}
83
83
{% endfor %}
84
84
85
85
LD_FLAGS :={%- block ld_flags -%} {{ld_flags|join(" ")}} {% endblock %}
Original file line number Diff line number Diff line change 29
29
from tools .utils import NotSupportedException
30
30
from tools .targets import TARGET_MAP
31
31
32
+ SHELL_ESCAPE_TABLE = {
33
+ "(" : "\(" ,
34
+ ")" : "\)" ,
35
+ }
36
+
37
+
38
+ def shell_escape (string ):
39
+ return "" .join (SHELL_ESCAPE_TABLE .get (char , char ) for char in string )
40
+
32
41
33
42
class Makefile (Exporter ):
34
43
"""Generic Makefile template that mimics the behavior of the python build
@@ -97,6 +106,7 @@ def generate(self):
97
106
'link_script_option' : self .LINK_SCRIPT_OPTION ,
98
107
'user_library_flag' : self .USER_LIBRARY_FLAG ,
99
108
'needs_asm_preproc' : self .PREPROCESS_ASM ,
109
+ 'shell_escape' : shell_escape ,
100
110
}
101
111
102
112
if hasattr (self .toolchain , "preproc" ):
You can’t perform that action at this time.
0 commit comments