[Cbe-oss-dev] [PATCH 1/7]MARS/core: Fix host static lib
Kazunori Asayama
asayama at sm.sony.co.jp
Wed Oct 29 19:51:51 EST 2008
Yuji Mano wrote:
> This fixes the problem where mars_kernel_entry symbol is undefined in the static
> library libmars.a. The problem is the MARS kernel spu embedded object does not
> get properly included in the static library.
>
> This is a hack so that we can have the MARS kernel embedded spu object included
> into the static library. The hack forces creation of the .lo object file usually
> created by libtool. Without the hack there does not seem to be any clean
> solution for having automake and libtool to create a libtool object from an
> object file created by some external application such as ppu-embedspu.
>
> Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
>
> ---
> core/src/host/lib/Makefile.am | 21 ++++++++++++++-------
> core/src/mpu/kernel/Makefile.am | 2 +-
> 2 files changed, 15 insertions(+), 8 deletions(-)
>
> --- a/core/src/host/lib/Makefile.am
> +++ b/core/src/host/lib/Makefile.am
> @@ -40,7 +40,7 @@ extra_cppflags =
> extra_cflags =
> extra_ldflags =
>
> -MARS_KERNEL = ${top_builddir}/../mpu/kernel/mars-kernel
> +MARS_KERNEL = ${top_builddir}/../mpu/kernel/mars_kernel
>
> if DEBUG
> extra_cppflags += "-DDEBUG"
> @@ -109,7 +109,18 @@ libmars_la_SOURCES = \
> workload_queue.c \
> workload_queue.h
>
> -libmars_la_DEPENDENCIES = mars-kernel.eo
> +nodist_libmars_la_SOURCES = \
> + mars_kernel.eo
> +
> +libmars_la_DEPENDENCIES = mars_kernel.eo
> +
> +mars_kernel.eo: ${MARS_KERNEL}
> + $(EMBEDSPU) $(CFLAGS) mars_kernel_entry $< $@
> +
> +.eo.lo:
> + @echo "# Generated by ltmain.sh - GNU libtool" > $@
> + @echo "pic_object='"$<"'" >> $@
> + @echo "non_pic_object='"$<"'" >> $@
A non PIC 'mars_kernel.eo' is used for shared library.
--
(ASAYAMA Kazunori
(asayama at sm.sony.co.jp))
t
More information about the cbe-oss-dev
mailing list