diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-10-03 23:11:02 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@gmail.com> | 2012-10-05 15:48:33 +0200 |
commit | 8e7e2b14e7c86cdceb337cf7f5c4c351ab350775 (patch) | |
tree | 982e51b4e5d96f370c00643634e5084fd000c1f8 | |
parent | da665c99f1b5d3247f7f9f8a24f3eb1fda94e1e4 (diff) |
qemu-barrier: Fix compiler version check for future gcc versions
The current check will give a wrong result for gcc-5.x with x < 4.
Using QEMU_GNUC_PREREQ is simpler and fixes that issue.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
-rw-r--r-- | qemu-barrier.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-barrier.h b/qemu-barrier.h index 7e11197814..16f09429c3 100644 --- a/qemu-barrier.h +++ b/qemu-barrier.h @@ -19,7 +19,7 @@ * mfence on 32 bit as well, e.g. if built with -march=pentium-m. * However, on i386, there seem to be known bugs as recently as 4.3. * */ -#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 +#if QEMU_GNUC_PREREQ(4, 4) #define smp_mb() __sync_synchronize() #else #define smp_mb() asm volatile("lock; addl $0,0(%%esp) " ::: "memory") |