-std=c++11 added to CXXFLAGS in 3.0 on linux

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

-std=c++11 added to CXXFLAGS in 3.0 on linux

Michal Kubecek
Hello,

commit 52d9a05a0f3d ("Backport from master: Optimized hash function for
lock manager and hash join") in B3_0_Release branch adds "-std=c++11" to
CXXFLAGS on Linux.

Is this change intentional? Is it something we want? It doesn't seem to
be necessary, as far as I can say, the build succeeds without it, both
with gcc 4.3 and gcc6.

                                                         Michal Kubecek


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: -std=c++11 added to CXXFLAGS in 3.0 on linux

Treeve Jelbert
On Thu, 19 Jan 2017 13:41:54 +0100, Michal Kubecek wrote:

> Hello,
>
> commit 52d9a05a0f3d ("Backport from master: Optimized hash function
> for
> lock manager and hash join") in B3_0_Release branch adds "-std=c++11"
> to
> CXXFLAGS on Linux.
>
> Is this change intentional? Is it something we want? It doesn't seem
> to
> be necessary, as far as I can say, the build succeeds without it,
> both
> with gcc 4.3 and gcc6.
>

this commit also requires -msse4
this poses a problem for me.
I currently run a client program on my notebook, using 3.0.1.32609-0,
compile on 20160929

The latest git version, e8dd0b1, crashes when -msse4 is specified.

boot_isql : llegal instruction

Without -msse4, the build fails
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/nmmintrin.h:31:0,
                  from /var/git/firebird3/src/common/CRC32C.cpp:34:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/smmintrin.h:
In function 'unsigned int CRC32C(unsigned int, const unsigned char*)':
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/smmintrin.h:827:1:
  error: inlining failed in
  call to always_inline 'unsigned int _mm_crc32_u8(unsigned int,
unsigned char)':
target specific option mismatch
  _mm_crc32_u8 (unsigned int __C, unsigned char __V)
  ^~~~~~~~~~~~
/var/git/firebird3/src/common/CRC32C.cpp:41:41: note: called from here
    return _mm_crc32_u8(hash_value, *value);
                                          ^

My notebook does not appear to support sse4.2

Lenovo Thinkpad,purchased 2011/10

AMD A6-3400M APU with Radeon(tm) HD Graphics

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext
fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl
nonstop_tsc extd_apicid aperfmperf eagerfpu pni monitor cx16 popcnt
lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse
3dnowprefetch osvw ibs skinit wdt cpb hw_pstate vmmcall arat npt lbrv
svm_lock nrip_save pausefilter

Regards

>                                                          Michal
> Kubecek
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: -std=c++11 added to CXXFLAGS in 3.0 on linux

Dimitry Sibiryakov-3
20.01.2017 11:25, Treeve Jelbert wrote:
> The latest git version, e8dd0b1, crashes when -msse4 is specified.
>
> boot_isql : llegal instruction

   Which exactly instruction is illegal?
   What bits are returned in ecx by __cpuid() function on your notebook?


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: -std=c++11 added to CXXFLAGS in 3.0 on linux

Mariuz
should we include x86intrin.h ? without compiler flags

http://stackoverflow.com/questions/11228855/header-files-for-x86-simd-intrinsics

On Fri, Jan 20, 2017 at 12:35 PM, Dimitry Sibiryakov <[hidden email]> wrote:
20.01.2017 11:25, Treeve Jelbert wrote:
> The latest git version, e8dd0b1, crashes when -msse4 is specified.
>
> boot_isql : llegal instruction

   Which exactly instruction is illegal?
   What bits are returned in ecx by __cpuid() function on your notebook?


--
   WBR, SD.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel