mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
565ff99c31
This results in bigger code size, but it works around a bug in the linker. The issue starts with the problem that libraries (picolibc, compiler-rt) were compiled as ARM and the rest as Thumb. This causes some blx instructions to be inserted by the linker to call into these libraries. Ideally we should fix the libraries to use Thumb mode instead, but that requires some more extensive changes (including fixes to compiler-rt) and it's just way easier to use ARM mode everywhere.
34 lines
731 B
JSON
34 lines
731 B
JSON
{
|
|
"llvm-target": "arm4-none-eabi",
|
|
"cpu": "arm7tdmi",
|
|
"build-tags": ["gameboyadvance", "arm7tdmi", "baremetal", "linux", "arm"],
|
|
"goos": "linux",
|
|
"goarch": "arm",
|
|
"compiler": "clang",
|
|
"linker": "ld.lld",
|
|
"rtlib": "compiler-rt",
|
|
"libc": "picolibc",
|
|
"cflags": [
|
|
"-g",
|
|
"--target=arm4-none-eabi",
|
|
"-mcpu=arm7tdmi",
|
|
"-Oz",
|
|
"-Werror",
|
|
"-fshort-enums",
|
|
"-fomit-frame-pointer",
|
|
"-Qunused-arguments",
|
|
"-fno-exceptions", "-fno-unwind-tables",
|
|
"-ffunction-sections", "-fdata-sections"
|
|
],
|
|
"ldflags": [
|
|
"--gc-sections"
|
|
],
|
|
"linkerscript": "targets/gameboy-advance.ld",
|
|
"extra-files": [
|
|
"targets/gameboy-advance.s",
|
|
"src/runtime/scheduler_gba.S"
|
|
],
|
|
"gdb": "gdb-multiarch",
|
|
"emulator": ["mgba", "-3"]
|
|
}
|