[Android] [PATCH 2/5] fix find_module

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 9 14:52:19 CET 2015


OK

On 09 Feb, Thomas Guillem wrote :
> vlc_entry__ symbols are not necessarily named like the .a file, so use nm to
> find the good symbol.
> ---
>  compile-libvlc.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/compile-libvlc.sh b/compile-libvlc.sh
> index 54d077f..8844a02 100755
> --- a/compile-libvlc.sh
> +++ b/compile-libvlc.sh
> @@ -480,9 +480,9 @@ VLC_MODULES=`./find_modules.sh vlc/$VLC_BUILD_DIR`
>  DEFINITION="";
>  BUILTINS="const void *vlc_static_modules[] = {\n";
>  for file in $VLC_MODULES; do
> -	name=`echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//'`; \
> -	DEFINITION=$DEFINITION"int vlc_entry__$name (int (*)(void *, void *, int, ...), void *);\n"; \
> -	BUILTINS="$BUILTINS vlc_entry__$name,\n"; \
> +    symbol=`"${CROSS_COMPILE}nm" -g $file | grep vlc_entry__|cut -d" " -f 3`
> +    DEFINITION=$DEFINITION"int $symbol (int (*)(void *, void *, int, ...), void *);\n"; \
> +    BUILTINS="$BUILTINS $symbol,\n"; \
>  done; \
>  BUILTINS="$BUILTINS NULL\n};\n"; \
>  printf "/* Autogenerated from the list of modules */\n $DEFINITION\n $BUILTINS\n" > libvlc/jni/libvlcjni.h
> -- 
> 2.1.3
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list