[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

creating specialized linking rules?

From: John Wohlbier
Subject: creating specialized linking rules?
Date: Wed, 5 Aug 2009 20:04:15 -0600

I'm using libtool in a project where I'm compiling code for the cell processor. The cell requires different compilers to be used on sources compiled for the PowerPC core (PPU) and the "synergistic processing unit" (SPU). I'm building (trying to build) a libtool library for the ppu which embeds the spu executable into the library.

Something that works for embedding "by hand" is to have a rule such as:

lib%.o: /pathto/spu/lib/%
    cp /pathto/spu/lib/$* .
    ${PEMB} ${PEMBFLAGS} $* $* $*-emb.o
    ${PAR} -qcs $@ $*-emb.o
    rm $*

where % refers to a "spucode" compiled executable with a main, and have the library link in libspucode.o.
What this translates to on the compile line (evaluating the variables) is

ppu-embedspu -m64 spucode spucode spucode-emb.o
ppu-ar -qcs libspucode.o spucode-emb.o

However, this doesn't work when making libtool libraries. I'd like to do something like

mylibtoollib_la_LIBADD += libspucode.o

but libtool (understandably) complains that libspucode.o is not a libtool object. What I'm wondering about is how to write the embedding and archiving rule using libtool, perhaps to make libspucode.lo.

Thanks much.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]