# HG changeset patch
# User Laurent Bessard
# Date 1365524230 -7200
# Node ID 93022adef055e7395c6f70b9cedc3e2b62b3c117
# Parent  ec30c12b1d6758f8e4a1ffae06de84fdb9f0048c
Fix bug when linking failed and trying to rebuild

diff -r ec30c12b1d67 -r 93022adef055 targets/toolchain_gcc.py
--- a/targets/toolchain_gcc.py	Tue Apr 09 18:16:04 2013 +0200
+++ b/targets/toolchain_gcc.py	Tue Apr 09 18:17:10 2013 +0200
@@ -98,7 +98,7 @@
         ######### GENERATE OBJECT FILES ########################################
         obns = []
         objs = []
-        relink = False
+        relink = self.GetBinaryCode() is None
         for Location, CFilesAndCFLAGS, DoCalls in self.CTRInstance.LocationCFilesAndCFLAGS:
             if CFilesAndCFLAGS:
                 if Location :