Index: configure
===================================================================
--- configure	(revision 34396)
+++ configure	(working copy)
@@ -7587,6 +7587,26 @@
   ld_dl_dynamic='-rdynamic'
 fi
 
+# The hardware capabilities inserted into the ELF header by the Solaris linker
+# may keep the run-time loader from allowing the binary to run on some x86
+# platforms.  The GNU linker presumably does not insert these capabilities.
+if sunos ; then
+  echocheck "Solaris linker"
+  if test "$cc_name" = "gcc" ; then
+    if cflag_check "-Wl,-z,help" ; then
+      echo "hwcap_1 = OVERRIDE;" > mapfile && extra_ldflags="$extra_ldflags -Wl,-M,mapfile"
+      echores "yes"
+    else
+      echores "no"
+    fi
+  elif test "$cc_vendor" = "sun" ; then
+    echo "hwcap_1 = OVERRIDE;" > mapfile && extra_ldflags="$extra_ldflags -Mmapfile"
+    echores "yes"
+  else
+    echores "no"
+  fi
+fi
+
 extra_ldflags="$extra_ldflags $ld_pthread $ld_dl $ld_dl_dynamic"
 bsdos && extra_ldflags="$extra_ldflags -ldvd"
 (netbsd || openbsd) && x86_32 && extra_ldflags="$extra_ldflags -li386"
