diff options
author | Ayke van Laethem <[email protected]> | 2020-05-12 20:45:58 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-05-26 16:39:14 +0200 |
commit | 9f4459cee160b8bf7ca39b69d223035c5635bbd3 (patch) | |
tree | 584361ea2c2b144e400d2f8218c84fa984d59a13 /builder/library.go | |
parent | 3c55689566153047f1d2e5403188557481f90d42 (diff) | |
download | tinygo-9f4459cee160b8bf7ca39b69d223035c5635bbd3.tar.gz tinygo-9f4459cee160b8bf7ca39b69d223035c5635bbd3.zip |
arm: make FPU configuraton consistent
Eventually we might want to start using the FPU, but the easy option
right now is to simply disable it everywhere. Previously, it depended on
whether Clang was built as part of TinyGo or it was an external binary.
By setting the floating point mode explicitly, such inconsistencies are
avoided.
This commit creates a new cortex-m4 target which can be the central
place for setting FPU-related settings across all Cortex-M4 chips.
Diffstat (limited to 'builder/library.go')
-rw-r--r-- | builder/library.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builder/library.go b/builder/library.go index d85e4d365..7bb506c76 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", "-fomit-frame-pointer") + args = append(args, "-fshort-enums", "-fomit-frame-pointer", "-mfloat-abi=soft") } if strings.HasPrefix(target, "riscv32-") { args = append(args, "-march=rv32imac", "-mabi=ilp32", "-fforce-enable-int128") |