On Mon, 22 Jun 2020 at 14:26, Joel Linn <j...@conductive.de> wrote:

> Hi folks,
>
> I want to use components statically. There is a number of places where
> functions are called conditionally based on config defines, for example
> in libavutil/cpu.c get_cpu_flags():
>
>      if (ARCH_PPC)
>          return ff_get_cpu_flags_ppc();
>
> I can't use the makefiles so needed to "translate" them into our build
> system for the parts I need.
> However I get unresolved symbols. What am I missing? I'm pretty sure the
> makefiles don't build the objects that define those unused functions
> either.
>
> Thanks in advance,
> Joel


If you have optimizations completely disabled in some compilers, dead code
elimination will not be applied so even if after macro expansion this
becomes:

If(0)
   return ff_get_cpu_flags_ppc();

linker will complain that  ff_get_cpu_flags_ppc is not available (since you
are obviously not compiling for PPC)
Depending on your compiler, try to enable just enough optimizations to get
dead code elimination pass applied.

Hope that helps,
Jaka
_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
libav-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to