pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/g95



Module Name:    pkgsrc
Committed By:   maya
Date:           Wed Sep 28 15:34:54 UTC 2016

Modified Files:
        pkgsrc/lang/g95: distinfo
Added Files:
        pkgsrc/lang/g95/patches: patch-libf95.a-0.93_runtime_mutex.c

Log Message:
lang/g95: blindly apply patch to help netbsd/mips build issues.

netbsd/mips gcc defaults to -mips1 which lacks ll/sc instructions
(or anything like them), and rejects the assembly code used here.

switch to mips3 (bare minimum for synchronization primitives) for
these instructions. this will result in runtime failures (illegal
instruction) on mips1, but we're unlikely to see any such users
(MIPS3 was released in 1992).

I'm not comfortable using the proper fix of switching to using
__sync_* because that seems to be a compiler builtin and gcc 4.1.2
might not have it.
Also, that change requires careful testing that this 'dumb' change
doesn't. Additionally, g95 is a dead end (upstream gone), so not
worth the effort.

PR pkg/44547: pkgsrc build failure for g95 on NetBSD/cobalt


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 pkgsrc/lang/g95/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/g95/distinfo
diff -u pkgsrc/lang/g95/distinfo:1.26 pkgsrc/lang/g95/distinfo:1.27
--- pkgsrc/lang/g95/distinfo:1.26       Tue Sep 27 20:51:11 2016
+++ pkgsrc/lang/g95/distinfo    Wed Sep 28 15:34:54 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2016/09/27 20:51:11 maya Exp $
+$NetBSD: distinfo,v 1.27 2016/09/28 15:34:54 maya Exp $
 
 SHA1 (g95_source.tgz) = b5e503fd6459b65cbda73190685f9490230d9cff
 RMD160 (g95_source.tgz) = 98d03e9a1835f4b3553a72a798bdf1d90a757176
@@ -33,3 +33,4 @@ SHA1 (patch-libf95.a-0.93_math_ff.c) = d
 SHA1 (patch-libf95.a-0.93_math_x87.S) = 25dc2b613969947ae60fdc9b1dc6d9524b0157be
 SHA1 (patch-libf95.a-0.93_quad_power16.c) = eb6711bcd1018cac675dbbe212cd22a831a9d191
 SHA1 (patch-libf95.a-0.93_runtime_main.c) = dfde68072f38bf5bbb9c54ebeea5b9ce07d0c6be
+SHA1 (patch-libf95.a-0.93_runtime_mutex.c) = 8252537e4cbc5fd53b3f89e4403b581e3c73e52c

Added files:

Index: pkgsrc/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c
diff -u /dev/null pkgsrc/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c:1.1
--- /dev/null   Wed Sep 28 15:34:54 2016
+++ pkgsrc/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c Wed Sep 28 15:34:54 2016
@@ -0,0 +1,22 @@
+$NetBSD: patch-libf95.a-0.93_runtime_mutex.c,v 1.1 2016/09/28 15:34:54 maya Exp $
+
+gcc on netbsd/mips rejects ll/sc as it targets mips1 which lacks
+these instructions. tell it it's mips3 code. it will crash
+at runtime for mips1 (unlikely to compile this package), but
+makes it possible to build for newer mips.
+
+--- libf95.a-0.93/runtime/mutex.c.orig 2008-09-17 03:45:13.000000000 +0000
++++ libf95.a-0.93/runtime/mutex.c
+@@ -116,9 +116,12 @@ int old_val, temp;
+ 
+     __asm__ __volatile__("   move %5, %2     \n"
+                        "1: move %2, %5     \n"
++                       "   .set push       \n"
++                       "   .set mips3      \n"
+                        "   ll   %0, %4     \n"
+                        "   bne  %0, %3, 2f \n"
+                        "   sc   %2, %1     \n"
++                       "   .set pop        \n"
+                        "   beqz %2, 1b     \n"
+                        "2:\n"
+                        : "=&r" (old_val), "=m" (*addr)



Home | Main Index | Thread Index | Old Index