Clone of official tools

Revision:
24:25bff2709c20
Parent:
22:9e85236d8716
Child:
29:1210849dba19
--- a/toolchains/gcc.py	Sat Jul 16 22:51:17 2016 +0100
+++ b/toolchains/gcc.py	Mon Aug 01 09:10:17 2016 +0100
@@ -93,7 +93,7 @@
             self.flags["common"].append("-g")
             self.flags["common"].append("-O0")
         else:
-            self.flags["common"].append("-O2")
+            self.flags["common"].append("-Os")
 
         main_cc = join(tool_path, "arm-none-eabi-gcc")
         main_cppc = join(tool_path, "arm-none-eabi-g++")
@@ -153,6 +153,7 @@
                     'toolchain_name': self.name
                 }
             elif msg is not None:
+                # Determine the warning/error column by calculating the ^ position
                 match = GCC.INDEX_PATTERN.match(line)
                 if match is not None:
                     msg['col'] = len(match.group('col'))
@@ -288,14 +289,6 @@
             self.cc += ["-DMBED_RTOS_SINGLE_THREAD"]
             self.cppc += ["-DMBED_RTOS_SINGLE_THREAD"]
             self.macros.extend(["MBED_RTOS_SINGLE_THREAD"])
-
-        if target.name in ["LPC1768", "LPC4088", "LPC4088_DM", "LPC4330", "UBLOX_C027", "LPC2368", "ARM_BEETLE_SOC"]:
-            self.ld.extend(["-u _printf_float", "-u _scanf_float"])
-            self.flags['ld'].extend(["-u _printf_float", "-u _scanf_float"])
-        elif target.name in ["RZ_A1H", "VK_RZ_A1H", "ARCH_MAX", "DISCO_F407VG", "DISCO_F429ZI", "DISCO_F469NI", "NUCLEO_F401RE", "NUCLEO_F410RB", "NUCLEO_F411RE", "NUCLEO_F429ZI", "NUCLEO_F446RE", "NUCLEO_F446ZE", "ELMO_F411RE", "MTS_MDOT_F411RE", "MTS_DRAGONFLY_F411RE", "DISCO_F746NG"]:
-            self.ld.extend(["-u_printf_float", "-u_scanf_float"])
-            self.flags['ld'].extend(["-u_printf_float", "-u_scanf_float"])
-
         self.sys_libs.append("nosys")