--- /dev/null
+A patch from bug #752071 to fix build already sent to upstream.
+--- a/bfd/bfd-in.h
++++ b/bfd/bfd-in.h
+@@ -294,9 +294,9 @@
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
++#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE))
++#define bfd_set_section_alignment(bfd, ptr, val) ((ptr)->alignment_power = (val))
++#define bfd_set_section_userdata(bfd, ptr, val) ((ptr)->userdata = (val))
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -519,7 +519,7 @@
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
++#define bfd_set_cacheable(abfd,bool) ((abfd)->cacheable = bool)
+
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -301,9 +301,9 @@
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
++#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE))
++#define bfd_set_section_alignment(bfd, ptr, val) ((ptr)->alignment_power = (val))
++#define bfd_set_section_userdata(bfd, ptr, val) ((ptr)->userdata = (val))
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -526,7 +526,7 @@
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
++#define bfd_set_cacheable(abfd,bool) ((abfd)->cacheable = bool)
+
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
--- /dev/null
+diff -Naur gas/config/tc-i386.c gas/config/tc-i386.c
+--- a/gas/config/tc-i386.c 2013-11-26 12:37:33.000000000 +0100
++++ b/gas/config/tc-i386.c 2015-05-22 11:42:24.647713050 +0200
+@@ -6140,7 +6140,7 @@
+ op.bitfield.regmem = 0;
+ if ((dest + 1) >= i.operands
+ || (op.bitfield.reg32 != 1
+- && !op.bitfield.reg64 != 1
++ && !!op.bitfield.reg64
+ && !operand_type_equal (&op, ®xmm)
+ && !operand_type_equal (&op, ®ymm)
+ && !operand_type_equal (&op, ®zmm)
cd binutils-2.23.2
sed -i -e 's/@colophon/@@colophon/' \
-e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo
+patch -p1 < ../binutils1.patch
+patch -p1 < ../binutils2.patch
cd ..
-mkdir -p binutils-build-$MINGW_TARGET
-cd binutils-build-$MINGW_TARGET
+mkdir -p binutils-linux-build-$MINGW_TARGET
+cd binutils-linux-build-$MINGW_TARGET
../binutils-2.23.2/configure --with-sysroot=$MINGW_PREFIX --prefix=$MINGW_PREFIX --disable-multilib -target=$MINGW_TARGET --enable-targets=$MINGW_TARGET
make $MINGW_PARALLEL
sudo make install
--- /dev/null
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 68acd3d..953262f 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -22,6 +22,9 @@ __inline
+ static unsigned int hash (const char *, unsigned int);
+ #ifdef __GNUC__
+ __inline
++#ifdef __GNUC_STDC_INLINE__
++__attribute__ ((__gnu_inline__))
++#endif
+ #endif
+ const char * libc_name_p (const char *, unsigned int);
+ %}
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index 1c6665d..6d00c0e 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -53,6 +53,9 @@ __inline
+ static unsigned int hash (const char *, unsigned int);
+ #ifdef __GNUC__
+ __inline
++#ifdef __GNUC_STDC_INLINE__
++__attribute__ ((__gnu_inline__))
++#endif
+ #endif
+ const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+--
+2.4.4