Merge pull request #7758 from phyokyaw/master

Include user defined static lib files in the Linker object files paths
pull/7895/head
Martin Kojtal 2018-08-27 10:38:40 +02:00 committed by GitHub
commit 2dfd3beb62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -326,10 +326,10 @@
{% 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>
@ -337,6 +337,9 @@
{% 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"/>

View File

@ -326,10 +326,10 @@
{% 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>
@ -337,6 +337,9 @@
{% 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"/>

View File

@ -90,7 +90,9 @@ class GNUARMEclipse(Exporter):
# 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:])
@ -178,6 +180,7 @@ class GNUARMEclipse(Exporter):
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)