brummer10 / GxPlugins.lv2

A set of extra lv2 plugins from the guitarix project.
GNU General Public License v3.0
168 stars 17 forks source link

SIMD level should be determined in the runtime #8

Closed yurivict closed 5 years ago

yurivict commented 6 years ago

Makefiles have a lot of clauses like this:

ifneq ($(shell cat /proc/cpuinfo | grep sse3 ) , )

SIMD level should be determined in the runtime, not during build. The package could be built on the machine with the different level of SIMD, and it will either crash in the runtime, or will be slow because it will not use available SIMD instructions.

brummer10 commented 6 years ago

May be a issue in some cases, but, using the right -msse -mfpmath=sse build flags is intentional. True, you could detect the CPU during runtime, but you can't simply switch between different CPU compiler optimisations during runtime. For cases were you build them on a different CPU then they will be used, or for distribute them to unknown CPU's, please overwrite the SSE_CFLAGS target. I've to do that myself as well when building them for the MOD https://github.com/brummer10/GxModBuildScripts

regards hermann

yurivict commented 6 years ago

I had to turn SSE off entirely, because there is only one centralized build on FreeBSD that should fit all possible machines.

brummer10 commented 6 years ago

Yes, I understand that, so you've to build them with make SSE_CFLAGS=' ' Some plugs may require a little more CPU time during run then.