[x265] [PATCH] cmake: switch to c++11 for Clang and GCC

Mateusz Brzostek mateusz at msystem.waw.pl
Thu Apr 27 15:27:11 CEST 2017


After speed test:
GCC 7.0.1 and GCC 8.0.0 generates identical EXEs with -std=c++11 and -std=gnu++11.
The rest relative encoding time (to GCC 6.3 gnu++11)

x265c48 	101,16%
x265g48 	101,15%
x265c49 	100,67%
x265g49 	100,92%
x265c54 	101,50%
x265g54 	101,49%
x265c63 	99,95%
x265g63 	100,00%


For GCC 4.8.5 and GCC 5.4 -- gnu++11 wins, for GCC 4.9.4 and GCC 6.3 -- c++11 wins.

I think it is OK to set -std=c++11 for GCC.


W dniu 2017-04-26 o 12:27, Mateusz Brzostek pisze:
> I will make speed test -std=c++11 vs. -std=gnu++11 (in the night) and if x265 build with GCC -std=c++11 is not slower than with -std=gnu++11 I will be convinced to -std=c++11.
>
>
> W dniu 2017-04-26 o 08:07, Michael Lackner pisze:
>> Actually, I compiled x265 2.4+2 just yesterday using GCC 6.2.0 on Linux, and I had it set
>> to '-std=c++11'. It compiled and ran just fine doing a quick test run with some 1080p content.
>>
>> On a side note: Also worked just fine with clang/llvm 3.9.1 on FreeBSD 10.3 UNIX,
>> currently encoding 4K/UHD stuff.
>>
>> On 04/25/2017 04:43 PM, Stephen Hutchinson wrote:
>>> On 4/25/2017 4:25 AM, Mateusz Brzostek wrote:
>>>> After tests with GCC from 4.8 to 8.0 I think it is OK to change to c++11 from c++98 (for
>>>> -DENABLE_DYNAMIC_HDR10=ON and OFF).
>>>>
>>>> Selur (Hybrid author) wrote that for Clang it should be c++11 instead of gnu++11, so we
>>>> can set for Clang c++11, for GCC gnu++11.
>>>>
>>>> Please review.
>>>>
>>> Something that's been on my mind since the discussion around
>>> the -std= being set started is: is x265 even using the GNU
>>> extensions that require setting gnu++* variants as the -std?
>>> Or is it just being set like that because it's GCC?
>>>
>>> If GCC-specific stuff isn't being used, or if Clang is tolerant
>>> enough of any GNU extensions that are used, you could just set
>>> it as -std=c++11 for both Clang and GCC and not have to branch.
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170427/813b02fb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: results.7z
Type: application/octet-stream
Size: 18583 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170427/813b02fb/attachment-0001.obj>


More information about the x265-devel mailing list