workaround for --gc-sections issue with NRF51822

pull/435/head
Janek Mann 2014-08-11 11:23:13 +01:00
parent 24ea3bcafa
commit 7e2001b980
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ class GCC(mbedToolchain):
self.cc = [join(GOANNA_PATH, "goannacc"), "--with-cc=" + main_cc.replace('\\', '/'), "-std=gnu99", "--dialect=gnu", '--output-format="%s"' % self.GOANNA_FORMAT] + common_flags
self.cppc= [join(GOANNA_PATH, "goannac++"), "--with-cxx=" + main_cppc.replace('\\', '/'), "-std=gnu++98", "-fno-rtti", "--dialect=gnu", '--output-format="%s"' % self.GOANNA_FORMAT] + common_flags
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--gc-sections", "-Wl,--wrap,main"] + self.cpu
if target.name in ["NRF51822"]:
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--wrap,main"] + self.cpu
else:
self.ld = [join(tool_path, "arm-none-eabi-gcc"), "-Wl,--gc-sections", "-Wl,--wrap,main"] + self.cpu
self.sys_libs = ["stdc++", "supc++", "m", "c", "gcc"]
self.ar = join(tool_path, "arm-none-eabi-ar")