Control: tag -1 +pending Thanks for the patch, sorry for the delay: uploading soon.
A. On 2012-11-06 15:51:34, Stefano Rivera wrote: > Package: pepper > Version: 0.3.2-2 > Severity: normal > Tags: patch upstream > User: debian-...@lists.debian.org > Usertags: ld-as-needed > > pepper fails to build, in Ubuntu, where the ld --as-needed option is > used by default. > > The attached patch would fix this issue. I've forwarded it upstream. > https://sourceforge.net/tracker/?func=detail&aid=3584851&group_id=386093&atid=1604686 > > See also > http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries > > Thanks for considering the patch. > > SR > Description: Build with the ld --as-needed option > Libraries should appear after all objects on the gcc command line, which > generally means using LDADD macros instead of LDFLAGS for libraries > Author: Stefano Rivera <stefa...@ubuntu.com> > Bug-Upstream: > https://sourceforge.net/tracker/?func=detail&aid=3584851&group_id=386093&atid=1604686 > Last-Updated: 2012-11-06 > > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -45,7 +45,10 @@ > pepper_SOURCES = \ > main.cpp > pepper_LDADD = \ > - libpepper.a > + libpepper.a \ > + $(PTHREAD_LIBS) \ > + $(LUA_LIB) \ > + $(FRAMEWORKS) > > AM_CXXFLAGS = \ > -Wall -W -pipe \ > @@ -55,10 +58,7 @@ > AM_CPPFLAGS = \ > $(LUA_INCLUDE) \ > -DDATADIR=\"$(pkgdatadir)\" > -AM_LDFLAGS = \ > - $(PTHREAD_LIBS) \ > - $(LUA_LIB) \ > - $(FRAMEWORKS) > +AM_LDFLAGS = > > # Debugging? > if DEBUG > @@ -84,7 +84,7 @@ > -DUSE_MERCURIAL > AM_CXXFLAGS += \ > $(PYTHON_CPPFLAGS) > -AM_LDFLAGS += \ > +pepper_LDADD += \ > $(PYTHON_LDFLAGS) > endif > > @@ -100,7 +100,8 @@ > $(APR_CFLAGS) \ > $(SVN_CFLAGS) > AM_LDFLAGS += \ > - $(SVN_LDFLAGS) \ > + $(SVN_LDFLAGS) > +pepper_LDADD += \ > $(SVN_LIBS) \ > $(APR_LIBS) > endif > --- a/m4/configure_backends.m4 > +++ b/m4/configure_backends.m4 > @@ -70,8 +70,9 @@ > AC_CHECK_LIB([svn_diff-1], > [svn_diff_file_diff_2], ,[AC_MSG_ERROR([Neccessary Subversion libraries are > missing])]) > AC_CHECK_LIB([svn_delta-1], > [svn_txdelta_apply], ,[AC_MSG_ERROR([Neccessary Subversion libraries are > missing])]) > AC_CHECK_LIB([svn_repos-1], [svn_repos_create], > ,[AC_MSG_ERROR([Neccessary Subversion libraries are missing])]) > + SVN_LDFLAGS=$LDFLAGS > LDFLAGS=$OLD_LDFLAGS > - SVN_LDFLAGS=$LIBS > + SVN_LIBS=$LIBS > LIBS=$OLD_LIBS > AC_SUBST(SVN_CFLAGS) > AC_SUBST(SVN_LDFLAGS) > --- a/src/Makefile.in > +++ b/src/Makefile.in > @@ -104,7 +104,9 @@ > @SVN_BACKEND_TRUE@ $(SVN_CFLAGS) > > @SVN_BACKEND_TRUE@am__append_12 = \ > -@SVN_BACKEND_TRUE@ $(SVN_LDFLAGS) \ > +@SVN_BACKEND_TRUE@ $(SVN_LDFLAGS) > + > +@SVN_BACKEND_TRUE@am__append_12b = \ > @SVN_BACKEND_TRUE@ $(SVN_LIBS) \ > @SVN_BACKEND_TRUE@ $(APR_LIBS) > > @@ -359,7 +361,12 @@ > main.cpp > > pepper_LDADD = \ > - libpepper.a > + libpepper.a \ > + $(PTHREAD_LIBS) \ > + $(LUA_LIB) \ > + $(FRAMEWORKS) \ > + $(am__append_8) \ > + $(am__append_12b) > > AM_CXXFLAGS = -Wall -W -pipe $(PTHREAD_CFLAGS) $(am__append_1) \ > $(am__append_7) $(am__append_11) $(am__append_16) > @@ -369,8 +376,8 @@ > AM_CPPFLAGS = $(LUA_INCLUDE) -DDATADIR=\"$(pkgdatadir)\" \ > $(am__append_4) $(am__append_6) $(am__append_10) \ > $(am__append_14) $(am__append_18) > -AM_LDFLAGS = $(PTHREAD_LIBS) $(LUA_LIB) $(FRAMEWORKS) $(am__append_2) \ > - $(am__append_8) $(am__append_12) > +AM_LDFLAGS = $(am__append_2) \ > + $(am__append_12) > > # Last but not least, the CFLAGS > AM_CFLAGS = $(AM_CXXFLAGS) > --- a/configure > +++ b/configure > @@ -8439,8 +8439,9 @@ > as_fn_error $? "Neccessary Subversion libraries are missing" "$LINENO" 5 > fi > > + SVN_LDFLAGS=$LDFLAGS > LDFLAGS=$OLD_LDFLAGS > - SVN_LDFLAGS=$LIBS > + SVN_LIBS=$LIBS > LIBS=$OLD_LIBS > > -- Man really attains the state of complete humanity when he produces, without being forced by physical need to sell himself as a commodity. - Ernesto "Che" Guevara
pgpCmKXpnuSuT.pgp
Description: PGP signature