Add linking options for tinycc backend (#24750)

### Issue

When using `tcc` as backend to compile a trivial program

```
nim c  --cc:tcc  --skipCfg a.nim
```

, errors reported:

```
tcc: error: undefined symbol 'fabs'
```

### Solution

`fabs` belongs to libm. With these two options added, one can compile
with an additional clib option:

```
nim c  --cc:tcc  --skipCfg --clib:m a.nim
```
This commit is contained in:
Michael Lee
2025-03-11 16:58:22 +08:00
committed by GitHub
parent e2d4791229
commit dfd2987118

View File

@@ -257,8 +257,8 @@ compiler tcc:
linkerExe: "tcc",
linkTmpl: "-o $exefile $options $buildgui $builddll $objfiles",
includeCmd: " -I",
linkDirCmd: "", # XXX: not supported yet
linkLibCmd: "", # XXX: not supported yet
linkDirCmd: " -L",
linkLibCmd: " -l$1",
debug: " -g ",
pic: "",
asmStmtFrmt: "asm($1);$n",