[Vm-dev] FloatMathPlugin: patch for squeak 4.19.2 fdlibm.h header

stes@PANDORA.BE stes at telenet.be
Sun Dec 13 18:03:47 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


In the cmake.config

platforms/unix/plugins/FloatMathPlugin/config.cmake

it says:


# fdlibm.h does not recognize x86_64, so set endianness here for all platforms.

TEST_BIG_ENDIAN (IS_BIG_ENDIAN)
IF (NOT IS_BIG_ENDIAN)
  PLUGIN_DEFINITIONS (-D__LITTLE_ENDIAN=1)
ENDIF ()

So basically the cmake is testing IS_BIG_ENDIAN and if not so,
then it defines __LITTLE_ENDIAN.

That's fine but the problem is that the old code in the fdlibm.h header
is #define __LITTLE_ENDIAN which (1) is a duplicate def and (2) defines
to a different value (because it does not define it =1).

So assuming you want to keep the definition at the cmake level (for x64),
then in the header file it should be conditional

#ifndef __LITTLE_ENDIAN  (if not already defined on the command line)


David Stes


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJf1ldjAAoJEAwpOKXMq1MaQEIH/0CafOdErjdTHcJmwxSz/ZR6
NrmYXFzB2uZZpGiGETVVZl73fmC0TlQ4tBxd5jVacZxoeCV+LpU4D61PP3cGVJMj
elpjhy8UWvOinzqKhBjN8Xl7AdaJzugJLp0s8Ovb9St2Y41HIRjQZCCO47FdRB1T
zY87dehH68lPIZ9/HCc0YB5+HZvuIV0uMJMmI3YdmwsBnuMfcaMmnkhKfk65Lt0j
h9Ehp2q+NHfxHbJu0Xxab8TEfZlWVFH9aVJsOQ/GFe6Wdo+J+sq51AshLyYIbB3t
F1Tis4l0Zrghxm+oDIJ+EmvhZcrPE29Fo0eHXFJ4Tsq0wUqR9Kj/dl3hVFNGlok=
=40Mx
-----END PGP SIGNATURE-----


More information about the Vm-dev mailing list