From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7171 invoked by alias); 24 Oct 2006 21:52:27 -0000 Received: (qmail 7162 invoked by uid 22791); 24 Oct 2006 21:52:26 -0000 X-Spam-Check-By: sourceware.org Received: from mail.zeugmasystems.com (HELO zeugmasystems.com) (192.139.122.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Oct 2006 21:52:18 +0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: [PATCH] RE: GDB 6.5: LDFLAGS not passing through to subdirectory configure's. Content-Transfer-Encoding: quoted-printable Date: Tue, 24 Oct 2006 21:52:00 -0000 Message-ID: <66910A579C9312469A7DF9ADB54A8B7D417F6D@exchange.ZeugmaSystems.local> From: "Kaz Kylheku" To: Cc: "Marc Kleine-Budde" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00234.txt.bz2 Marc Kleine-Budde sympathized:=20 > Kaz Kylheku wrote: > > The reasons is that in gdb-6.5/Makefile.in, you have this: > > LDFLAGS =3D > > instead of > > LDFLAGS =3D @LDFLAGS@ >=20 > I've noticed that too and filled out a bugreport. It's PR2175. >=20 > 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.=20 Index: tools-src/gdb-6.5/Makefile.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 =3D @WINDRES@ =20 CFLAGS =3D @CFLAGS@ -LDFLAGS =3D=20 +LDFLAGS =3D @LDFLAGS@ LIBCFLAGS =3D $(CFLAGS) CXXFLAGS =3D @CXXFLAGS@ LIBCXXFLAGS =3D $(CXXFLAGS) -fno-implicit-templates Index: tools-src/gdb-6.5/gdb/Makefile.in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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 @@ =20 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. INTERNAL_CFLAGS_BASE =3D \ - $(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 =3D @LDFLAGS@ +CPPFLAGS =3D @CPPFLAGS@ + =20 # 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=3D$(AR_FLAGS)" \ "CC=3D$(CC)" \ "CFLAGS=3D$(CFLAGS)" \ + "CPPFLAGS=3D$(CPPFLAGS)" \ "CXX=3D$(CXX)" \ "CXXFLAGS=3D$(CXXFLAGS)" \ "DLLTOOL=3D$(DLLTOOL)" \ @@ -495,6 +498,7 @@ 'CC=3D$$(CC_FOR_TARGET)' \ "CC_FOR_TARGET=3D$(CC_FOR_TARGET)" \ "CFLAGS=3D$(CFLAGS)" \ + "CPPFLAGS=3D$(CPPFLAGS)" \ 'CXX=3D$$(CXX_FOR_TARGET)' \ "CXX_FOR_TARGET=3D$(CXX_FOR_TARGET)" \ "CXXFLAGS=3D$(CXXFLAGS)" \