diff --git a/builder/library.go b/builder/library.go index a0d522a3..d85e4d36 100644 --- a/builder/library.go +++ b/builder/library.go @@ -69,7 +69,7 @@ func (l *Library) Load(target string) (path string, err error) { // Precalculate the flags to the compiler invocation. args := append(l.cflags(), "-c", "-Oz", "-g", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir) if strings.HasPrefix(target, "arm") || strings.HasPrefix(target, "thumb") { - args = append(args, "-fshort-enums") + args = append(args, "-fshort-enums", "-fomit-frame-pointer") } if strings.HasPrefix(target, "riscv32-") { args = append(args, "-march=rv32imac", "-mabi=ilp32", "-fforce-enable-int128") diff --git a/targets/cortex-m.json b/targets/cortex-m.json index 979c09d1..11370d28 100644 --- a/targets/cortex-m.json +++ b/targets/cortex-m.json @@ -13,6 +13,7 @@ "-mthumb", "-Werror", "-fshort-enums", + "-fomit-frame-pointer", "-fno-exceptions", "-fno-unwind-tables", "-ffunction-sections", "-fdata-sections" ], diff --git a/targets/gameboy-advance.json b/targets/gameboy-advance.json index f7ac76eb..8051acf3 100644 --- a/targets/gameboy-advance.json +++ b/targets/gameboy-advance.json @@ -15,6 +15,7 @@ "-Oz", "-Werror", "-fshort-enums", + "-fomit-frame-pointer", "-Qunused-arguments", "-fno-exceptions", "-fno-unwind-tables", "-ffunction-sections", "-fdata-sections"