[Debian-astro-commits] [iraf] 01/03: Add new architectures: arm, hurd

Ole Streicher olebole at moszumanska.debian.org
Wed Dec 13 14:42:51 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 81e3b0eba1ec6f2d5ccc53e5195dd5de651a59ec
Author: Ole Streicher <olebole at debian.org>
Date:   Wed Dec 13 15:14:19 2017 +0100

    Add new architectures: arm, hurd
---
 debian/patches/Add-new-architectures.patch | 168 +++++++++++++++++++++++++++++
 debian/patches/series                      |   1 +
 2 files changed, 169 insertions(+)

diff --git a/debian/patches/Add-new-architectures.patch b/debian/patches/Add-new-architectures.patch
new file mode 100644
index 0000000..9684f8d
--- /dev/null
+++ b/debian/patches/Add-new-architectures.patch
@@ -0,0 +1,168 @@
+From: Ole Streicher <olebole at debian.org>
+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(-)
+ create mode 100644 unix/as.hurd/zsvjmp.s
+ create mode 100644 unix/as.linuxarm/zsvjmp.s
+
+diff --git a/Makefile b/Makefile
+index b572b4a..0532e65 100644
+--- a/Makefile
++++ b/Makefile
+@@ -112,6 +112,12 @@ linux::
+ 	(util/mkarch linux)
+ linux64::
+ 	(util/mkarch linux64)
++linuxarm::
++	(util/mkarch linuxarm)
++linuxarm64::
++	(util/mkarch linuxarm64)
++hurd::
++	(util/mkarch hurd)
+ freebsd::
+ 	(util/mkarch freebsd)
+ cygwin::
+diff --git a/unix/as.hurd/zsvjmp.s b/unix/as.hurd/zsvjmp.s
+new file mode 100644
+index 0000000..c313ee2
+--- /dev/null
++++ b/unix/as.hurd/zsvjmp.s
+@@ -0,0 +1,15 @@
++	.file	"zsvjmp.s"
++        .globl	zsvjmp_
++	.globl	mem_
++	mem_	=	0
++
++	.text
++zsvjmp_:
++	movl	4(%esp), %ecx		# &jmpbuf to ECX
++	movl	8(%esp), %eax		# &status to EAX
++	movl	%eax, (%ecx)		# store &status in jmpbuf[0]
++	movl 	$0, (%eax)		# zero the value of status
++	addl	$4, %ecx		# change stack to point to &jmpbuf[1]
++	movl	%ecx, 4(%esp)		# 	...
++	movl	$0, 8(%esp)		# change arg2 to zero
++	jmp	__sigsetjmp		# let sigsetjmp do the rest
+diff --git a/unix/as.linuxarm/zsvjmp.s b/unix/as.linuxarm/zsvjmp.s
+new file mode 100644
+index 0000000..e14b668
+--- /dev/null
++++ b/unix/as.linuxarm/zsvjmp.s
+@@ -0,0 +1,18 @@
++	.file	"zsvjmp.s"
++
++@ Copyright (c) 2014 Ole Streicher <debian at liska.ath.cx>
++@ Distributable under the same license as IRAF
++@ This file contains the Linux armel/armhf version of ZSVJMP for Debian.
++
++	.arch armv6
++	.text
++	.global	zsvjmp_
++	.type	zsvjmp_, %function
++
++zsvjmp_:
++	mov	r2, #0         @
++	str	r2, [r1, #0]   @ *status = 0
++	str	r1, [r0, #0]   @ buf[0] = status
++	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/boot/spp/xc.c b/unix/boot/spp/xc.c
+index 3098425..3677418 100644
+--- a/unix/boot/spp/xc.c
++++ b/unix/boot/spp/xc.c
+@@ -78,7 +78,7 @@ char *fortlib[] = { "-lf2c",			/*  0  (host progs) */
+ 		    "-lm",			/*  2  */
+ 		    "-lcurl",			/*  3  */
+ 		    "-lexpat",			/*  4  */
+-#ifdef __linux__
++#if defined (__linux__) || defined (__gnu_hurd__)
+ 		    "-lpthread",		/*  5  */
+ 		    "-lrt",			/*  6  */
+ #else
+diff --git a/unix/hlib/irafarch.sh b/unix/hlib/irafarch.sh
+index 483c380..3b154b3 100755
+--- a/unix/hlib/irafarch.sh
++++ b/unix/hlib/irafarch.sh
+@@ -150,18 +150,26 @@ case "$MNAME" in
+ 	pipes=0
+         ;;
+ 
+-    "redhat"|"linux"|"linux64")
++    "redhat"|"linux"|"linux64"|"linuxarm"|"linuxarm64")
+         if [ -n "$IRAFARCH" ]; then
+             mach="$IRAFARCH"
+             hmach="$IRAFARCH"
+-	    if [ "$mach" == "linux64" ]; then
++	    if [ "$mach" = "linux64" -o "$mach" = "linuxarm64" ]; then
+ 		nbits=64
+ 	    fi
+ 	else 
+-            if [ "$MNAME_M" == "x86_64" ]; then		# Linux x86_64
++            if [ "$MNAME_M" = "x86_64" ]; then		# Linux x86_64
+                 mach="linux64"
+                 hmach="linux64"
+ 	        nbits=64
++	    elif [ "$MNAME_M" = "armhf" -o "$MNAME_M" = "armv7l" ]; then
++		mach="linuxarm"
++		hmach="linuxarm"
++		nbits=32
++	    elif [ "$MNAME_M" = "arm64" ]; then
++		mach="linuxarm64"
++		hmach="linuxarm64"
++		nbits=64
+             else					# Linux
+                 mach="linux"
+                 hmach="linux"
+@@ -199,6 +207,15 @@ case "$MNAME" in
+ 	pipes=0
+         ;;
+ 
++    "gnu"|"hurd") 					# GNU HURD
++        mach="hurd"
++        hmach="hurd"
++	tapecaps=0
++	tapes=0
++	pipes=0
++	nbits=32
++        ;;
++
+     *)
+ 	# We don't want to be limited by the CYGWIN version numbering so
+ 	# look for a truncated match here before punting.
+diff --git a/util/mkarch b/util/mkarch
+index e446275..6efd11d 100755
+--- a/util/mkarch
++++ b/util/mkarch
+@@ -38,6 +38,7 @@ while [ "$loop_" == "yes" ]; do
+ 
+   if [ "$#" -gt 0 ]; then
+     arch=$1
++    nbits=$(IRAFARCH=$arch $iraf/unix/hlib/irafarch.sh -nbits)
+ 
+     if (( "$use_mkpkg"==1 )); then
+         mkpkg $arch
+@@ -46,13 +47,14 @@ while [ "$loop_" == "yes" ]; do
+ 	$iraf/util/mkclean
+         /bin/rm -rf bin noao/bin unix/bin unix/as
+ 
++	mkdir -p bin.$arch unix/bin.$arch noao/bin.$arch
+         ln -s bin.$arch bin
+         cd noao; ln -s bin.$arch bin; cd ../
+         cd unix; ln -s bin.$arch bin; cd ../
+         cd unix; ln -s as.$arch as; cd ../
+     fi
+ 
+-    if [ "$arch" == "macintel" -o "$arch" == "linux64" ]; then
++    if [ "$nbits" = "64" ]; then
+         cd unix/hlib; \
+ 	     rm -f iraf.h mach.h; \
+ 	     ln -s iraf64.h iraf.h; \
diff --git a/debian/patches/series b/debian/patches/series
index f1845e5..e0f63da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ Remove-architecture-dependency-in-the-names-of-bin-subdir.patch
 Separate-NOAO-and-dev-packages.patch
 Propagate-CFLAGS-and-debug-flag-to-xc.patch
 Skip-source-dependent-tests.patch
+Add-new-architectures.patch

-- 
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