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

Re: question about CFLAGS modifiers to ./configure

On Thu, Mar 30, 2006 at 06:23:38PM +0200, Miriam Ruiz wrote:
> Hi,
> DebHelper uses by default (in the pre-made templates) "-Wl,-z,defs" in CFLAGS
> when running ./configure
> CFLAGS="-Wall -g -O2 -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) ...
> I'm packaging a program (with some libraries in it) that won't compile with
> them unless you explicitly modify Makefile.am files and add the libraries
> (already included in the package but not installed in time of compilation),
> which is not done by default. without those options it compiles and install
> cleanly without problem with upstream's building system.
Are you talking about the combination of CFLAGS foo above, and
libraries build and used by the package?  man ld explains -z defs:
       Disallows undefined symbols in object files.  Undefined symbols
       in shared libraries are still allowed.

Note that some ./configure scripts recommend to be called with CFLAGS
transposed, as in:

  ./configure --host=$(...) CFLAGS="$(CFLAGS)"

Note also that -O2 should be used only if DEB_BUILD_OPTIONS!~noopt.

What is the command, and error, when you try to use the libs, and
those options?

> Is it important to keep them? Could someone possibly explain to me
> what they mean?

You will probably have to use the examples from dh_shlibdeps to get
proper dependencies on the shared libraries in that package, used by
any binaries it creates.


Reply to: