Avoid assigning self.libraries

pull/7937/head
Jimmy Brisson 2018-08-30 08:34:07 -05:00
parent 8b623156e5
commit 121130ec20
1 changed files with 4 additions and 5 deletions

View File

@ -82,7 +82,6 @@ class MCUXpresso(GNUARMEclipse):
for lib in self.libraries: for lib in self.libraries:
l, _ = splitext(basename(lib)) l, _ = splitext(basename(lib))
libraries.append(l[3:]) libraries.append(l[3:])
self.libraries = libraries
self.system_libraries = [ self.system_libraries = [
'stdc++', 'supc++', 'm', 'c', 'gcc', 'nosys' 'stdc++', 'supc++', 'm', 'c', 'gcc', 'nosys'
@ -156,7 +155,7 @@ class MCUXpresso(GNUARMEclipse):
else: else:
opts['parent_id'] = 'release' opts['parent_id'] = 'release'
self.process_options(opts, flags) self.process_options(opts, flags, libraries)
opts['as']['defines'] = self.as_defines opts['as']['defines'] = self.as_defines
opts['c']['defines'] = self.c_defines opts['c']['defines'] = self.c_defines
@ -171,7 +170,7 @@ class MCUXpresso(GNUARMEclipse):
self.filter_dot(s) for s in self.resources.lib_dirs] self.filter_dot(s) for s in self.resources.lib_dirs]
opts['ld']['object_files'] = objects opts['ld']['object_files'] = objects
opts['ld']['user_libraries'] = self.libraries opts['ld']['user_libraries'] = libraries
opts['ld']['system_libraries'] = self.system_libraries opts['ld']['system_libraries'] = self.system_libraries
opts['ld']['script'] = "linker-script-%s.ld" % id opts['ld']['script'] = "linker-script-%s.ld" % id
opts['cpp_cmd'] = " ".join(toolchain.preproc) opts['cpp_cmd'] = " ".join(toolchain.preproc)
@ -305,7 +304,7 @@ class MCUXpresso(GNUARMEclipse):
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
def process_options(self, opts, flags_in): def process_options(self, opts, flags_in, libraries):
""" """
CDT managed projects store lots of build options in separate CDT managed projects store lots of build options in separate
variables, with separate IDs in the .cproject file. variables, with separate IDs in the .cproject file.
@ -701,7 +700,7 @@ class MCUXpresso(GNUARMEclipse):
opts['ld'][ opts['ld'][
'other'] += ' '.join('-l' + s for s in self.system_libraries) + ' ' 'other'] += ' '.join('-l' + s for s in self.system_libraries) + ' '
opts['ld'][ opts['ld'][
'other'] += ' '.join('-l' + s for s in self.libraries) 'other'] += ' '.join('-l' + s for s in libraries)
opts['ld']['other'] += ' -Wl,--end-group ' opts['ld']['other'] += ' -Wl,--end-group '
# Strip all 'other' flags, since they might have leading spaces. # Strip all 'other' flags, since they might have leading spaces.