aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/readline-link-ncurses.patch
blob: 0fd0598f4650f171b59d10d4cec370e5ecee2a95 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
This patch is to make sure that `libncurses' is among the `NEEDED'
dependencies of `libreadline.so' and `libhistory.so'.

Failing to do that, applications linking against Readline are
forced to explicitly link against libncurses as well; in addition,
this trick doesn't work when using GNU ld's `--as-needed'.

--- shlib/Makefile.in	2009-01-06 18:03:22.000000000 +0100
+++ shlib/Makefile.in	2009-07-27 14:43:25.000000000 +0200
@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
 SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
 SHOBJ_LIBS = @SHOBJ_LIBS@
 
-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
+SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses
 SHLIB_LIBS = @SHLIB_LIBS@
 
 SHLIB_DOT = @SHLIB_DOT@
a: libgcc2.c libgcc2.ready $(CON $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${oname}$(objext); \ + mv $${oname}$(objext) libgcc2-o;\ rm -f $${name}.s $${oname}$(objext); \ fi; \ done @@ -1156,7 +1162,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) -rm -rf tmplibgcc.a libgcc.a tmpcopy mkdir tmpcopy -if [ x$(LIBGCC1) != x ]; \ - then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1)); \ + then cp -v libgcc1-o/*.o tmpcopy; \ else true; \ fi # Some versions of ar (specifically the one in RISC/os 5.x), create an @@ -1164,7 +1170,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) # the second ar command tries to overwrite this file. To avoid the error # message from ar, we make sure all files are writable. -(cd tmpcopy; chmod +w * > /dev/null 2>&1) - (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2)) + cp -v libgcc2-o/*.o tmpcopy (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext)) rm -rf tmpcopy -if $(RANLIB_TEST_FOR_TARGET) ; then \ @@ -2093,14 +2099,18 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) # s-* so that mostlyclean does not force the include directory to # be rebuilt. +# STMP_FIXINC = @STMP_FIXINC@ +STMP_FIXINC = stmp-fixinc + # Build the include directory including float.h (which no longer depends upon # enquire). -stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h +stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h # Copy in the headers provided with gcc. # The sed command gets just the last file name component; # this is necessary because VPATH could add a dirname. # Using basename would be simpler, but some systems don't have it. # The touch command is here to workaround an AIX/Linux NFS bug. + -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi for file in .. $(USER_H); do \ if [ X$$file != X.. ]; then \ realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ @@ -2265,16 +2275,17 @@ stmp-fixproto: fixhdr.ready fixproto stm # # Remake the info files. -doc: info -info: cpp.info gcc.info lang.info - -cpp.info: $(srcdir)/cpp.texi - $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi - -gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ - $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ - $(srcdir)/tm.texi $(srcdir)/gcov.texi - $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi +doc: +# doc: info +# info: cpp.info gcc.info lang.info + +# cpp.info: $(srcdir)/cpp.texi +# $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi + +# gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ +# $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ +# $(srcdir)/tm.texi $(srcdir)/gcov.texi +# $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi dvi: gcc.dvi cpp.dvi lang.dvi