[vsipl++] PATCH: Allow multiple configurations of the same library to be installed on top of each other.

Mark Mitchell mark at codesourcery.com
Fri Dec 16 22:34:40 UTC 2005


Jules Bergmann wrote:

> When developing, they would set PKG to "vsipl++-debug", which would
> result in CXXFLAGS that include debugging and warnings, don't include
> optimization, etc (i.e. "-g -W -Wall").  When building a release version
> of an application, people would set PKG to "vsipl++" or perhaps
> "vsipl++-release", which would ratchet up the optimization flags (i.e.
> something ugly like "-g -O2 -funswitch-loops -fgcse-after-reload --param
> max-inline-insns-single=2000 --param large-function-insns=6000 --param
> large-function-growth=800 --param inline-unit-growth=300").  Also, on a
> machine that could be used in 32-bit or 64-bit mode, we could imagine
> having PKGs for "vsipl++-release-64" etc.

Would a bit of a manual post-processing of Stefan's approach work for you?

To expand on Stefan's example a bit:

# Build and install the default, optimized library.
mkdir opt
cd opt
$srcdir/vpp/configure --prefix=/usr/local
make install
# Build and install the debuggable library.
mkdir debug
cd debug
$srcdir/vpp/configure --prefix=/usr/local CXXFLAGS="-g"
make install libdir=/usr/local/lib/vsip-debug

# Create a vsipl++-debug config file.
ln -s /usr/local/lib/vsip-debug/vsip++.pc /usr/local/lib/vsip++-debug.pc

Then, the user will be able to use the pkgconfig command you envision,
but the build infrastruture won't have to change.

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
(916) 791-8304



More information about the vsipl++ mailing list