--if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
-+if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" -o "$cpu" = "x32" \) -a \
- "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
- "$softmmu" = yes ; then
- roms="optionrom"
-
---- qemu-2.6.0/include/qemu/atomic.h~ 2016-07-17 18:37:57.000000000 +0200
-+++ qemu-2.6.0/include/qemu/atomic.h 2016-07-17 18:38:33.485893530 +0200
-@@ -20,7 +20,7 @@
- /* Compiler barrier */
- #define barrier() ({ asm volatile("" ::: "memory"); (void)0; })
-
--#ifdef __ATOMIC_RELAXED
-+#if defined(__ATOMIC_RELAXED) && !defined(__ILP32__)
- /* For C11 atomic ops */
-
- /* Manual memory barriers
+-if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
++if { test "$cpu" = "i386" || test "$cpu" = "x86_64" || test "$cpu" = "x32"; } && \
+ test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
+ test "$targetos" != "haiku" && test "$softmmu" = yes ; then
+ # Different host OS linkers have different ideas about the name of the ELF