Skip to content

Linker missing (software?) floating point min and max functions fminimum, fmaximum, fminimumf, fmaximumf #5195

@eliasnaur

Description

@eliasnaur
$ cd tinygo
$ cat fmin.go
package main

import (
        "fmt"
        "time"
)

func main() {
        f1 := float64(time.Now().Second())
        f2 := float64(time.Now().Second())
        f1_32 := float32(time.Now().Second())
        f2_32 := float32(time.Now().Second())
        fmt.Println("hello, min, max",
                min(f1_32, f2_32), max(f1_32, f2_32),
                min(f1, f2), max(f1, f2))
}
$ go run . build -target pico2  fmin.go
# github.com/tinygo-org/tinygo
fmin.go:14: linker could not find symbol fmaximumf
fmin.go:14: linker could not find symbol fminimumf
fmin.go:15: linker could not find symbol fminimum
fmin.go:15: linker could not find symbol fmaximum
exit status 1

I believe #5143 is the culprit. CC @niaow .

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcorenext-releaseWill be part of next release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions