Skip to content

Commit c549cc9

Browse files
langsjobjornfor
authored andcommitted
gopher: fix build for GCC 14
The project's configure file tested if the C compiler worked by compiling a small program, but that test program does not compile on GCC 14. This commit adds a patch which makes that test program work with GCC 14
1 parent 7e1c9bd commit c549cc9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/configure b/configure
2+
index 1b20711..79ce215 100644
3+
--- a/configure
4+
+++ b/configure
5+
@@ -679,7 +679,7 @@ cat > conftest.$ac_ext << EOF
6+
#line 680 "configure"
7+
#include "confdefs.h"
8+
9+
-main(){return(0);}
10+
+int main(){return(0);}
11+
EOF
12+
if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13+
ac_cv_prog_cc_works=yes

pkgs/by-name/go/gopher/package.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ stdenv.mkDerivation rec {
1818

1919
buildInputs = [ ncurses ];
2020

21+
patches = [
22+
./int_main.patch # https://github.com/jgoerzen/gopher/pull/8
23+
];
24+
2125
preConfigure = "export LIBS=-lncurses";
2226

2327
meta = with lib; {

0 commit comments

Comments
 (0)