[Top][All Lists]

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

[Bug-gsl] library dependencies and --as-needed

From: Brian Gough
Subject: [Bug-gsl] library dependencies and --as-needed
Date: Thu, 29 Jan 2009 15:26:19 +0000
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)


I'd like to ask for advice on library dependencies and the --as-needed
linker flag in the GSL project (GNU Scientific Library).

Our main lib file needs to call an external library (BLAS) for vector
operations.  We want people to be able to choose different BLAS
libraries when they link their applications, e.g.

   $ gcc main.c -lgsl -lcblas -lm  # "cblas" can be ATLAS, Intel, AMD, etc

Thefore we don't specify any dependency on the external BLAS with
libtool, since its location would get hard-coded in the GSL shared

This works fine except when the user links their application
--as-needed, which misses the BLAS functions as they are only used in
libgsl.so and (typically) not in the user's object file.

Is there a recommended way to handle this situation?  

It seems like it would work if the search with --as-needed was
recursive, is there any conceptual reason for it not to do that?


Brian Gough
(GSL Maintainer)

reply via email to

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