[Debian-astro-commits] [iraf] 02/04: Add MIPS port (32 bit)

Ole Streicher olebole at moszumanska.debian.org
Sat Dec 30 20:33:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository iraf.

commit 6c7d4e1acc05ca2744ba1b0614e255fbfa454e66
Author: Ole Streicher <olebole at debian.org>
Date:   Sat Dec 30 20:37:22 2017 +0100

    Add MIPS port (32 bit)
---
 debian/control                             |   8 +-
 debian/copyright                           |   1 +
 debian/patches/Add-new-architectures.patch | 121 +++++++++++++++++++++++++----
 3 files changed, 113 insertions(+), 17 deletions(-)

diff --git a/debian/control b/debian/control
index a45e748..cc9ecb0 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Vcs-Browser: https://anonscm.debian.org/cgit/debian-astro/packages/iraf.git
 Vcs-Git: https://anonscm.debian.org/cgit/debian-astro/packages/iraf.git
 
 Package: iraf
-Architecture: linux-amd64 linux-i386 armhf armel hurd-i386
+Architecture: linux-amd64 linux-i386 armhf armel hurd-i386 mipsel mips
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Recommends: iraf-noao, python3-pyraf | x11iraf | xterm | python-pyraf
 Suggests: iraf-dev
@@ -36,7 +36,7 @@ Description: Image Reduction and Analysis Facility
  facility.
 
 Package: iraf-dev
-Architecture: linux-amd64 linux-i386 armhf armel hurd-i386
+Architecture: linux-amd64 linux-i386 armhf armel hurd-i386 mipsel mips
 Multi-Arch: no
 Depends: gcc | c-compiler,
          iraf,
@@ -59,7 +59,7 @@ Description: Image Reduction and Analysis Facility (development files)
  system and all applications are written.
 
 Package: iraf-noao
-Architecture: linux-amd64 linux-i386 armhf armel hurd-i386
+Architecture: linux-amd64 linux-i386 armhf armel hurd-i386 mipsel mips
 Depends: iraf, ${misc:Depends}, ${shlibs:Depends}
 Multi-Arch: foreign
 Description: IRAF NOAO data reduction package
@@ -73,7 +73,7 @@ Description: IRAF NOAO data reduction package
  of Optical Astronomy data.
 
 Package: iraf-noao-dev
-Architecture: linux-amd64 linux-i386 armhf armel hurd-i386
+Architecture: linux-amd64 linux-i386 armhf armel hurd-i386 mipsel mips
 Multi-Arch: no
 Depends: iraf-dev, iraf-noao, ${misc:Depends}
 Description: IRAF NOAO data reduction package (development files)
diff --git a/debian/copyright b/debian/copyright
index a61efdd..8094e0b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -6,6 +6,7 @@ Source: https://github.com/olebole/iraf-v216
 Files: *
 Copyright: 1986-2014 Association of Universities for Research in Astronomy Inc.
  2006-2009 Chisato Yamauchi
+ 2014 David Kuehling <dvdkhlng AT posteo TOD de>
  2017 Anastasia Galkin
  2017 Ole Streicher
 License: IRAF
diff --git a/debian/patches/Add-new-architectures.patch b/debian/patches/Add-new-architectures.patch
index fd6dba0..6ac5fed 100644
--- a/debian/patches/Add-new-architectures.patch
+++ b/debian/patches/Add-new-architectures.patch
@@ -3,21 +3,24 @@ Date: Wed, 13 Dec 2017 15:14:03 +0100
 Subject: Add new architectures
 
 ---
- Makefile                  |  6 ++++++
- unix/as.hurd/zsvjmp.s     | 15 +++++++++++++++
- unix/as.linuxarm/zsvjmp.s | 18 ++++++++++++++++++
- unix/boot/spp/xc.c        |  2 +-
- unix/hlib/irafarch.sh     | 23 ++++++++++++++++++++---
- util/mkarch               |  4 +++-
- 6 files changed, 63 insertions(+), 5 deletions(-)
+ Makefile                   |  8 ++++++++
+ unix/as.hurd/zsvjmp.s      | 15 +++++++++++++++
+ unix/as.linuxarm/zsvjmp.s  | 18 ++++++++++++++++++
+ unix/as.linuxmips/zsvjmp.s | 28 ++++++++++++++++++++++++++++
+ unix/boot/spp/xc.c         |  2 +-
+ unix/f2c/libf2c/uninit.c   | 34 ++++++++++++++++++++++++++++++++--
+ unix/hlib/irafarch.sh      | 27 ++++++++++++++++++++++++---
+ util/mkarch                |  4 +++-
+ 8 files changed, 129 insertions(+), 7 deletions(-)
  create mode 100644 unix/as.hurd/zsvjmp.s
  create mode 100644 unix/as.linuxarm/zsvjmp.s
+ create mode 100644 unix/as.linuxmips/zsvjmp.s
 
 diff --git a/Makefile b/Makefile
-index b572b4a..0532e65 100644
+index b572b4a..ee2316f 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -112,6 +112,12 @@ linux::
+@@ -112,6 +112,14 @@ linux::
  	(util/mkarch linux)
  linux64::
  	(util/mkarch linux64)
@@ -25,6 +28,8 @@ index b572b4a..0532e65 100644
 +	(util/mkarch linuxarm)
 +linuxarm64::
 +	(util/mkarch linuxarm64)
++linuxmips::
++	(util/mkarch linuxmips)
 +hurd::
 +	(util/mkarch hurd)
  freebsd::
@@ -75,6 +80,40 @@ index 0000000..e14b668
 +	add	r0, r0, #4     @ &buf[1] --> 1st arg for sigsetjmp
 +	mov	r1, #0         @ 0       --> 2nd arg for sigsetjmp
 +	b	__sigsetjmp    @ call sigsetjmp
+diff --git a/unix/as.linuxmips/zsvjmp.s b/unix/as.linuxmips/zsvjmp.s
+new file mode 100644
+index 0000000..d6637f4
+--- /dev/null
++++ b/unix/as.linuxmips/zsvjmp.s
+@@ -0,0 +1,28 @@
++	.file	"zsvjmp.s"
++
++# Copyright (c) 2014 David Kuehling <dvdkhlng AT posteo TOD de>
++# Distributable under the same license as IRAF
++# This file contains the Linux mipsel version of ZSVJMP for Debian.
++
++	.set mips1
++	.abicalls
++	.text
++	.global	zsvjmp_
++	.ent zsvjmp_
++	.type	zsvjmp_, %function
++
++zsvjmp_:
++	.set noreorder
++	.cpload $t9
++	.set reorder
++	sw  $a1, 0($a0)		# buf[0]=status
++	sw  $zero, 0($a1)	# *status=0
++	addiu  $a0, $a0, 4	# &buf[1] --> 1st arg for sigsetjmp
++	move    $a1, $zero	# 2nd arg is zero
++
++	# this call sequence is required when used inside shared library
++	la $t9, __sigsetjmp
++	j $t9
++	##  note: no delay slot, filled by GAS
++
++	.end 	zsvjmp_
 diff --git a/unix/boot/spp/xc.c b/unix/boot/spp/xc.c
 index 2498362..5622730 100644
 --- a/unix/boot/spp/xc.c
@@ -88,16 +127,68 @@ index 2498362..5622730 100644
  		    "-lpthread",		/*  5  */
  #else
  		    "",				/*  5  */
+diff --git a/unix/f2c/libf2c/uninit.c b/unix/f2c/libf2c/uninit.c
+index f15fe39..2aee910 100644
+--- a/unix/f2c/libf2c/uninit.c
++++ b/unix/f2c/libf2c/uninit.c
+@@ -178,7 +178,8 @@ ieee0(Void)
+ 	}
+ #endif /* MSpc */
+ 
+-#ifdef __mips	/* must link with -lfpe */
++/* What follows is for SGI IRIX only */
++#if defined(__mips) && defined(__sgi)   /* must link with -lfpe */
+ #define IEEE0_done
+ /* code from Eric Grosse */
+ #include <stdlib.h>
+@@ -231,7 +232,36 @@ ieee0(Void)
+ 	}
+ #endif /* mips */
+ 
+-#ifdef __linux__
++/*
++ * The following is the preferred method but depends upon a GLIBC extension only
++ * to be found in GLIBC 2.2 or later.  It is a GNU extension, not included in the
++ * C99 extensions which allow the FP status register to be examined in a platform
++ * independent way.  It should be used if at all possible  -- AFRB
++ */
++
++
++#if (defined(__GLIBC__)&& ( __GLIBC__>=2) && (__GLIBC_MINOR__>=2) )
++#define _GNU_SOURCE 1
++#define IEEE0_done
++#include <fenv.h>
++ static void
++  ieee0(Void)
++        
++{
++    /* Clear all exception flags */
++    if (fedisableexcept(FE_ALL_EXCEPT)==-1)
++         unsupported_error();
++    if (feenableexcept(FE_DIVBYZERO|FE_INVALID|FE_OVERFLOW)==-1)
++         unsupported_error();
++}
++
++#endif /* Glibc control */
++
++/* Many linux cases will be treated through GLIBC.  Note that modern
++ * linux runs on many non-i86 plaforms and as a result the following code
++ * must be processor dependent rather than simply OS specific */
++ 
++#if (defined(__linux__)&&(!defined(IEEE0_done)))
+ #define IEEE0_done
+ #include "fpu_control.h"
+ 
 diff --git a/unix/hlib/irafarch.sh b/unix/hlib/irafarch.sh
-index 483c380..abb33c6 100755
+index 483c380..74a7961 100755
 --- a/unix/hlib/irafarch.sh
 +++ b/unix/hlib/irafarch.sh
-@@ -150,18 +150,26 @@ case "$MNAME" in
+@@ -150,18 +150,30 @@ case "$MNAME" in
  	pipes=0
          ;;
  
 -    "redhat"|"linux"|"linux64")
-+    "redhat"|"linux"|"linux64"|"linuxarm"|"linuxarm64")
++    "redhat"|"linux"|"linux64"|"linuxarm"|"linuxarm64"|"linuxmips")
          if [ -n "$IRAFARCH" ]; then
              mach="$IRAFARCH"
              hmach="$IRAFARCH"
@@ -119,10 +210,14 @@ index 483c380..abb33c6 100755
 +		mach="linuxarm64"
 +		hmach="linuxarm64"
 +		nbits=64
++            elif [ "$MNAME_M" = "mips" ]; then
++                mach="linuxmips"
++                hmach="linuxmips"
++		nbits=32
              else					# Linux
                  mach="linux"
                  hmach="linux"
-@@ -199,6 +207,15 @@ case "$MNAME" in
+@@ -199,6 +211,15 @@ case "$MNAME" in
  	pipes=0
          ;;
  

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/iraf.git



More information about the Debian-astro-commits mailing list