[Flac-dev] patches for flac build

Matt Zimmerman mdz at debian.org
Wed Jul 18 16:47:33 PDT 2001


On Wed, Jul 18, 2001 at 03:08:30PM -0700, Josh Coalson wrote:

> One thing I did noticed is that the CFLAGS are not specifying -fPIC right
> now.  Matt, are you planning to build a C-only version of the shared library?
> In this case it would make sense to add -fPIC to the options.

Right now, -fPIC is automatically used when compiling objects that will go into
the shared library (via libtool).  When --enable-shared is used, each source
file is compiled twice, one with -fPIC and one without.  This way, the objects
in the static library (and the various non-library objects) are not burdened
with the added complexity of -fPIC.

It also sets -DPIC, for the benefit of preprocessed and handwritten assembler
modules.  Unfortunately, I don't think NASM can handle everything in CFLAGS,
nor is it suitable for assembling the output of the C compiler, so if you
decide to make the assemble stuff work both PIC and non-PIC, we'll have to work
something out there.

Speaking of CFLAGS, it looks like configure.in clobbers any existing CFLAGS in
the environment.  This can be a pain when trying to compile with a modified
CFLAGS, as the usual idiom is:

CFLAGS=... ./configure ...

thus propagating CFLAGS to all generated makefiles.  The right thing to do is
probably to prepend to CFLAGS instead of replacing it, so the user's settings
will come later on the command line and override the defaults.

-- 
 - mdz





More information about the Flac-dev mailing list