[Cbe-oss-dev] [PATCH] libspe2: Separate SPE loader dir from libdir

Jeremy Kerr jk at ozlabs.org
Mon Feb 4 15:15:44 EST 2008


We currently use libdir as the base path for the emulated loader binary,
but this was causing 64-bit build of libspe to look in
/usr/lib64/spe/emulated-loader.bin. However, the emulated loader doesn't
really depend on the ppu architecture, so we should keep it in
/usr/lib/spe.

This change adds a spe_ld_dir variable, which can be set independently
from libdir (but uses libdir as the default). It also changes the
specfile to use /usr/lib/spe for all builds.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
Acked-by: Masana Murase <MMASANA at jp.ibm.com>

--

Update: use spe_ld_dir as the configure/make/spec variable name, instead
of spelibdir

---

 libspe2.spec     |    9 +++++----
 make.defines     |    1 +
 spebase/Makefile |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

Index: libspe2/libspe2.spec
===================================================================
--- libspe2.orig/libspe2.spec
+++ libspe2/libspe2.spec
@@ -43,6 +43,7 @@ Summary: SPE Runtime Management Library
 %endif
 %define _adabindingdir /usr/adainclude
 %define _includedir2 /usr/spu/include
+%define _spe_ld_dir /usr/lib/spe
 
 %define _initdir /etc/init.d
 %define _unpackaged_files_terminate_build 0
@@ -116,17 +117,17 @@ This tool acts as a standalone loader fo
 %setup
 
 %build
-make SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir}
+make SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir} spe_ld_dir=%{_spe_ld_dir}
 %if %{build_common}
-make elfspe-all SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir}
+make elfspe-all SYSROOT=%{sysroot} %{set_optflags} prefix=%{_prefix} libdir=%{_libdir} spe_ld_dir=%{_spe_ld_dir}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT%{sysroot}
 
-make install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2}
+make install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2} spe_ld_dir=%{_spe_ld_dir}
 %if %{build_common}
-make elfspe-install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2}
+make elfspe-install DESTDIR=$RPM_BUILD_ROOT SYSROOT=%{sysroot} prefix=%{_prefix} libdir=%{_libdir} speinclude=%{_includedir2} spe_ld_dir=%{_spe_ld_dir}
 %endif
 
 mkdir -p $RPM_BUILD_ROOT%{sysroot}%{_initdir}
Index: libspe2/make.defines
===================================================================
--- libspe2.orig/make.defines
+++ libspe2/make.defines
@@ -42,6 +42,7 @@ bindir		 = ${exec_prefix}/bin
 libdir		 = ${exec_prefix}/lib
 includedir	 = ${prefix}/include
 speinclude	 = ${prefix}/spu/include
+spe_ld_dir	 = ${libdir}/spe/
 adabindingdir   = ${prefix}/adainclude
 
 DESTDIR		:=
Index: libspe2/spebase/Makefile
===================================================================
--- libspe2.orig/spebase/Makefile
+++ libspe2/spebase/Makefile
@@ -23,7 +23,7 @@ include $(TOP)/make.defines
 
 MAJOR_VERSION	:= 2
 MINOR_VERSION	:= 0.0
-EMULATED_LOADER := $(libdir)/spe/emulated-loader.bin
+EMULATED_LOADER := $(spe_ld_dir)/emulated-loader.bin
 
 libspebase_A	:= libspebase.a
 libspebase_SO	:= libspebase.so.${MAJOR_VERSION}.${MINOR_VERSION}



More information about the cbe-oss-dev mailing list