Closed nmeum closed 2 months ago
Same issue on s390x (which is big endian) with --machine=tpb64b
, so I suppose a check for *b
is needed as well?
I don't think it will work right to base C flags on a pb
machine type. Unlike a machine type such as a64le
, tpb64l
doesn't indicate a particular OS.
The problem here could be blamed on configure
deriving C and linking flags from the machine type instead of from uname
. I've considered changing that, but I've been unsure that we should go down that road — especially if it means trying to do what autoconf does, but without using autoconf.
The current status, at least, is that configure
detects the machines that are specifically supported with machine-code backends, and tries to get the default flags right in those cases, but building with other platforms requires specifying needed flags with LIBS=
or LIBS+=...
arguments (and similar) to configure
.
Alright, I will just pass these flags via LIBS
etc then.
Maybe it would be possible to add an additional --platform
flag or something along those lines to configure? Because ideally I really don't want to add all the flags that configure adds on *le
Linux targets to cflags/ldflags/libs/… manually for pb-based targets.
Something like a --platform
flag sounds like a good idea. I'll look into this more.
While upgrading the Alpine Linux ChezScheme package to 0.10.0, I encountered a weird build failure on ppc64le (
--machine=tpb64l
) were it fails to link against ncurses:Further debugging revealed that this is due to the fact that the
configure
script does not add-lncurses
to the linker flags if the machine type does not end in*le
. Since 0.10.0 introduced little-endian targets (such astpb64l
) which do not end in*le
I guess theconfigure
script needs to be adjusted accordingly?This patch fixes the described build failure on Alpine Linux.