qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] split c and cxx extra flags


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] split c and cxx extra flags
Date: Tue, 6 Jun 2017 11:38:39 +0100

On Tue, Jun 6, 2017 at 10:45 AM, Bruno Dominguez
<address@hidden> wrote:
> 2017-06-06 10:28 GMT+01:00 Stefan Hajnoczi <address@hidden>:
>> On Fri, Jun 02, 2017 at 02:07:26PM +0100, Bruno Dominguez wrote:
>>> @@ -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.

Thanks for explaining.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]