Skip to content

Include user defined static lib files in the Linker object files paths #7758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tools/export/e2studio/.cproject.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,20 @@
{% endfor %}
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" valueType="libs">
{% for lib in opts['ld']['user_libraries'] %}
{% for lib in opts['ld']['system_libraries'] %}
<listOptionValue builtIn="false" value="{{lib}}"/>
{% endfor %}
{% for lib in opts['ld']['system_libraries'] %}
{% for lib in opts['ld']['user_libraries'] %}
<listOptionValue builtIn="false" value="{{lib}}"/>
{% endfor %}
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs" valueType="userObjs">
{% for path in opts['ld']['object_files'] %}
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/{{path}}&quot;"/>
{% endfor %}
{% for path in opts['ld']['user_library_files'] %}
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/{{path}}&quot;"/>
{% endfor %}
</option>
{% if opts['ld']['gcsections'] %}
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.{{u.id}}" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
Expand Down
7 changes: 5 additions & 2 deletions tools/export/gnuarmeclipse/.cproject.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,20 @@
{% endfor %}
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.libs" valueType="libs">
{% for lib in opts['ld']['user_libraries'] %}
{% for lib in opts['ld']['system_libraries'] %}
<listOptionValue builtIn="false" value="{{lib}}"/>
{% endfor %}
{% for lib in opts['ld']['system_libraries'] %}
{% for lib in opts['ld']['user_libraries'] %}
<listOptionValue builtIn="false" value="{{lib}}"/>
{% endfor %}
</option>
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs.{{u.id}}" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.otherobjs" valueType="userObjs">
{% for path in opts['ld']['object_files'] %}
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/{{path}}&quot;"/>
{% endfor %}
{% for path in opts['ld']['user_library_files'] %}
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/{{path}}&quot;"/>
{% endfor %}
</option>
{% if opts['ld']['gcsections'] %}
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.{{u.id}}" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
Expand Down
3 changes: 3 additions & 0 deletions tools/export/gnuarmeclipse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def create_jinja_ctx(self):
# TODO: use some logger to display additional info if verbose

libraries = []
library_files = []
for lib in self.libraries:
library_files.append(self.filter_dot(lib))
l, _ = splitext(basename(lib))
libraries.append(l[3:])

Expand Down Expand Up @@ -178,6 +180,7 @@ def create_jinja_ctx(self):

opts['ld']['object_files'] = objects
opts['ld']['user_libraries'] = libraries
opts['ld']['user_library_files'] = library_files
opts['ld']['system_libraries'] = self.system_libraries
opts['ld']['script'] = join(id.capitalize(),
"linker-script-%s.ld" % id)
Expand Down