On Wed, Apr 22, 2020 at 10:40 AM Danilo Beuche <danilo.beu...@gmx.net>
wrote:

> Hi Richard,
>
> maybe two builds (one with, one without AVX2 etc.) and a wrapper program
> do the job. The wrapper does nothing more than detecting what is available
> and starts one or the other binary.
> Similarly we could put all the application code in two differently builds
> of a dynamic library and a customer wrapper just loads and pass control to
> the right one.
>

I've gotten some feedback on the Fedora side that glibc has the ability to
"detect" the capabilities and selectively load different libraries based on
the result, but it's far from mature and they're currently having some
"what does X mean" differences between the gcc folk and the glibc folks.
Hopefully it will get worked out.

> First solution is easier but less elegant. Don't ask me how to implement
> the second one, but 20 years ago I did something like this, guess it is
> still doable on modern Linux&Windows.
>

One option might be for me to update the CMake config to configurably build
multiple versions of the library, but I would have to rework the config
quite a bit and David would have to figure out how to load it, ah la:

try to load liblpcnetfreedv-avx2.so
Not found?

Try to load liblpcnetfreedv-avx.so

...

Try to load liblpcnetfreedv.so (no optimizations)

Thanks,
Richard
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to