[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: "Enable _FORTIFY_SOURCE=2" result in building failure f
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c |
Date: |
Thu, 04 Feb 2010 13:31:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Sheng Yang <address@hidden> wrote:
> Got this building failure:
>
> In file included from qemu-img.c:68:
>
>
> qemu-img-cmds.h:22:1: error: unterminated argument list invoking macro
> "printf"
>
> cc1: warnings being treated as errors
> qemu-img.c: In function ‘help’:
> qemu-img.c:95: warning: statement with no effect
> qemu-img.c:71: error: expected ‘;’ before string constant
> qemu-img.c:95: error: expected statement before ‘)’ token
> make: *** [qemu-img.o] Error 1
>
> And git bisect figure out the commit: 84958305, "Enable _FORTIFY_SOURCE=2".
>
> And the code is here:
>
> printf("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008
> Fabrice
> Bellard\n"
> "usage: qemu-img command [command options]\n"
> "QEMU disk image utility\n"
> "\n"
> "Command syntax:\n"
> #define DEF(option, callback, arg_string) \
> " " arg_string "\n"
> #include "qemu-img-cmds.h"
> #undef DEF
> #undef GEN_DOCS
> ....
>
> Seems gcc take "printf" as a marco. I added a "#undef printf" before the
> line,
> then it works...
>
> So any clue on what's happened and how to fix?
>
> GCC version is 4.1.2.
I looks like that GCC + _FORTIFY_SOURCE=2 is broken on your platfrom.
What is better, to remove the multi-line string (it appears that is the
only one there) or to make a test to check that _FORTIFY_SOURCE works on
platforms.
Anthony, what do you preffer?
Later, Juan.
- [Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c, Sheng Yang, 2010/02/04
- [Qemu-devel] Re: "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c, Paolo Bonzini, 2010/02/04
- Re: [Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c, Jamie Lokier, 2010/02/04
- [Qemu-devel] Re: "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c,
Juan Quintela <=
- [Qemu-devel] [PATCH] qemu-img: avoid preprocessor directives in a printf call, Paolo Bonzini, 2010/02/04
- [Qemu-devel] Re: [PATCH] qemu-img: avoid preprocessor directives in a printf call, Sheng Yang, 2010/02/04
- [Qemu-devel] [PATCH 0/4] Fix printf calls embedding preprocessor directives, Paolo Bonzini, 2010/02/04
- [Qemu-devel] Re: [PATCH 0/4] Fix printf calls embedding preprocessor directives, Sheng Yang, 2010/02/04
- Re: [Qemu-devel] Re: [PATCH 0/4] Fix printf calls embedding preprocessor directives, Kevin Wolf, 2010/02/05
- [Qemu-devel] Re: [PATCH 0/4] Fix printf calls embedding preprocessor directives, Paolo Bonzini, 2010/02/05
- [Qemu-devel] [PATCH 1/4] qemu-img: avoid preprocessor directives in a printf call, Paolo Bonzini, 2010/02/04
- [Qemu-devel] [PATCH 2/4] cope with printf macro definition in readline.c, Paolo Bonzini, 2010/02/04
- [Qemu-devel] [PATCH 3/4] do not interpolate % from vl.c to qemu-options.h, Paolo Bonzini, 2010/02/04
- [Qemu-devel] [PATCH 4/4] vl.c: avoid preprocessor directives in a printf call, Paolo Bonzini, 2010/02/04