[m-rev.] for review: re-enable asm_fast grades on i*86 Windows

Julien Fischer jfischer at opturion.com
Wed Jan 22 16:38:22 AEDT 2020


For review by anyone.

A more elegant fix would involve more surgery on the configure script
than I want to do so close to the release.

I've tested this with GCC 7.2 on x86 Windows and it's fine.

Julien.

-----------

Re-enable asm_fast grades on i*86 Windows with GCC 5+.

configure.ac:
     As above, there's no particular reason to disallow them other
     than a little messiness in the configure script.

diff --git a/configure.ac b/configure.ac
index 460a39c..e9fa577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2625,17 +2625,24 @@ case "$ac_cv_prog_gcc" in yes)
              # Alternatively, we may wish to consider using non-PIC in shared
              # libraries, accepting whatever drawbacks that entails.
              #
-            # XXX Not all platforms use PIC for dynamic linking, e.g. Windows,
-            # so this should be contingent on CFLAGS_FOR_PIC which is set
-            # further down. (We don't support DLLs on Windows yet.)
+            # XXX Not all platforms use PIC for dynamic linking, so this should
+            # be contingent on CFLAGS_FOR_PIC which is set further down.
              #
              case $C_COMPILER_TYPE in
                  gcc_3_*|gcc_4_*) ;;
                  gcc_*)
                      if test "$mercury_cv_enable_shared_libs" = yes
                      then
-                        mercury_cv_asm_labels=no
-                        mercury_cv_gcc_labels=no
+                        # XXX Make an exception for Windows since it doesn't use
+                        # PIC and we don't yet support DLLs anyway.
+                        case "$host" in
+                            *cygwin*|*mingw*)
+                                ;;
+                            *)
+                                mercury_cv_asm_labels=no
+                                mercury_cv_gcc_labels=no
+                                ;;
+                        esac
                      fi
                      ;;
              esac



More information about the reviews mailing list