[gstreamer-bugs] [Bug 522142] Bad flag passing during build

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Mar 12 18:31:14 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=522142

  GStreamer | gstreamer (core) | Ver: 0.10.17

dmacks at netspace.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bad -I ordering during build|Bad flag passing during
                   |                            |build




------- Comment #3 from dmacks at netspace.org  2008-03-13 01:31 UTC -------
On closer inspection, there are other widespread problems in the Makefiles.
tests/examples/controller/Makefile.am is a good example of what's wrong in
virtually all of them:

audio_example_CFLAGS  = -I$(top_builddir)/libs $(GST_OBJ_CFLAGS)
audio_example_LDADD = $(GST_OBJ_LIBS)
audio_example_LDFLAGS =
$(top_builddir)/libs/gst/controller/libgstcontroller- at GST_MAJORMINOR@.la

1. -I flags are for the compiler (.c -> .o), not the linker, so they belong in
_CPPFLAGS not _CFLAGS (documented in the automake manual). This is important so
that the flags are passed in the correct precedence (user environment vs
implicit automake values vs configure script variables). Also, passing lots of
useless -I flags to the linker makes linker commands more verbose and therefore
harder to debug.

2. Dependent library .la go in _LDADD (or _LIBADD if compiling a library), not
_LDFLAGS (documented in the libtool manual). One benefit is that _LDADD and
_LIBADD, but not _LDFLAGS, generate automatic _DEPENDENCIES entries (cf. the
explicit _DEPENDENCIES scattered in various other Makefile.am).


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=522142.




More information about the Gstreamer-bugs mailing list