This patch is broken.  I attempted a build and this is what happened:

(sid_mips64el-dchroot)roberto@eller:~/mips64el/intelrdfpmath-2.0u2$ 
dpkg-buildpackage
dpkg-buildpackage: info: source package intelrdfpmath
dpkg-buildpackage: info: source version 2.0u2-6
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Stephen Kitt <sk...@debian.org>
dpkg-buildpackage: info: host architecture mips64el
 dpkg-source --before-build .
 debian/rules clean
dh clean
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/roberto/mips64el/intelrdfpmath-2.0u2'
/usr/bin/make -C LIBRARY clean
make[2]: Entering directory '/home/roberto/mips64el/intelrdfpmath-2.0u2/LIBRARY'
makefile.iml_head:356: *** Unknown host architecture mips64.  Stop.
make[2]: Leaving directory '/home/roberto/mips64el/intelrdfpmath-2.0u2/LIBRARY'
make[1]: *** [debian/rules:16: override_dh_auto_clean] Error 2
make[1]: Leaving directory '/home/roberto/mips64el/intelrdfpmath-2.0u2'
make: *** [debian/rules:13: clean] Error 2
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2

I have attached an updated patch that seems to resolve this issue and
allows the build to execute on mips64el and mipsel.

Regards,

-Roberto

On Mon, Feb 06, 2023 at 08:58:44PM +0000, Stephen Kitt wrote:
> Control: tag -1 pending
> 
> Hello,
> 
> Bug #1030726 in intelrdfpmath reported by you has been fixed in the
> Git repository and is awaiting an upload. You can see the commit
> message below and you can check the diff of the fix at:
> 
> https://salsa.debian.org/debian/intelrdfpmath/-/commit/758574be1ed3ce30ec26c6e5136fdb1691d5213a
> 
> ------------------------------------------------------------------------
> Fix MIPS support
> 
> Closes: #1030726
> ------------------------------------------------------------------------
> 
> (this message was generated automatically)
> -- 
> Greetings
> 
> https://bugs.debian.org/1030726
> 
> -- 
> To unsubscribe, send mail to 1030726-unsubscr...@bugs.debian.org.

-- 
Roberto C. Sánchez
Description: Fix MIPS support
Author: Stephen Kitt <sk...@debian.org>

This removes references to files which aren't shipped, and adds
support for 64-bit MIPS.

Based on a patch by Roberto Sánchez <robe...@debian.org>.

Index: intelrdfpmath-2.0u2/LIBRARY/float128/architecture.h
===================================================================
--- intelrdfpmath-2.0u2.orig/LIBRARY/float128/architecture.h
+++ intelrdfpmath-2.0u2/LIBRARY/float128/architecture.h
@@ -128,14 +128,22 @@
 #	undef  MULTIPLE_ISSUE
 #	undef  UNSIGNED_TO_FLOAT
 #	define UNSIGNED_MULTIPLY 1
-#	define ENDIANESS little_endian
+#	if defined(_MIPSEL)
+#		define ENDIANESS little_endian
+#	elif defined(_MIPSEB)
+#		define ENDIANESS big_endian
+#	endif
 #	define SCALE_METHOD by_int
 #	define CVT_TO_HI_LO_METHOD by_flt
 
 #	define BITS_PER_CHAR    8
 #	define BITS_PER_SHORT  16
 #	define BITS_PER_INT    32
-#	define BITS_PER_LONG   32
+#	if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABIN32)
+#		define BITS_PER_LONG   32
+#	elif _MIPS_SIM == _ABI64
+#		define BITS_PER_LONG   64
+#	endif
 
 #	define BITS_PER_FLOAT  32
 #	define BITS_PER_DOUBLE 64
@@ -144,22 +152,31 @@
 #	define INT_8  signed char
 #	define INT_16 signed short
 #	define INT_32 signed int
-#	undef  INT_64
+#	define INT_64 long long
 #	undef  INT_128
 #	define U_INT_8  unsigned char
 #	define U_INT_16 unsigned short
 #	define U_INT_32 unsigned int
-#	undef  U_INT_64
+#	define U_INT_64 unsigned long long
 #	undef  U_INT_128
 
-#	define WORD      INT_32
-#	define U_WORD  U_INT_32
-#	define BITS_PER_WORD 32
-
-#	define HALF_WORD      INT_16
-#	define U_HALF_WORD  U_INT_16
-#	define BITS_PER_HALF_WORD 16
-
+#	if (_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABIN32)
+#		define WORD      INT_32
+#		define U_WORD  U_INT_32
+#		define BITS_PER_WORD 32
+
+#		define HALF_WORD      INT_16
+#		define U_HALF_WORD  U_INT_16
+#		define BITS_PER_HALF_WORD 16
+#	elif _MIPS_SIM == _ABI64
+#		define WORD      INT_64
+#		define U_WORD  U_INT_64
+#		define BITS_PER_WORD 64
+
+#		define HALF_WORD      INT_32
+#		define U_HALF_WORD  U_INT_32
+#		define BITS_PER_HALF_WORD 32
+#	endif
 
 
 #elif (defined(hp_pa) || defined(HP_PA) || defined(__hppa) || defined(__HPPA))
Index: intelrdfpmath-2.0u2/LIBRARY/float128/dpml_exception.h
===================================================================
--- intelrdfpmath-2.0u2.orig/LIBRARY/float128/dpml_exception.h
+++ intelrdfpmath-2.0u2/LIBRARY/float128/dpml_exception.h
@@ -325,7 +325,6 @@ typedef struct {
 #	define PROCESS_DENORMS 1
 #	define DPML_EXCEPTION_HANDLER DPML_EXCEPTION_NAME
 #	define EXCEPTION_ARGUMENTS( error_code ) error_code
-#	define PLATFORM_SPECIFIC_HEADER_FILE "mips_exception.c"
 
 #   elif ARCHITECTURE == hp_pa
 #	define PROCESS_DENORMS 1
Index: intelrdfpmath-2.0u2/LIBRARY/float128/dpml_private.h
===================================================================
--- intelrdfpmath-2.0u2.orig/LIBRARY/float128/dpml_private.h
+++ intelrdfpmath-2.0u2/LIBRARY/float128/dpml_private.h
@@ -212,7 +212,6 @@ versions until we need them. ] */
 
 #elif (ARCHITECTURE == mips)
 
-#    include "mips_macros.h"
 
 #elif (ARCHITECTURE == hp_pa)
 
Index: intelrdfpmath-2.0u2/LIBRARY/makefile.iml_head
===================================================================
--- intelrdfpmath-2.0u2.orig/LIBRARY/makefile.iml_head
+++ intelrdfpmath-2.0u2/LIBRARY/makefile.iml_head
@@ -177,7 +177,7 @@ GenTypeVarList = $(call PrefixSuffix,$1,
 # returned
 # ==============================================================================
 
-__INDICES__ = 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+__INDICES__ = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 
 GetIndex = $(strip $(word 1,$(if $(word $(words $(__INDICES__)),$2), \
                $(error "List too large. Adjust __INDICES__"), \
@@ -344,10 +344,10 @@ else
     endif
 endif
 
-ARCH_ALIAS := x86  ia64 EM64T x86_64 i686 amd64 Intel64 sun4u arm  aarch64 powerpc64el riscv64 s390x
-ARCH_LIST  := IA32 IA64 EFI2  EFI2   IA32 EFI2  EFI2    EFI2  IA32 EFI2    EFI2        EFI2    S390X
-ARCH_TYPE  := IA32 IA64 EFI2  EFI2   IA32 EFI2  EFI2    EFI2  IA32 EFI2    EFI2        EFI2    S390X
-ARCH_TYPES := IA32 IA64 EFI2 S390X
+ARCH_ALIAS := x86  ia64 EM64T x86_64 i686 amd64 Intel64 sun4u arm  aarch64 powerpc64el riscv64 s390x mipsel mips64el mips mips64
+ARCH_LIST  := IA32 IA64 EFI2  EFI2   IA32 EFI2  EFI2    EFI2  IA32 EFI2    EFI2        EFI2    S390X MIPS   MIPS     MIPS MIPS
+ARCH_TYPE  := IA32 IA64 EFI2  EFI2   IA32 EFI2  EFI2    EFI2  IA32 EFI2    EFI2        EFI2    S390X MIPS   MIPS     MIPS MIPS
+ARCH_TYPES := IA32 IA64 EFI2 S390X MIPS
 
 UARCH_LIST := SSE GSSE LRB LRB2
 

Reply via email to