diff --git a/lang/g95/distinfo b/lang/g95/distinfo index 144b71b44d9a..dd003d979b19 100644 --- a/lang/g95/distinfo +++ b/lang/g95/distinfo @@ -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) = d873e3fd699d9c9fd06681c1e136cf16cf013a1a 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 diff --git a/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c b/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c new file mode 100644 index 000000000000..7fad226e9f4f --- /dev/null +++ b/lang/g95/patches/patch-libf95.a-0.93_runtime_mutex.c @@ -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)