Wireshark-dev: Re: [Wireshark-dev] Compiling with GCC enabling sse4.2?
From: Jakub Zawadzki <[email protected]>
Date: Tue, 3 Jun 2014 21:25:31 +0200
Hi,

On Tue, Jun 03, 2014 at 08:37:49AM +0000, Anders Broman wrote:
> How do I go about compiling Wireshark with sse4.2 enabled? If I understand correctly I should add GCC flag -march=native somewhere?

Anders, just to let you know your libc is already using sse4.2 and it shows up in your profiles:
      1,069,870  >   /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/strcmp-sse42.S:__strcmp_ **sse42** (37467x) [/lib/x86_64-linux-gnu/libc-2.17.so]
      1,832,321  >   /build/buildd/eglibc-2.17/string/../sysdeps/x86_64/multiarch/strcmp-sse42.S:__strncmp_ **sse42** (66829x) [/lib/x86_64-linux-gnu/libc-2.17.so]

I'm not sure if your $CC will generate more sse4.2 in wireshark, still for sure if you pass -march=native -O3 it should be faster,
(it should be even more faster when you compile with -flto ;)).


Anyway the proper way for autotools is to do:

 export CFLAGS="-O2 -march=native -pipe"
 ./configure


Cheers,
Jakub.