- added longdouble patch (disable assumption about long double size on i386/x86_64
--- /dev/null
+--- smalltalk-3.2.5/libgst/dict.inl.orig 2013-04-07 21:24:12.000000000 +0200
++++ smalltalk-3.2.5/libgst/dict.inl 2023-02-11 19:13:44.149203321 +0100
+@@ -578,15 +578,9 @@ floatq_new (long double f)
+ OOP floatOOP;
+ gst_object obj = new_instance_with (_gst_floatq_class, 16, &floatOOP);
+
+-#if defined __i386__ || defined __x86_64__
+- /* Two bytes (six on x86-64) of 80-bit long doubles are unused. */
+- memcpy (&obj->data, &f, 10);
+- memset (((char *)obj->data) + 10, 0, 6);
+-#else
+ memcpy (&obj->data, &f, sizeof (long double));
+ memset (((char *)obj->data) + sizeof (long double), 0,
+ 16 - sizeof (long double));
+-#endif
+
+ MAKE_OOP_READONLY (floatOOP, true);
+ return (floatOOP);
--- /dev/null
+Fix assembler operations (x32 uses 32-bit OPP)
+Fix uninitialized variables in _gst_mpz_from_oop
+Still not sufficient - probably more work needed for size of limb != size of pointer
+--- smalltalk-3.2.5/libgst/interp.inl.orig 2013-04-07 21:24:12.000000000 +0200
++++ smalltalk-3.2.5/libgst/interp.inl 2023-02-11 18:16:19.552251830 +0100
+@@ -76,7 +76,7 @@ static inline OOP tagged_xor (OOP op1, O
+ } while(0)
+
+
+-#if defined __i386__
++#if defined __i386__ || defined __ILP32__
+ #define OP_SUFFIX "l"
+ #define OP_CONSTRAINT "rmi"
+ #else
+--- libgst/mpz.c.orig 2013-03-23 20:56:26.000000000 +0100
++++ libgst/mpz.c 2023-02-11 21:25:51.542429365 +0100
+@@ -1670,6 +1670,8 @@ _gst_mpz_from_oop(gst_mpz *mpz, OOP srcO
+ /* We have half a limb in the LargeInteger, so we cannot work
+ directly in the object data. */
+
++ gst_mpz_realloc(mpz, n);
++ dest = mpz->d;
+ mpz->size = n;
+ while (n--)
+ *dest++ = ~*src++;
Source2: %{name}.png
Patch0: %{name}-proc.patch
Patch1: %{name}-info.patch
+Patch2: %{name}-x32.patch
+Patch3: %{name}-longdouble.patch
URL: http://www.gnu.org/software/smalltalk/
BuildRequires: OpenGL-devel
BuildRequires: OpenGL-glut-devel
BuildRequires: tk-devel >= 8.4
BuildRequires: zlib-devel
Requires(post,postun): /sbin/ldconfig
+# as of 3.2.5 fails probably because of issues with size of limb != size of pointer
+ExcludeArch: x32
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# smalltalk uses -Wno-format (see GST_PROG_CC in configure.ac)
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
%configure \