From: Bruno Dominguez <bru.dominguez@gmail.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] split c and cxx extra flags
Date: Tue, 6 Jun 2017 10:45:43 +0100 [thread overview]
Message-ID: <CALfaEa0T+rcZjmehm=Rdr+NOApTOKsizpCWcQ6ssErhU=nuUTA@mail.gmail.com> (raw)
In-Reply-To: <20170606092831.GA8013@stefanha-x1.localdomain>
2017-06-06 10:28 GMT+01:00 Stefan Hajnoczi <stefanha@gmail.com>:
> On Fri, Jun 02, 2017 at 02:07:26PM +0100, Bruno Dominguez wrote:
>> There was no possibility to add specific cxx flags using the configure
>> file. So A new entrance has been created to support it.
>>
>> Duplication of information in configure and rules.mak. Taking
>> QEMU_CFLAGS and add them to QEMU_CXXFLAGS, now the value of
>> QEMU_CXXFLAGS is stored in config-host.mak, so there is no need for
>> it.
>>
>> The makefile for libvixl was adding flags for QEMU_CXXFLAGS in
>> QEMU_CFLAGS because of the addition in rules.mak. That was removed, so
>> adding them where it should be.
>>
>> -----
>> Signed-off-by: Bruno Dominguez <bru.dominguez@gmail.com>
>> -----
>
> Please follow the code submission guidelines:
> http://wiki.qemu.org/Contribute/SubmitAPatch
>
> * The commit message (email subject) should have a prefix describing
> the affected component. Use "git log ./configure" for inspiration.
> I suggest the following:
>
> configure: split c and cxx extra flags
>
> * Use git-format-patch(1) so that your patch applies cleanly. Your
> email has:
>
> ----
> Signed-off-by: ...
> ----
>
> This is not the format recognized by tools. Instead the
> Signed-off-by: should be part of the commit description (no '----')
> and then a line with just three hyphens ('---') denotes the end of
> the commit description:
>
> Signed-off-by: ...
> ---
>
> * The email must not be line-wrapped since that breaks the patch. If
> you use git-send-email(1) to submit patches then this is taken care
> of automatically.
>
ok, will give it another go.
>> @@ -1304,6 +1312,7 @@ Advanced options (experts only):
>> --cxx=CXX use C++ compiler CXX [$cxx]
>> --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]
>> --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS
>> + --extra-cxxflags=CXXFLAGS append extra CXX compiler flags QEMU_CXXFLAGS
>
> For consistency with the --cxx= option description:
>
> s/CXX compiler/C++ compiler/
>
will do.
>> @@ -1489,37 +1498,6 @@ if test "$bogus_os" = "yes"; then
>> error_exit "Unrecognized host OS $targetos"
>> fi
>>
>> -# Check that the C++ compiler exists and works with the C compiler
>> -if has $cxx; then
>> - cat > $TMPC <<EOF
>> -int c_function(void);
>> -int main(void) { return c_function(); }
>> -EOF
>> -
>> - compile_object
>> -
>> - cat > $TMPCXX <<EOF
>> -extern "C" {
>> - int c_function(void);
>> -}
>> -int c_function(void) { return 42; }
>> -EOF
>> -
>> - update_cxxflags
>> -
>> - if do_cxx $QEMU_CXXFLAGS -o $TMPE $TMPCXX $TMPO $LDFLAGS; then
>> - # C++ compiler $cxx works ok with C compiler $cc
>> - :
>> - else
>> - echo "C++ compiler $cxx does not work with C compiler $cc"
>> - echo "Disabling C++ specific optional code"
>> - cxx=
>> - fi
>> -else
>> - echo "No C++ compiler available; disabling C++ specific optional code"
>> - cxx=
>> -fi
>> -
>
> Why move this code?
>
the configure file adds "-fPIE -DPIE" to QEMU_CFLAGS around line 1570.
Where QEMU_CXXFLAGS is placed is not taken it, hence this flag is not
tested with the c++ compiler and breaks the build later on for not
existing. Because QEMU_CXXFLAGS was reassigned again in rules.mak this
was hidden.
next prev parent reply other threads:[~2017-06-06 9:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 13:07 [Qemu-devel] [PATCH] split c and cxx extra flags Bruno Dominguez
2017-06-06 9:18 ` Bruno Dominguez
2017-06-06 9:28 ` Stefan Hajnoczi
2017-06-06 9:45 ` Bruno Dominguez [this message]
2017-06-06 10:38 ` Stefan Hajnoczi
2017-06-06 12:20 ` Bruno Dominguez
2017-06-06 12:38 ` Stefan Hajnoczi
2017-06-06 12:59 ` Bruno Dominguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALfaEa0T+rcZjmehm=Rdr+NOApTOKsizpCWcQ6ssErhU=nuUTA@mail.gmail.com' \
--to=bru.dominguez@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).