[Cbe-oss-dev] [PATCH] libspe2: Separate spelibdir from libdir

D. Herrendoerfer d.herrendoerfer at herrendoerfer.name
Tue Jan 22 20:01:39 EST 2008


I agree with Asayama-san,

I would prefer something in the line of 'spe_ld_path' or so,
since the default loader is built in, the name should 
signify that this is an alternate location to find
a loader, not a library.

Regards,

D.Herrendoerfer

On Tue, 2008-01-22 at 16:40 +0900, Kazunori Asayama wrote:
> Jeremy Kerr wrote:
> > 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 spelibdir 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>
> 
> I agree with your purpose of this change, however, 
> I think we should use another name than 'spelibdir' 
> for this meaning becuase this name suggests the location 
> where SPE's libraries should be placed; i.e. /usr/spu/lib.
> (... and an existing similar name 'speinclude' has such 
> a meaning.)
> 
> > 
> > ---
> > 
> >  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 _spelibdir /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} spelibdir=%{_spelibdir}
> >  %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} spelibdir=%{_spelibdir}
> >  %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} spelibdir=%{_spelibdir}
> >  %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} spelibdir=%{_spelibdir}
> >  %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
> > +spelibdir	 = ${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 := $(spelibdir)/emulated-loader.bin
> >  
> >  libspebase_A	:= libspebase.a
> >  libspebase_SO	:= libspebase.so.${MAJOR_VERSION}.${MINOR_VERSION}
> 
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev




More information about the cbe-oss-dev mailing list