RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/build/ Makefile.am rpm/ configure.ac rpm/l...

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Sun 29 Jul 2007 - 16:02:34 CEST
Message-Id: <20070729140234.87FA43484E9@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   29-Jul-2007 16:02:34
  Branch: HEAD                             Handle: 2007072915023202

  Modified files:
    rpm                     CHANGES configure.ac
    rpm/build               Makefile.am
    rpm/lib                 Makefile.am
    rpm/rpmdb               Makefile.am
    rpm/rpmio               Makefile.am

  Log:
    Support the building of RPM with GNU binutils ld(1)'s "--as-needed" flag
    by providing an Autoconf option --enable-build-maxextlibdep which is
    to all(!) librpmxxx what --enable-build-extlibdep is to librpmmisc: it
    links against all external libraries via $LDFLAGS $LIBS (and because of
    --as-needed only against those which are actually used).
    
    This can be used like this:
    
    $ LDFLAGS="-Wl,--as-needed" \
      ./configure \
          --enable-build-maxextlibdep \
          --enable-shared \
          --disable-static \
          [...]
    
    Notice that the -Wl,--as-needed requires GCC (-Wl,xxx), GNU binutils
    (--as-needed) and an OS which supports shared libraries in ELF format
    (e.g. Linux or FreeBSD). Hence all this is just interesting to some
    folks who know what they are doing.

  Summary:
    Revision    Changes     Path
    1.1528      +1  -0      rpm/CHANGES
    2.69        +4  -0      rpm/build/Makefile.am
    2.228       +12 -0      rpm/configure.ac
    2.164       +4  -0      rpm/lib/Makefile.am
    1.77        +4  -0      rpm/rpmdb/Makefile.am
    1.102       +4  -0      rpm/rpmio/Makefile.am
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1527 -r1.1528 CHANGES
  --- rpm/CHANGES	29 Jul 2007 02:57:54 -0000	1.1527
  +++ rpm/CHANGES	29 Jul 2007 14:02:32 -0000	1.1528
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - rse: provide support for GNU binutils ld(1)'s --as-needed via Autoconf option --enable-build-maxextlibdep
       - jbj: rip CentOS3/x86_64 gcc-3.2.3-49.x86_64 hack-a-round. Fix gcc!
       - jbj: upgrade to db-4.6.18.
       - rse: drop MARK64 hack as it isn't RPM's business to decide for lib64 -- for this there is Autoconf option --libdir
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.68 -r2.69 Makefile.am
  --- rpm/build/Makefile.am	26 Jul 2007 08:10:31 -0000	2.68
  +++ rpm/build/Makefile.am	29 Jul 2007 14:02:33 -0000	2.69
  @@ -42,6 +42,10 @@
   	$(top_builddir)/rpmio/librpmio.la \
   	$(top_builddir)/misc/librpmmisc.la
   endif
  +if ENABLE_BUILD_MAXEXTLIBDEP
  +librpmbuild_la_LDFLAGS += $(LDFLAGS)
  +librpmbuild_la_LIBADD  += $(LIBS)
  +endif
   librpmbuild.la: $(librpmbuild_la_OBJECTS) $(librpmbuild_la_DEPENDENCIES) 
   	$(librpmbuild_la_LINK) -rpath $(usrlibdir) $(librpmbuild_la_OBJECTS) $(librpmbuild_la_LIBADD)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.227 -r2.228 configure.ac
  --- rpm/configure.ac	29 Jul 2007 02:54:28 -0000	2.227
  +++ rpm/configure.ac	29 Jul 2007 14:02:32 -0000	2.228
  @@ -236,6 +236,18 @@
       [ENABLE_BUILD_EXTLIBDEP],
       [test ".$do_build_extlibdep" = .yes])
   
  +dnl # support implicit maximum external library dependencies
  +AC_ARG_ENABLE(
  +    [build-maxextlibdep],
  +    AC_HELP_STRING(
  +        [--disable-build-maxextlibdep],
  +        [disable use of implicit maximum external library dependencies]),
  +    [ do_build_maxextlibdep=$enableval ],
  +    [ do_build_maxextlibdep=yes ])
  +AM_CONDITIONAL(
  +    [ENABLE_BUILD_MAXEXTLIBDEP],
  +    [test ".$do_build_maxextlibdep" = .yes])
  +
   dnl # support removal of GNU libtool *.la files
   AC_ARG_ENABLE(
       [build-lafiles],
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/Makefile.am
  ============================================================================
  $ cvs diff -u -r2.163 -r2.164 Makefile.am
  --- rpm/lib/Makefile.am	26 Jul 2007 08:10:31 -0000	2.163
  +++ rpm/lib/Makefile.am	29 Jul 2007 14:02:33 -0000	2.164
  @@ -51,6 +51,10 @@
   	$(top_builddir)/rpmio/librpmio.la \
   	$(top_builddir)/misc/librpmmisc.la
   endif
  +if ENABLE_BUILD_MAXEXTLIBDEP
  +librpm_la_LDFLAGS += $(LDFLAGS)
  +librpm_la_LIBADD  += $(LIBS)
  +endif
   librpm.la: $(librpm_la_OBJECTS) $(librpm_la_DEPENDENCIES) 
   	$(librpm_la_LINK) -rpath $(usrlibdir) $(librpm_la_OBJECTS) $(librpm_la_LIBADD)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.76 -r1.77 Makefile.am
  --- rpm/rpmdb/Makefile.am	26 Jul 2007 08:10:32 -0000	1.76
  +++ rpm/rpmdb/Makefile.am	29 Jul 2007 14:02:34 -0000	1.77
  @@ -53,6 +53,10 @@
   	$(top_builddir)/rpmio/librpmio.la \
   	$(top_builddir)/misc/librpmmisc.la
   endif
  +if ENABLE_BUILD_MAXEXTLIBDEP
  +librpmdb_la_LDFLAGS += $(LDFLAGS)
  +librpmdb_la_LIBADD  += $(LIBS)
  +endif
   librpmdb_la_DEPENDENCIES = $(DBLIBOBJS)
   librpmdb.la: $(librpmdb_la_OBJECTS) $(librpmdb_la_DEPENDENCIES) 
   	$(librpmdb_la_LINK) -rpath $(usrlibdir) $(librpmdb_la_OBJECTS) $(librpmdb_la_LIBADD)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.101 -r1.102 Makefile.am
  --- rpm/rpmio/Makefile.am	26 Jul 2007 08:10:32 -0000	1.101
  +++ rpm/rpmio/Makefile.am	29 Jul 2007 14:02:34 -0000	1.102
  @@ -60,6 +60,10 @@
   librpmio_la_LIBADD += \
   	$(top_builddir)/misc/librpmmisc.la
   endif
  +if ENABLE_BUILD_MAXEXTLIBDEP
  +librpmio_la_LDFLAGS += $(LDFLAGS)
  +librpmio_la_LIBADD  += $(LIBS)
  +endif
   librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES) 
   	$(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD)
   
  @@ .
Received on Sun Jul 29 16:02:34 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.