diff mbox

disas/libvixl: Really suppress gcc 4.6.3 sign-compare warnings

Message ID 1452783202-576-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Jan. 14, 2016, 2:53 p.m. UTC
Commit 8acc216b956 attempted to silence some sign-compare
warnings in libvixl by adding -Wno-sign-compare to the CFLAGS
for the relevant objects. Unfortunately it was ineffective
because it was placed before $(QEMU_CFLAGS), so the -Wall in
the general flags overrode -Wno-sign-compare rather than
vice-versa. Reorder the flags so the warning suppression works.

Thanks to Franz-Josef Haider <Franz-Josef.Haider@student.uibk.ac.at>
for pointing out what was wrong with the original patch.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Alex, is there a way to test this patch against Travis before
we commit it to master?

 disas/libvixl/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Bennée Jan. 14, 2016, 3:21 p.m. UTC | #1
Peter Maydell <peter.maydell@linaro.org> writes:

> Commit 8acc216b956 attempted to silence some sign-compare
> warnings in libvixl by adding -Wno-sign-compare to the CFLAGS
> for the relevant objects. Unfortunately it was ineffective
> because it was placed before $(QEMU_CFLAGS), so the -Wall in
> the general flags overrode -Wno-sign-compare rather than
> vice-versa. Reorder the flags so the warning suppression works.
>
> Thanks to Franz-Josef Haider <Franz-Josef.Haider@student.uibk.ac.at>
> for pointing out what was wrong with the original patch.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Alex, is there a way to test this patch against Travis before
> we commit it to master?

Mea culpa:

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

and a conditional:

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

when:

https://travis-ci.org/stsquad/qemu/builds/102371704

completes.

>
>  disas/libvixl/Makefile.objs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/disas/libvixl/Makefile.objs b/disas/libvixl/Makefile.objs
> index d1e801a..bbe7695 100644
> --- a/disas/libvixl/Makefile.objs
> +++ b/disas/libvixl/Makefile.objs
> @@ -6,6 +6,6 @@ libvixl_OBJS = vixl/utils.o \
>
>  # The -Wno-sign-compare is needed only for gcc 4.6, which complains about
>  # some signed-unsigned equality comparisons which later gcc versions do not.
> -$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl -Wno-sign-compare $(QEMU_CFLAGS)
> +$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS) -Wno-sign-compare
>
>  common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)


--
Alex Bennée
Peter Maydell Jan. 14, 2016, 6:27 p.m. UTC | #2
On 14 January 2016 at 15:21, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
>> Commit 8acc216b956 attempted to silence some sign-compare
>> warnings in libvixl by adding -Wno-sign-compare to the CFLAGS
>> for the relevant objects. Unfortunately it was ineffective
>> because it was placed before $(QEMU_CFLAGS), so the -Wall in
>> the general flags overrode -Wno-sign-compare rather than
>> vice-versa. Reorder the flags so the warning suppression works.
>>
>> Thanks to Franz-Josef Haider <Franz-Josef.Haider@student.uibk.ac.at>
>> for pointing out what was wrong with the original patch.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> Alex, is there a way to test this patch against Travis before
>> we commit it to master?
>
> Mea culpa:
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>
> and a conditional:
>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
>
> when:
>
> https://travis-ci.org/stsquad/qemu/builds/102371704

Test travis build completed OK, so I have pushed this fix to master.

thanks
-- PMM
diff mbox

Patch

diff --git a/disas/libvixl/Makefile.objs b/disas/libvixl/Makefile.objs
index d1e801a..bbe7695 100644
--- a/disas/libvixl/Makefile.objs
+++ b/disas/libvixl/Makefile.objs
@@ -6,6 +6,6 @@  libvixl_OBJS = vixl/utils.o \
 
 # The -Wno-sign-compare is needed only for gcc 4.6, which complains about
 # some signed-unsigned equality comparisons which later gcc versions do not.
-$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl -Wno-sign-compare $(QEMU_CFLAGS)
+$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS := -I$(SRC_PATH)/disas/libvixl $(QEMU_CFLAGS) -Wno-sign-compare
 
 common-obj-$(CONFIG_ARM_A64_DIS) += $(libvixl_OBJS)