Fix build problem: Error: junk `.get_pc_thunk.bx' after expression; trac #7799
authorIan Lynagh <ian@well-typed.com>
Sun, 19 May 2013 15:38:37 +0000 (16:38 +0100)
committerIan Lynagh <ian@well-typed.com>
Sun, 19 May 2013 15:38:37 +0000 (16:38 +0100)
Affects i386 only. Some gcc's generate code containing __i686, and then
define that symbol to 1, which causes compilation to fail. We undef
the symbol to work around it.

aclocal.m4

index 94f34b3..720e0d5 100644 (file)
@@ -492,6 +492,13 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
     AC_MSG_CHECKING([Setting up $2, $3, $4 and $5])
     case $$1 in
     i386-apple-darwin)
+        # Workaround for #7799
+        $2="$$2 -U__i686"
+        ;;
+    esac
+
+    case $$1 in
+    i386-apple-darwin)
         $2="$$2 -m32"
         $3="$$3 -m32"
         $4="$$4 -arch i386"