Skip to content

Commit fe80a1a

Browse files
committed
lang/spidermonkey185: Fix GCC 14 build
1 parent ba97c3f commit fe80a1a

3 files changed

Lines changed: 51 additions & 6 deletions

File tree

lang/spidermonkey185/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.15 2023/08/14 05:24:46 wiz Exp $
1+
# $NetBSD: Makefile,v 1.16 2026/01/06 16:06:16 ryoon Exp $
22
#
33

44
DISTNAME= js185-1.0.0
@@ -60,6 +60,9 @@ PLIST_SUBST+= ARCH=${MACHINE_ARCH}
6060

6161
TEST_TARGET= check
6262

63+
post-patch:
64+
${CHMOD} +x ${WRKSRC}/build/hcpp
65+
6366
# o Install js interpreter
6467
# o Install the binaries and headers with a proper version suffix
6568
# o Adjust headers permissions

lang/spidermonkey185/distinfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
$NetBSD: distinfo,v 1.8 2021/10/26 10:51:56 nia Exp $
1+
$NetBSD: distinfo,v 1.9 2026/01/06 16:06:16 ryoon Exp $
22

33
BLAKE2s (js185-1.0.0.tar.gz) = 46b57fb118dd75620f5ffdce8dec3a70bbe8067f544be55284b6631c82d2e13a
44
SHA512 (js185-1.0.0.tar.gz) = 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
55
Size (js185-1.0.0.tar.gz) = 6164605 bytes
6-
SHA1 (patch-configure) = 77366fff7e8b766b5691d0432b8740d4c8c362a6
6+
SHA1 (patch-configure) = 0675714a152fc6dd5b7b3033f1c76b9d1a0927d1
77
SHA1 (patch-jsatom.cpp) = 4156e97b72461af88aa68394ef439d63a4c081dc
88
SHA1 (patch-jscell.h) = e2c90041b9b526d1f07e4905d0c684afe96992a9
99
SHA1 (patch-jscntxt.cpp) = 7d41c587affa51f23bfff48b118d61ec6e3b87c1

lang/spidermonkey185/patches/patch-configure

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1-
$NetBSD: patch-configure,v 1.1 2016/11/16 13:13:44 fhajny Exp $
1+
$NetBSD: patch-configure,v 1.2 2026/01/06 16:06:16 ryoon Exp $
22

33
* Improve compatibility
4+
* Define return type for functions to fix GCC 14.
45

56
--- configure.orig 2011-03-31 19:08:36.000000000 +0000
67
+++ configure
7-
@@ -3234,7 +3234,7 @@ fi
8+
@@ -1617,6 +1617,7 @@ cat > conftest.$ac_ext << EOF
9+
#line 1618 "configure"
10+
#include "confdefs.h"
11+
12+
+int
13+
main(){return(0);}
14+
EOF
15+
if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16+
@@ -2262,6 +2263,7 @@ cat > conftest.$ac_ext << EOF
17+
#line 2263 "configure"
18+
#include "confdefs.h"
19+
20+
+int
21+
main(){return(0);}
22+
EOF
23+
if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
24+
@@ -3234,7 +3236,7 @@ fi
825

926
echo "$ac_t""$ac_cv_have_std__Throw" 1>&6
1027

@@ -13,7 +30,16 @@ $NetBSD: patch-configure,v 1.1 2016/11/16 13:13:44 fhajny Exp $
1330
echo $ac_n "checking for |class __declspec(dllimport) exception| bug""... $ac_c" 1>&6
1431
echo "configure:3240: checking for |class __declspec(dllimport) exception| bug" >&5
1532
if eval "test \"`echo '$''{'ac_cv_have_dllimport_exception_bug'+set}'`\" = set"; then
16-
@@ -8093,6 +8093,12 @@ EOF
33+
@@ -3471,7 +3473,7 @@ set dummy $CC; ac_cc="`echo $2 |
34+
if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
35+
echo $ac_n "(cached) $ac_c" 1>&6
36+
else
37+
- echo 'foo(){}' > conftest.c
38+
+ echo 'int foo(){}' > conftest.c
39+
# Make sure it works both with $CC and with simple cc.
40+
# We do the test twice because some compilers refuse to overwrite an
41+
# existing .o file with -o, though they will create one.
42+
@@ -8093,6 +8095,12 @@ EOF
1743
EOF
1844

1945
;;
@@ -26,3 +52,19 @@ $NetBSD: patch-configure,v 1.1 2016/11/16 13:13:44 fhajny Exp $
2652
*-gnu*)
2753
cat >> confdefs.h <<\EOF
2854
#define AVMPLUS_UNIX 1
55+
@@ -11047,6 +11055,7 @@ else
56+
#line 11048 "configure"
57+
#include "confdefs.h"
58+
59+
+int
60+
main()
61+
{
62+
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
63+
@@ -13592,6 +13601,7 @@ else
64+
#line 13593 "configure"
65+
#include "confdefs.h"
66+
#include <stdio.h>
67+
+int
68+
main()
69+
{
70+
FILE *f=fopen("conftestval", "w");

0 commit comments

Comments
 (0)