targets/toolchain_gcc.py
changeset 1739 ec153828ded2
parent 1736 7e61baa047f0
child 1740 b789b695b5c6
equal deleted inserted replaced
1738:d2e979738700 1739:ec153828ded2
   162         obns = []
   162         obns = []
   163         objs = []
   163         objs = []
   164         relink = self.GetBinaryCode() is None
   164         relink = self.GetBinaryCode() is None
   165         for Location, CFilesAndCFLAGS, DoCalls in self.CTRInstance.LocationCFilesAndCFLAGS:
   165         for Location, CFilesAndCFLAGS, DoCalls in self.CTRInstance.LocationCFilesAndCFLAGS:
   166             if CFilesAndCFLAGS:
   166             if CFilesAndCFLAGS:
   167                 if Location :
   167                 if Location:
   168                     self.CTRInstance.logger.write(".".join(map(str,Location))+" :\n")
   168                     self.CTRInstance.logger.write(".".join(map(str,Location))+" :\n")
   169                 else:
   169                 else:
   170                     self.CTRInstance.logger.write(_("PLC :\n"))
   170                     self.CTRInstance.logger.write(_("PLC :\n"))
   171 
   171 
   172             for CFile, CFLAGS in CFilesAndCFLAGS:
   172             for CFile, CFLAGS in CFilesAndCFLAGS:
   188                                self.CTRInstance.logger,
   188                                self.CTRInstance.logger,
   189                                "\"%s\" -c \"%s\" -o \"%s\" %s %s"%
   189                                "\"%s\" -c \"%s\" -o \"%s\" %s %s"%
   190                                    (self.compiler, CFile, objectfilename, Builder_CFLAGS, CFLAGS)
   190                                    (self.compiler, CFile, objectfilename, Builder_CFLAGS, CFLAGS)
   191                                ).spin()
   191                                ).spin()
   192 
   192 
   193                         if status :
   193                         if status:
   194                             self.srcmd5.pop(bn)
   194                             self.srcmd5.pop(bn)
   195                             self.CTRInstance.logger.write_error(_("C compilation of %s failed.\n") % bn)
   195                             self.CTRInstance.logger.write_error(_("C compilation of %s failed.\n") % bn)
   196                             return False
   196                             return False
   197                     obns.append(obn)
   197                     obns.append(obn)
   198                     objs.append(objectfilename)
   198                     objs.append(objectfilename)
   220                         listobjstring,
   220                         listobjstring,
   221                         self.exe_path,
   221                         self.exe_path,
   222                         ALLldflags)
   222                         ALLldflags)
   223                    ).spin()
   223                    ).spin()
   224 
   224 
   225             if status :
   225             if status:
   226                 return False
   226                 return False
   227 
   227 
   228         else:
   228         else:
   229             self.CTRInstance.logger.write("   [pass]  " + ' '.join(obns)+" -> " + self.exe + "\n")
   229             self.CTRInstance.logger.write("   [pass]  " + ' '.join(obns)+" -> " + self.exe + "\n")
   230 
   230