Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Kaz Kylheku" <kaz@zeugmasystems.com>
To: <gdb@sourceware.org>
Cc: "Marc Kleine-Budde" <mkl@pengutronix.de>
Subject: [PATCH] RE: GDB 6.5: LDFLAGS not passing through to subdirectory configure's.
Date: Tue, 24 Oct 2006 21:52:00 -0000	[thread overview]
Message-ID: <66910A579C9312469A7DF9ADB54A8B7D417F6D@exchange.ZeugmaSystems.local> (raw)

Marc Kleine-Budde sympathized: 
> Kaz Kylheku wrote:
> > The reasons is that in gdb-6.5/Makefile.in, you have this:
> >   LDFLAGS =
> > instead of
> >   LDFLAGS = @LDFLAGS@
> 
> I've noticed that too and filled out a bugreport. It's PR2175.
> 
> Marc

The real fix is slightly deeper. The gdb-6.5/gdb/Makefile.in makes use
of LDFLAGS, but, alas, does not use CPPFLAGS at all.

With the following patch, my gdb now builds against an ncurses whose
includes and libs are in a nonstandard location, by setting LDFLAGS and
CPPFLAGS. The reason the libs are in a nonstandard location is that I'm
building a distro, and using a different install directory for each
package to keep them neatly separated. 

Index: tools-src/gdb-6.5/Makefile.in
===================================================================
--- tools-src.orig/gdb-6.5/Makefile.in	2006-10-24 16:17:58.000000000
-0700
+++ tools-src/gdb-6.5/Makefile.in	2006-10-24 16:18:55.037046088
-0700
@@ -286,7 +286,7 @@
 WINDRES = @WINDRES@
 
 CFLAGS = @CFLAGS@
-LDFLAGS = 
+LDFLAGS = @LDFLAGS@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
Index: tools-src/gdb-6.5/gdb/Makefile.in
===================================================================
--- tools-src.orig/gdb-6.5/gdb/Makefile.in	2006-10-24
16:17:58.751602776 -0700
+++ tools-src/gdb-6.5/gdb/Makefile.in	2006-10-24 16:46:29.819480920
-0700
@@ -347,7 +347,7 @@
 
 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
 INTERNAL_CFLAGS_BASE = \
-	$(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
+	$(CPPFLAGS) $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) \
 	$(GDB_CFLAGS) $(OPCODES_CFLAGS) $(READLINE_CFLAGS) \
 	$(BFD_CFLAGS) $(INCLUDE_CFLAGS) \
 	$(INTL_CFLAGS) $(ENABLE_CFLAGS)
@@ -357,6 +357,8 @@
 # LDFLAGS is specifically reserved for setting from the command line
 # when running make.
 LDFLAGS = @LDFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
 
 # Profiling options need to go here to work.
 # I think it's perfectly reasonable for a user to set -pg in CFLAGS
@@ -436,6 +438,7 @@
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CC=$(CC)" \
 	"CFLAGS=$(CFLAGS)" \
+	"CPPFLAGS=$(CPPFLAGS)" \
 	"CXX=$(CXX)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"DLLTOOL=$(DLLTOOL)" \
@@ -495,6 +498,7 @@
 	'CC=$$(CC_FOR_TARGET)' \
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
 	"CFLAGS=$(CFLAGS)" \
+	"CPPFLAGS=$(CPPFLAGS)" \
 	'CXX=$$(CXX_FOR_TARGET)' \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
 	"CXXFLAGS=$(CXXFLAGS)" \


             reply	other threads:[~2006-10-24 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-24 21:52 Kaz Kylheku [this message]
2006-10-24 21:56 ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66910A579C9312469A7DF9ADB54A8B7D417F6D@exchange.ZeugmaSystems.local \
    --to=kaz@zeugmasystems.com \
    --cc=gdb@sourceware.org \
    --cc=mkl@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox