mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

GCC now complains if `main` has no explicitly declared return type. Because `bfr`s `configure` script uses a very minimal C application to check whether GCC works _at all_ (literally: `main(){return(0);}`), this caused configure failures. Another issue with the `configure` script is that it logs the compiler errors for its checks to `configure.log` (and not to stdout or stderr), which means that the root cause wasn't logged during the failed nix build. I added a patch that rewires the compiler error file descriptor so that it will simply log to stderr and another patch that fixes the missing return type in the C example. Unfortunately, it looks like the server isn't serving the source files anymore (and finding an official upstream repo which I could send a PR to seems... non-trivial).
13 lines
385 B
Diff
13 lines
385 B
Diff
diff --git a/configure b/configure
|
|
index 53e90a7..cc80615 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -908,7 +908,7 @@ cat > conftest.$ac_ext << EOF
|
|
#line 909 "configure"
|
|
#include "confdefs.h"
|
|
|
|
-main(){return(0);}
|
|
+int main(){return(0);}
|
|
EOF
|
|
if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
ac_cv_prog_cc_works=yes
|