ports/lang/gforth/files/patch-configure
Alexey Dokuchaev c6132acf5a lang/gforth: mend another tricky issue discovered with GCC 14
When checking whether the linker accepts -export-dynamic flag,
the configure script tries to build, literally, the following
short program: ``main(){exit(0);}'', which is not well-formed
against the modern standards (missing return type and implicit
function declaration).

PR:	281238
2024-12-13 11:53:06 +00:00

12 lines
336 B
Text

--- configure.orig 2014-06-13 22:52:28 UTC
+++ configure
@@ -4730,7 +4730,8 @@ if test "$cross_compiling" = yes; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-main(){exit(0);}
+#include <stdlib.h>
+int main(void) { exit(0); }
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_export_dynamic=yes