* [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
@ 2013-03-03 9:36 Blue Swirl
2013-03-03 21:03 ` Anthony Liguori
0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2013-03-03 9:36 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, aliguori
Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
configure | 12 +++++++++++-
ui/Makefile.objs | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 19738ac..2a043d6 100755
--- a/configure
+++ b/configure
@@ -3139,6 +3139,7 @@ fi
# the build doesn't fail anyway.
pragma_disable_unused_but_set=no
+gtk_special_cflags=no
cat > $TMPC << EOF
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
@@ -3150,7 +3151,7 @@ EOF
if compile_prog "-Werror" "" ; then
pragma_diagnostic_available=yes
else
- werror=no
+ gtk_special_cflags=yes
fi
########################################
@@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
echo "LIBTOOL=$libtool" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
+if test "$gtk_special_cflags" = "yes"; then
+ # Our compiler doesn't support #pragmas to suppress warnings and GTK
+ # can't be fixed, so compile GTK files with special CFLAGS
+ echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
+ sed -e 's/-Wstrict-prototypes//g' \
+ -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
+else
+ echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
+fi
echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
if test "$sparse" = "yes" ; then
echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index 6ddc0de..c9aa1e6 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
$(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
-$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
+$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
--
1.7.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
2013-03-03 9:36 [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS Blue Swirl
@ 2013-03-03 21:03 ` Anthony Liguori
2013-03-04 20:17 ` Blue Swirl
0 siblings, 1 reply; 6+ messages in thread
From: Anthony Liguori @ 2013-03-03 21:03 UTC (permalink / raw)
To: Blue Swirl, qemu-devel
Blue Swirl <blauwirbel@gmail.com> writes:
> Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
I thought Kevin's pragma trick solved this problem?
Are you attempting to avoid disabling Werror when prgram isn't
available? That seems to defeat the purpose of doing the pragma thing
to begin with.
Regards,
Anthony Liguori
> ---
> configure | 12 +++++++++++-
> ui/Makefile.objs | 2 +-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 19738ac..2a043d6 100755
> --- a/configure
> +++ b/configure
> @@ -3139,6 +3139,7 @@ fi
> # the build doesn't fail anyway.
>
> pragma_disable_unused_but_set=no
> +gtk_special_cflags=no
> cat > $TMPC << EOF
> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
> @@ -3150,7 +3151,7 @@ EOF
> if compile_prog "-Werror" "" ; then
> pragma_diagnostic_available=yes
> else
> - werror=no
> + gtk_special_cflags=yes
> fi
>
> ########################################
> @@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
> echo "LIBTOOL=$libtool" >> $config_host_mak
> echo "CFLAGS=$CFLAGS" >> $config_host_mak
> echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
> +if test "$gtk_special_cflags" = "yes"; then
> + # Our compiler doesn't support #pragmas to suppress warnings and GTK
> + # can't be fixed, so compile GTK files with special CFLAGS
> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
> + sed -e 's/-Wstrict-prototypes//g' \
> + -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
> +else
> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
> +fi
> echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
> if test "$sparse" = "yes" ; then
> echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
> index 6ddc0de..c9aa1e6 100644
> --- a/ui/Makefile.objs
> +++ b/ui/Makefile.objs
> @@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>
> $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
>
> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
> +$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
> --
> 1.7.2.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
2013-03-03 21:03 ` Anthony Liguori
@ 2013-03-04 20:17 ` Blue Swirl
2013-03-04 20:29 ` Anthony Liguori
0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2013-03-04 20:17 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
On Sun, Mar 3, 2013 at 9:03 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
>>
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>
> I thought Kevin's pragma trick solved this problem?
Not in all cases it seems.
>
> Are you attempting to avoid disabling Werror when prgram isn't
> available? That seems to defeat the purpose of doing the pragma thing
> to begin with.
When the pragma works, there should not be any need to disable -Werror
or other flags. If the pragmas are not available, we can disable the
offending flags only for gtk.c and keep them for the rest of the
build.
>
> Regards,
>
> Anthony Liguori
>
>> ---
>> configure | 12 +++++++++++-
>> ui/Makefile.objs | 2 +-
>> 2 files changed, 12 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 19738ac..2a043d6 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3139,6 +3139,7 @@ fi
>> # the build doesn't fail anyway.
>>
>> pragma_disable_unused_but_set=no
>> +gtk_special_cflags=no
>> cat > $TMPC << EOF
>> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
>> @@ -3150,7 +3151,7 @@ EOF
>> if compile_prog "-Werror" "" ; then
>> pragma_diagnostic_available=yes
>> else
>> - werror=no
>> + gtk_special_cflags=yes
>> fi
>>
>> ########################################
>> @@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
>> echo "LIBTOOL=$libtool" >> $config_host_mak
>> echo "CFLAGS=$CFLAGS" >> $config_host_mak
>> echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>> +if test "$gtk_special_cflags" = "yes"; then
>> + # Our compiler doesn't support #pragmas to suppress warnings and GTK
>> + # can't be fixed, so compile GTK files with special CFLAGS
>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
>> + sed -e 's/-Wstrict-prototypes//g' \
>> + -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
>> +else
>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>> +fi
>> echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
>> if test "$sparse" = "yes" ; then
>> echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
>> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
>> index 6ddc0de..c9aa1e6 100644
>> --- a/ui/Makefile.objs
>> +++ b/ui/Makefile.objs
>> @@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>>
>> $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
>>
>> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
>> +$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
>> --
>> 1.7.2.5
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
2013-03-04 20:17 ` Blue Swirl
@ 2013-03-04 20:29 ` Anthony Liguori
2013-03-04 20:56 ` Blue Swirl
0 siblings, 1 reply; 6+ messages in thread
From: Anthony Liguori @ 2013-03-04 20:29 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Blue Swirl <blauwirbel@gmail.com> writes:
> On Sun, Mar 3, 2013 at 9:03 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>> Blue Swirl <blauwirbel@gmail.com> writes:
>>
>>> Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
>>>
>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>
>> I thought Kevin's pragma trick solved this problem?
>
> Not in all cases it seems.
>
>>
>> Are you attempting to avoid disabling Werror when prgram isn't
>> available? That seems to defeat the purpose of doing the pragma thing
>> to begin with.
>
> When the pragma works, there should not be any need to disable -Werror
> or other flags. If the pragmas are not available, we can disable the
> offending flags only for gtk.c and keep them for the rest of the
> build.
The idea of the pragma is that gtk.c is the only place that will need
this in the future.
So either we like the pragma approach and just live with disabling
Werror on older GCCs or there's no point in doing the pragma approach in
the first place.
Since this is an issue only with older GCCs, I see no reason to care
about disabling Werror really. It's a problem that solves itself over time.
Regards,
Anthony Liguori
>
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>> ---
>>> configure | 12 +++++++++++-
>>> ui/Makefile.objs | 2 +-
>>> 2 files changed, 12 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index 19738ac..2a043d6 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -3139,6 +3139,7 @@ fi
>>> # the build doesn't fail anyway.
>>>
>>> pragma_disable_unused_but_set=no
>>> +gtk_special_cflags=no
>>> cat > $TMPC << EOF
>>> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>>> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
>>> @@ -3150,7 +3151,7 @@ EOF
>>> if compile_prog "-Werror" "" ; then
>>> pragma_diagnostic_available=yes
>>> else
>>> - werror=no
>>> + gtk_special_cflags=yes
>>> fi
>>>
>>> ########################################
>>> @@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
>>> echo "LIBTOOL=$libtool" >> $config_host_mak
>>> echo "CFLAGS=$CFLAGS" >> $config_host_mak
>>> echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>> +if test "$gtk_special_cflags" = "yes"; then
>>> + # Our compiler doesn't support #pragmas to suppress warnings and GTK
>>> + # can't be fixed, so compile GTK files with special CFLAGS
>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
>>> + sed -e 's/-Wstrict-prototypes//g' \
>>> + -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
>>> +else
>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>> +fi
>>> echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
>>> if test "$sparse" = "yes" ; then
>>> echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
>>> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
>>> index 6ddc0de..c9aa1e6 100644
>>> --- a/ui/Makefile.objs
>>> +++ b/ui/Makefile.objs
>>> @@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>>>
>>> $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
>>>
>>> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
>>> +$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
>>> --
>>> 1.7.2.5
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
2013-03-04 20:29 ` Anthony Liguori
@ 2013-03-04 20:56 ` Blue Swirl
2013-03-04 22:22 ` Anthony Liguori
0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2013-03-04 20:56 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
On Mon, Mar 4, 2013 at 8:29 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
> Blue Swirl <blauwirbel@gmail.com> writes:
>
>> On Sun, Mar 3, 2013 at 9:03 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>>> Blue Swirl <blauwirbel@gmail.com> writes:
>>>
>>>> Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
>>>>
>>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>>
>>> I thought Kevin's pragma trick solved this problem?
>>
>> Not in all cases it seems.
>>
>>>
>>> Are you attempting to avoid disabling Werror when prgram isn't
>>> available? That seems to defeat the purpose of doing the pragma thing
>>> to begin with.
>>
>> When the pragma works, there should not be any need to disable -Werror
>> or other flags. If the pragmas are not available, we can disable the
>> offending flags only for gtk.c and keep them for the rest of the
>> build.
>
> The idea of the pragma is that gtk.c is the only place that will need
> this in the future.
It's also the only file that needs GTK_CFLAGS. For simplicity, that
could contain also QEMU_CFLAGS, filtered for offending flags.
> So either we like the pragma approach and just live with disabling
> Werror on older GCCs or there's no point in doing the pragma approach in
> the first place.
>
> Since this is an issue only with older GCCs, I see no reason to care
> about disabling Werror really. It's a problem that solves itself over time.
>
> Regards,
>
> Anthony Liguori
>
>>
>>>
>>> Regards,
>>>
>>> Anthony Liguori
>>>
>>>> ---
>>>> configure | 12 +++++++++++-
>>>> ui/Makefile.objs | 2 +-
>>>> 2 files changed, 12 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/configure b/configure
>>>> index 19738ac..2a043d6 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -3139,6 +3139,7 @@ fi
>>>> # the build doesn't fail anyway.
>>>>
>>>> pragma_disable_unused_but_set=no
>>>> +gtk_special_cflags=no
>>>> cat > $TMPC << EOF
>>>> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>>>> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
>>>> @@ -3150,7 +3151,7 @@ EOF
>>>> if compile_prog "-Werror" "" ; then
>>>> pragma_diagnostic_available=yes
>>>> else
>>>> - werror=no
>>>> + gtk_special_cflags=yes
>>>> fi
>>>>
>>>> ########################################
>>>> @@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
>>>> echo "LIBTOOL=$libtool" >> $config_host_mak
>>>> echo "CFLAGS=$CFLAGS" >> $config_host_mak
>>>> echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>>> +if test "$gtk_special_cflags" = "yes"; then
>>>> + # Our compiler doesn't support #pragmas to suppress warnings and GTK
>>>> + # can't be fixed, so compile GTK files with special CFLAGS
>>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
>>>> + sed -e 's/-Wstrict-prototypes//g' \
>>>> + -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
>>>> +else
>>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>>> +fi
>>>> echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
>>>> if test "$sparse" = "yes" ; then
>>>> echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
>>>> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
>>>> index 6ddc0de..c9aa1e6 100644
>>>> --- a/ui/Makefile.objs
>>>> +++ b/ui/Makefile.objs
>>>> @@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>>>>
>>>> $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
>>>>
>>>> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
>>>> +$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
>>>> --
>>>> 1.7.2.5
>>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS
2013-03-04 20:56 ` Blue Swirl
@ 2013-03-04 22:22 ` Anthony Liguori
0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2013-03-04 22:22 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Blue Swirl <blauwirbel@gmail.com> writes:
> On Mon, Mar 4, 2013 at 8:29 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>> Blue Swirl <blauwirbel@gmail.com> writes:
>>
>>> On Sun, Mar 3, 2013 at 9:03 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
>>>> Blue Swirl <blauwirbel@gmail.com> writes:
>>>>
>>>>> Compile gtk.c with special CFLAGS instead of disabling -Werror globally.
>>>>>
>>>>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>>>>
>>>> I thought Kevin's pragma trick solved this problem?
>>>
>>> Not in all cases it seems.
>>>
>>>>
>>>> Are you attempting to avoid disabling Werror when prgram isn't
>>>> available? That seems to defeat the purpose of doing the pragma thing
>>>> to begin with.
>>>
>>> When the pragma works, there should not be any need to disable -Werror
>>> or other flags. If the pragmas are not available, we can disable the
>>> offending flags only for gtk.c and keep them for the rest of the
>>> build.
>>
>> The idea of the pragma is that gtk.c is the only place that will need
>> this in the future.
>
> It's also the only file that needs GTK_CFLAGS. For simplicity, that
> could contain also QEMU_CFLAGS, filtered for offending flags.
I mistyped--sorry. gtk.c is *not* the only place that will need this in the
future.
Regards,
Anthony Liguori
>
>> So either we like the pragma approach and just live with disabling
>> Werror on older GCCs or there's no point in doing the pragma approach in
>> the first place.
>>
>> Since this is an issue only with older GCCs, I see no reason to care
>> about disabling Werror really. It's a problem that solves itself over time.
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>>
>>>>
>>>> Regards,
>>>>
>>>> Anthony Liguori
>>>>
>>>>> ---
>>>>> configure | 12 +++++++++++-
>>>>> ui/Makefile.objs | 2 +-
>>>>> 2 files changed, 12 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/configure b/configure
>>>>> index 19738ac..2a043d6 100755
>>>>> --- a/configure
>>>>> +++ b/configure
>>>>> @@ -3139,6 +3139,7 @@ fi
>>>>> # the build doesn't fail anyway.
>>>>>
>>>>> pragma_disable_unused_but_set=no
>>>>> +gtk_special_cflags=no
>>>>> cat > $TMPC << EOF
>>>>> #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
>>>>> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
>>>>> @@ -3150,7 +3151,7 @@ EOF
>>>>> if compile_prog "-Werror" "" ; then
>>>>> pragma_diagnostic_available=yes
>>>>> else
>>>>> - werror=no
>>>>> + gtk_special_cflags=yes
>>>>> fi
>>>>>
>>>>> ########################################
>>>>> @@ -3845,6 +3846,15 @@ echo "WINDRES=$windres" >> $config_host_mak
>>>>> echo "LIBTOOL=$libtool" >> $config_host_mak
>>>>> echo "CFLAGS=$CFLAGS" >> $config_host_mak
>>>>> echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>>>> +if test "$gtk_special_cflags" = "yes"; then
>>>>> + # Our compiler doesn't support #pragmas to suppress warnings and GTK
>>>>> + # can't be fixed, so compile GTK files with special CFLAGS
>>>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" | \
>>>>> + sed -e 's/-Wstrict-prototypes//g' \
>>>>> + -e 's/-Wunused-but-set-variable//g' >> $config_host_mak
>>>>> +else
>>>>> + echo "GTK_SPECIAL_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
>>>>> +fi
>>>>> echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
>>>>> if test "$sparse" = "yes" ; then
>>>>> echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak
>>>>> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
>>>>> index 6ddc0de..c9aa1e6 100644
>>>>> --- a/ui/Makefile.objs
>>>>> +++ b/ui/Makefile.objs
>>>>> @@ -19,4 +19,4 @@ $(obj)/sdl.o $(obj)/sdl_zoom.o: QEMU_CFLAGS += $(SDL_CFLAGS)
>>>>>
>>>>> $(obj)/cocoa.o: $(SRC_PATH)/$(obj)/cocoa.m
>>>>>
>>>>> -$(obj)/gtk.o: QEMU_CFLAGS += $(GTK_CFLAGS) $(VTE_CFLAGS)
>>>>> +$(obj)/gtk.o: QEMU_CFLAGS = $(GTK_SPECIAL_CFLAGS) $(GTK_CFLAGS) $(VTE_CFLAGS)
>>>>> --
>>>>> 1.7.2.5
>>>>
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-04 22:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 9:36 [Qemu-devel] [PATCH] build: compile gtk.c with special CFLAGS Blue Swirl
2013-03-03 21:03 ` Anthony Liguori
2013-03-04 20:17 ` Blue Swirl
2013-03-04 20:29 ` Anthony Liguori
2013-03-04 20:56 ` Blue Swirl
2013-03-04 22:22 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).