mirror of
https://github.com/json-c/json-c.git
synced 2026-11-09 23:40:14 +08:00
Amiga: build libm881 (FPU) slots for AmigaOS 3
-m68881, -mhard-float and -m68040/-m68060 link from libm020/libm881. With no json-c there, the linker fell back to the soft-float libm020 build, which clib2 cannot link: its FPU libm has no soft-float helpers. Add the libm020/libm881, libb/libm020/libm881 and libb32/libm020/libm881 slots for newlib, libnix and clib2 (M68K_FPU=hard, from the image's cmake toolchain file), taking AmigaOS 3 from 15 to 24 libraries. Allow AMIGA_IMAGE_<OS> to override the compiler image, so the libraries can be built against a local image before it is published. Update the link tables. All 8 slots link for every runtime once the compiler image has the AmigaSDK-gcc cleanup that removed stale toolchain files. The old clib2 strtoll and newlib gettimeofday gaps came from those files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d9b375ff1b
commit
217808a23d
3 files changed
+54
-25
No files matched your search
@@ -398,26 +398,34 @@ systems, so you do not have to drive the container by hand.
|
||||
produces `dist/json-c.lha` for distribution.
|
||||
|
||||
Both default to `AmigaOS3 AmigaOS4 MorphOS`, and both take the variant list
|
||||
from the same table in `amiga/build-amiga-sdk.sh`, so they cannot disagree. 22
|
||||
libraries are built in total: 15 for AmigaOS 3 (newlib, libnix and clib2, each
|
||||
across the five multilib slots), 3 for AmigaOS 4 (newlib, clib2, clib4) and 4
|
||||
for MorphOS (ixemul and native, each with and without `-mbaserel32`).
|
||||
from the same table in `amiga/build-amiga-sdk.sh`, so they cannot disagree. 31
|
||||
libraries are built in total: 24 for AmigaOS 3 (newlib, libnix and clib2, each
|
||||
across eight multilib slots: 68000, 68020, `-fbaserel`, `-fbaserel -m68020`,
|
||||
`-fbaserel32 -m68020`, and a `libm881/` FPU build of the three 68020 slots),
|
||||
3 for AmigaOS 4 (newlib, clib2, clib4) and 4 for MorphOS (ixemul and native,
|
||||
each with and without `-mbaserel32`).
|
||||
|
||||
Which of them actually *link* is a separate question from whether they build,
|
||||
and was checked by compiling a program against each one:
|
||||
|
||||
| target | links |
|
||||
|--------|-------|
|
||||
| AmigaOS 3, libnix | all 5 slots |
|
||||
| AmigaOS 3, clib2 | `lib/libm020/` and `lib/libb32/libm020/` only |
|
||||
| AmigaOS 3, newlib | none -- the m68k newlib tree has no `gettimeofday()` |
|
||||
| AmigaOS 3, libnix | all 8 slots |
|
||||
| AmigaOS 3, clib2 | all 8 slots |
|
||||
| AmigaOS 3, newlib | all 8 slots |
|
||||
| AmigaOS 4 | all 3 (newlib, clib2, clib4) |
|
||||
| MorphOS | all 4 slots |
|
||||
|
||||
The clib2 failures are inside clib2 itself: its 68000 multilib provides no
|
||||
`strtoll`/`strtoull`, and 16-bit `-fbaserel` overflows with *truncated to fit:
|
||||
DREL16* once json-c's data is added -- `-fbaserel32` has no 64 KB limit. Link
|
||||
with `-ljson-c -lm` after your own objects, and add `-lunix` for clib2.
|
||||
The AmigaOS 3 results need a compiler image with the November 2026
|
||||
AmigaSDK-gcc cleanup, which stopped stale toolchain files overwriting the
|
||||
newer newlib and clib2. With an older image, clib2's 68000 multilib lacks
|
||||
`strtoll`/`strtoull`, newlib lacks `gettimeofday()`, and clib2 `-fbaserel` links
|
||||
fail with a *dangerous relocation*. The `libm881/` slots matter for FPU builds
|
||||
(`-m68881`, `-mhard-float`, `-m68040`/`-m68060`). Without them the linker falls back
|
||||
to the soft-float build, which clib2 cannot link. With clib2, add `-m68881` to a
|
||||
bare `-m68040`/`-m68060`: those compile soft-float code but link the FPU
|
||||
libraries. Link with `-ljson-c -lm` after your own objects, and add `-lunix` for
|
||||
clib2.
|
||||
|
||||
The archive is a single `json-c/` directory at the root, with the readme and
|
||||
one directory per system, each following the compiler's own layout so it can
|
||||
|
||||
Reference in new issue
Block a user