From 8d783f9acf1101c38c7682b6b57ac0414182b77b Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Wed, 6 May 2015 15:51:25 -0500 Subject: [PATCH] Workaround for SS not taking into account linker ordering --- workspace_tools/export/simplicityv3.py | 21 ++++++++++++++- .../export/simplicityv3_slsproj.tmpl | 26 ++++++++++++++++++- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/workspace_tools/export/simplicityv3.py b/workspace_tools/export/simplicityv3.py index a45605d189..7331dbffcc 100644 --- a/workspace_tools/export/simplicityv3.py +++ b/workspace_tools/export/simplicityv3.py @@ -87,6 +87,15 @@ class SimplicityV3(Exporter): 's_sources':'1' } + EXCLUDED_LIBS = [ + 'm', + 'c', + 'gcc', + 'nosys', + 'supc++', + 'stdc++' + ] + DOT_IN_RELATIVE_PATH = False orderedPaths = Folder("Root") @@ -108,6 +117,15 @@ class SimplicityV3(Exporter): main_files = [] + EXCLUDED_LIBS = [ + 'm', + 'c', + 'gcc', + 'nosys', + 'supc++', + 'stdc++' + ] + for r_type in ['s_sources', 'c_sources', 'cpp_sources']: r = getattr(self.resources, r_type) if r: @@ -120,7 +138,8 @@ class SimplicityV3(Exporter): libraries = [] for lib in self.resources.libraries: l, _ = splitext(basename(lib)) - libraries.append(l[3:]) + if l[3:] not in EXCLUDED_LIBS: + libraries.append(l[3:]) defines = [] for define in self.get_symbols(): diff --git a/workspace_tools/export/simplicityv3_slsproj.tmpl b/workspace_tools/export/simplicityv3_slsproj.tmpl index ac4d35519f..4324eb12d1 100644 --- a/workspace_tools/export/simplicityv3_slsproj.tmpl +++ b/workspace_tools/export/simplicityv3_slsproj.tmpl @@ -2,7 +2,7 @@ {# Hierarchically include all folders into the project #} @@ -55,6 +55,18 @@ ${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %} {%- endfor -%}"/> {%- endif %} +{# Manually override linker ordering #} + {%- if libraries %} + + {%- endif %} {# Define mbed-specific linker file #} @@ -100,6 +112,18 @@ ${workspace_loc:/${ProjName}/{{ file }}}{% if not loop.last %} {% endif %} {%- endfor -%}"/> {%- endif %} +{# Manually override linker ordering #} + {%- if libraries %} + + {%- endif %} {# Define mbed-specific linker file #}