tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mknative-gdb: curses detection failure ... TUI disabled



On Wed, Dec 22, 2010 at 02:15:08AM +0100, Joerg Sonnenberger wrote:
> On Wed, Dec 22, 2010 at 01:00:05AM +0100, Nicolas Joly wrote:
> > On Tue, Dec 21, 2010 at 09:00:56PM +0100, Joerg Sonnenberger wrote:
> > > On Tue, Dec 21, 2010 at 08:50:11PM +0100, Nicolas Joly wrote:
> > > > On Tue, Dec 21, 2010 at 08:10:03PM +0100, Joerg Sonnenberger wrote:
> > > > > Isn't the problem exactly what it is saying, missing
> > > > > -Wl,-rpath-link,${DESTDIR}/usr/lib
> > > > 
> > > > Yes. But adding it to CCADDFLAGS show some bad side effects during
> > > > libiberty configuration preventing all headers detection :
> > > 
> > > Change the Makefile to pass it and -L down via LDFLAGS.
> > 
> > This doesn't work :(
> > 
> > When configuring gdb subdir, it uses HOST_EXPORTS which use forced
> > empty LDFLAGS !
> 
> Patch it?

Ok. Got pretty good results with the following patch on both amd64 and
i386. Time to check other archs now ...

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.
Index: tools/gdb/Makefile
===================================================================
RCS file: /cvsroot/src/tools/gdb/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- tools/gdb/Makefile  8 May 2010 23:18:44 -0000       1.17
+++ tools/gdb/Makefile  22 Dec 2010 11:14:02 -0000
@@ -16,7 +16,8 @@ INSTALL_TARGET=       install-gdb
 
 .include "${.CURDIR}/../Makefile.gnuhost"
 
-CCADDFLAGS=     ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib 
-L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
+CCADDFLAGS=     ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -B${DESTDIR}/usr/lib/
+LDADDFLAGS=    -L${DESTDIR}/lib -L${DESTDIR}/usr/lib 
-Wl,-rpath-link,${DESTDIR}/usr/lib
 
 NEWCONFIGDIR?= ${.CURDIR}/../..
 MKNATIVE?=     ${.CURDIR}/mknative-gdb
@@ -65,7 +66,7 @@ native-gdb: .native/.configure_done
                        CC=${CC:Q}' '${CCADDFLAGS:Q} \
                        CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
                        CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \
-                       CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
+                       CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS=${LDADDFLAGS:Q} \
                        MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
                        XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
                        LIBS=-lintl \
Index: gnu/dist/gdb6/Makefile.in
===================================================================
RCS file: /cvsroot/src/gnu/dist/gdb6/Makefile.in,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 Makefile.in
--- gnu/dist/gdb6/Makefile.in   2 Jul 2006 20:11:53 -0000       1.1.1.2
+++ gnu/dist/gdb6/Makefile.in   22 Dec 2010 11:14:07 -0000
@@ -286,7 +286,7 @@ STRIP = @STRIP@
 WINDRES = @WINDRES@
 
 CFLAGS = @CFLAGS@
-LDFLAGS = 
+LDFLAGS = @LDFLAGS@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates


Home | Main Index | Thread Index | Old Index