]> git.pld-linux.org Git - packages/smalltalk.git/commitdiff
- added x32 patch (partial, fixes two issues, but more exist)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 12 Feb 2023 15:42:12 +0000 (16:42 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 12 Feb 2023 15:42:12 +0000 (16:42 +0100)
- added longdouble patch (disable assumption about long double size on i386/x86_64

smalltalk-longdouble.patch [new file with mode: 0644]
smalltalk-x32.patch [new file with mode: 0644]
smalltalk.spec

diff --git a/smalltalk-longdouble.patch b/smalltalk-longdouble.patch
new file mode 100644 (file)
index 0000000..f6ab1aa
--- /dev/null
@@ -0,0 +1,18 @@
+--- 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);
diff --git a/smalltalk-x32.patch b/smalltalk-x32.patch
new file mode 100644 (file)
index 0000000..e68b857
--- /dev/null
@@ -0,0 +1,25 @@
+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++;
index 6135880924ad437899a357fd0fd012c30420ae99..8fa9213aa33ad2df22579ce7312925cebaa1dc6a 100644 (file)
@@ -14,6 +14,8 @@ Source1:      %{name}.desktop
 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
@@ -43,6 +45,8 @@ BuildRequires:        texinfo
 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)
@@ -181,6 +185,8 @@ ModuĊ‚ OpenGL dla GNU Smalltalka.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %configure \
This page took 0.131065 seconds and 4 git commands to generate.