]> git.proxmox.com Git - grub2.git/blobdiff - configure.ac
* configure.ac: Disable efiemu runtime on cygwin.
[grub2.git] / configure.ac
index 58dd2b8728de89dae07413c4f074be0f86dbeec2..457aafa4581885fb6a8bbbcd4fcee63ea80712db 100644 (file)
@@ -496,6 +496,19 @@ if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
   TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
 fi
 
+if test x"$target_os" = xcygwin; then
+  AC_CACHE_CHECK([whether option -fno-reorder-functions works], grub_cv_cc_no_reorder_functions, [
+    CFLAGS="$CFLAGS -fno-reorder-functions"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+                     [grub_cv_cc_no_reorder_functions=yes],
+                     [grub_cv_cc_no_reorder_functions=no])
+  ])
+fi
+
+if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xyes; then
+  TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
+fi
+
 # By default, GCC 4.6 generates .eh_frame sections containing unwind
 # information in some cases where it previously did not. GRUB doesn't need
 # these and they just use up vital space. Restore the old compiler
@@ -570,6 +583,9 @@ AC_ARG_ENABLE([efiemu],
 if test x"$enable_efiemu" = xno ; then
   efiemu_excuse="explicitly disabled"
 fi
+if test x"$target_os" = xcygwin ; then
+  efiemu_excuse="not available on cygwin"
+fi
 if test x"$target_cpu" != xi386 ; then
   efiemu_excuse="only available on i386"
 fi