]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Keep "-lmingwex" and "-lmoldname" in linker flags for MinGW
authorMarkus Mützel <markus.muetzel@gmx.de>
Sun, 5 Jan 2025 18:14:19 +0000 (18:14 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Jan 2025 22:02:15 +0000 (14:02 -0800)
It is needed when building Octave targeting Windows. Without it, the
implementation of "casin" from the Windows runtime is used instead of
the replacement from MinGW-w64.  That means that results for the
"casin" function are wrong without that change.
* lib/autoconf/fortran.m4: Do not remove "-lmingwex" or "-lmoldname"
from the linker flags when targeting MinGW.  Removing "-lmingwex" causes
an incorrect linker resolution for functions like "casin" for projects
that consist of Fortran and C++ sources.  Removing "-lmoldname" causes
issues for Fortran projects that try to use POSIX-like C functions
without a '_' symbol prefix when targeting MinGW.

lib/autoconf/fortran.m4

index 7563149299d6488321e4f3b73981c2f02be6556f..0fc7545d75b597f72174919b124d03e1bdff631c 100644 (file)
@@ -666,7 +666,7 @@ while test $[@%:@] != 1; do
        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
          |-LANG:=* | -LIST:* | -LNO:* | -link)
          ;;
-       -lkernel32 | -lmingw* | -lmoldname)
+       -lkernel32)
          # Ignore this library only on Windows-like systems.
          case $host_os in
          cygwin* | msys* | mingw* | windows*) ;;