After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 87888 - ./configure-time $LDFLAGS ignored
./configure-time $LDFLAGS ignored
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.0.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-07-11 03:54 UTC by Noah Levitt
Modified: 2011-02-04 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Noah Levitt 2002-07-11 03:54:37 UTC
Other packages pass the contents of the environment variable $LDFLAGS
to the linker, but gtk+ doesn't. Automake normally takes care of it, but
gtk+ sets LDFLAGS in several of the Makefile.am's, overriding automake's
default behavior. The result is that it is impossible to pass flags to the
linker, as far as I have been able to figure out. 

One solution is to add @LDFLAGS@ to the flags set in the Makefile.am's.
(Another is to use AM_LDFLAGS, but that requires automake >= 1.5.)
Comment 1 Owen Taylor 2002-07-30 23:06:02 UTC
Can you create a patch and test it, using the approach in:

http://mail.gnome.org/archives/gtk-devel-list/2002-July/msg00052.html

? I rather have a tested patch instead of just hoping that
I found everywhere that the addition was needed.
Comment 2 Noah Levitt 2002-08-03 23:53:47 UTC
Ok. I made these changes and it worked for me.


Index: gdk/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/Makefile.am,v
retrieving revision 1.89
diff -u -r1.89 Makefile.am
--- gdk/Makefile.am     1 Aug 2002 15:28:28 -0000       1.89
+++ gdk/Makefile.am     3 Aug 2002 23:45:16 -0000
@@ -68,7 +68,7 @@
 # libtool stuff: set version and export symbols for resolving
 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
 # we use the general approach here
-LDFLAGS = @STRIP_BEGIN@                                                \
+LDFLAGS = @LDFLAGS@ @STRIP_BEGIN@                                      \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)            \
        -export-dynamic                                                 \
        -rpath $(libdir)                                                \
Index: gdk/linux-fb/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/linux-fb/Makefile.am,v
retrieving revision 1.19
diff -u -r1.19 Makefile.am
--- gdk/linux-fb/Makefile.am    25 Jun 2001 23:01:36 -0000      1.19
+++ gdk/linux-fb/Makefile.am    3 Aug 2002 23:45:16 -0000
@@ -19,7 +19,7 @@
        @GTK_DEBUG_FLAGS@       \
 @STRIP_END@
 
-LDFLAGS = @STRIP_BEGIN@ \
+LDFLAGS = @LDFLAGS@ @STRIP_BEGIN@ \
        @GDK_DEP_LIBS@  \
        -lm             \
 @STRIP_END@
Index: gtk/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/Makefile.am,v
retrieving revision 1.214
diff -u -r1.214 Makefile.am
--- gtk/Makefile.am     14 May 2002 22:04:45 -0000      1.214
+++ gtk/Makefile.am     3 Aug 2002 23:45:16 -0000
@@ -64,7 +64,7 @@
 # since automake doesn't support conditionalized libsomething_la_LDFLAGS
 # we use the general approach here
 libgtkincludedir = $(includedir)/gtk-2.0/gtk
-LDFLAGS = @STRIP_BEGIN@ \
+LDFLAGS = @LDFLAGS@ @STRIP_BEGIN@ \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)         
          \
        -export-dynamic                                              
          \
        -rpath $(libdir)                                             
          \
Comment 3 Owen Taylor 2002-10-09 20:27:22 UTC
Was fixed a while ago, but apparently forgot to close the bug.

Mon Aug  5 17:01:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
        include @LDFLAGS@, otherwise LDFLAGS the users passes
        to configure don't get used. (#89946, Noah Levitt,
        Albert Chin)