[Qemu-devel] [PATCH v5 02/19] tcg/sparc: Use the proper compilation flags for 32-bit

Richard Henderson posted 19 patches 8 years, 9 months ago
[Qemu-devel] [PATCH v5 02/19] tcg/sparc: Use the proper compilation flags for 32-bit
Posted by Richard Henderson 8 years, 9 months ago
We have required a v9 cpu since 9b9c37c36439ee0452632253dac7a31897f27f70.
However, the flags we were using did not reliably enable v8plus, which
meant that the compiler didn't know it could inline 64-bit atomics.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index c35acf1..55dd9c3 100755
--- a/configure
+++ b/configure
@@ -1206,12 +1206,12 @@ case "$cpu" in
            LDFLAGS="-m64 $LDFLAGS"
            ;;
     sparc)
-           LDFLAGS="-m32 $LDFLAGS"
-           CPU_CFLAGS="-m32 -mcpu=ultrasparc"
+           CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
+           LDFLAGS="-m32 -mv8plus $LDFLAGS"
            ;;
     sparc64)
-           LDFLAGS="-m64 $LDFLAGS"
            CPU_CFLAGS="-m64 -mcpu=ultrasparc"
+           LDFLAGS="-m64 $LDFLAGS"
            ;;
     s390)
            CPU_CFLAGS="-m31"
-- 
2.9.3


Re: [Qemu-devel] [PATCH v5 02/19] tcg/sparc: Use the proper compilation flags for 32-bit
Posted by Alex Bennée 8 years, 9 months ago
Richard Henderson <rth@twiddle.net> writes:

> We have required a v9 cpu since 9b9c37c36439ee0452632253dac7a31897f27f70.
> However, the flags we were using did not reliably enable v8plus, which
> meant that the compiler didn't know it could inline 64-bit atomics.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  configure | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index c35acf1..55dd9c3 100755
> --- a/configure
> +++ b/configure
> @@ -1206,12 +1206,12 @@ case "$cpu" in
>             LDFLAGS="-m64 $LDFLAGS"
>             ;;
>      sparc)
> -           LDFLAGS="-m32 $LDFLAGS"
> -           CPU_CFLAGS="-m32 -mcpu=ultrasparc"
> +           CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
> +           LDFLAGS="-m32 -mv8plus $LDFLAGS"
>             ;;
>      sparc64)
> -           LDFLAGS="-m64 $LDFLAGS"
>             CPU_CFLAGS="-m64 -mcpu=ultrasparc"
> +           LDFLAGS="-m64 $LDFLAGS"
>             ;;
>      s390)
>             CPU_CFLAGS="-m31"


--
Alex Bennée