You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2017/07/21 17:05:13 UTC

svn commit: r1802612 - in /subversion/trunk: Makefile.in build.conf build/generator/gen_base.py configure.ac

Author: philip
Date: Fri Jul 21 17:05:13 2017
New Revision: 1802612

URL: http://svn.apache.org/viewvc?rev=1802612&view=rev
Log:
Disable static builds of the apache and auth provider modules as
these are only ever used via dlopen() and so only shared modules
are required.  As well as removing redundant compilation this
also solves the problem that KDE5, as used by the kwallet auth
provider, does not support compilation without -fPIC.

* build/generator/gen_base.py
  (TargetSharedOnlyLib, TargetSharedOnlyCxxLib): New target types to
   provide explicit compile/link commands for shared-only builds.

* build.conf
  (libsvn_auth_gnome_keyring): Change to shared-only-lib.
  (libsvn_auth_kwallet): Change to shared-only-cxx-lib.

* Makefile.in
  (COMPILE_APACHE_MOD, LINK_APACHE_MOD): Add -shared.
  (COMPILE_SHARED_ONLY_LIB, COMPILE_SHARED_ONLY_CXX_LIB,
   LINK_SHARED_ONLY_LIB, LINK_SHARED_ONLY_CXX_LIB,
   shared_only_LDFLAGS): New.
  (libsvn_auth_gnome_keyring_LDFLAGS, libsvn_auth_kwallet_LDFLAGS): Remove.

* configure.ac
  (shared_only_LDFLAGS): New.
  (libsvn_auth_gnome_keyring_LDFLAGS, libsvn_auth_kwallet_LDFLAGS): Remove.

Modified:
    subversion/trunk/Makefile.in
    subversion/trunk/build.conf
    subversion/trunk/build/generator/gen_base.py
    subversion/trunk/configure.ac

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1802612&r1=1802611&r2=1802612&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Fri Jul 21 17:05:13 2017
@@ -200,7 +200,9 @@ LT_COMPILE_CXX_NOWARN = $(LIBTOOL) $(LTC
 LT_EXECUTE = $(LIBTOOL) $(LTFLAGS) --mode=execute `for f in $(abs_builddir)/subversion/*/*.la; do echo -dlopen $$f; done`
 
 # special compilation for files destined for mod_dav_svn
-COMPILE_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CFLAGS) $(CMAINTAINERFLAGS) $(LT_CFLAGS) $(APACHE_INCLUDES) $(INCLUDES) -o $@ -c
+COMPILE_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CFLAGS) $(CMAINTAINERFLAGS) $(LT_CFLAGS) $(APACHE_INCLUDES) $(INCLUDES) -o $@ -c -shared
+COMPILE_SHARED_ONLY_LIB = $(LT_COMPILE) -o $@ -c -shared
+COMPILE_SHARED_ONLY_CXX_LIB = $(LT_COMPILE_CXX) -o $@ -c -shared
 
 # special compilation for files destined for libsvn_swig_* (e.g. swigutil_*.c)
 COMPILE_SWIG_PY = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PY_COMPILE) $(CPPFLAGS) $(LT_CFLAGS) -DSWIGPYTHON $(SWIG_PY_INCLUDES) $(INCLUDES) -o $@ -c
@@ -262,11 +264,9 @@ LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mo
 LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
 
 # special link rule for mod_dav_svn
-LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS)
+LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS) -shared
 
 # Special LDFLAGS for some libraries
-libsvn_auth_gnome_keyring_LDFLAGS = @libsvn_auth_gnome_keyring_LDFLAGS@
-libsvn_auth_kwallet_LDFLAGS = @libsvn_auth_kwallet_LDFLAGS@
 libsvn_client_LDFLAGS = @libsvn_client_LDFLAGS@
 libsvn_delta_LDFLAGS = @libsvn_delta_LDFLAGS@
 libsvn_diff_LDFLAGS = @libsvn_diff_LDFLAGS@
@@ -281,6 +281,10 @@ libsvn_ra_svn_LDFLAGS = @libsvn_ra_svn_L
 libsvn_repos_LDFLAGS = @libsvn_repos_LDFLAGS@
 libsvn_subr_LDFLAGS = @libsvn_subr_LDFLAGS@
 libsvn_wc_LDFLAGS = @libsvn_wc_LDFLAGS@
+shared_only_LDFLAGS = @shared_only_LDFLAGS@
+
+LINK_SHARED_ONLY_LIB = $(LINK_LIB) $(shared_only_LDFLAGS) -shared
+LINK_SHARED_ONLY_CXX_LIB = $(LINK_CXX_LIB) $(shared_only_LDFLAGS) -shared
 
 # Compilation of SWIG-generated C source code
 COMPILE_PY_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PY_COMPILE) $(LT_CFLAGS) $(CPPFLAGS) $(SWIG_PY_INCLUDES) -prefer-pic -c -o $@

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1802612&r1=1802611&r2=1802612&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Fri Jul 21 17:05:13 2017
@@ -224,7 +224,7 @@ manpages = subversion/svnmucc/svnmucc.1
 # Support for GNOME Keyring
 [libsvn_auth_gnome_keyring]
 description = Subversion GNOME Keyring Library
-type = lib
+type = shared-only-lib
 install = gnome-keyring-lib
 path = subversion/libsvn_auth_gnome_keyring
 libs = libsvn_subr apr gnome-keyring
@@ -232,7 +232,7 @@ libs = libsvn_subr apr gnome-keyring
 # Support for KWallet
 [libsvn_auth_kwallet]
 description = Subversion KWallet Library
-type = lib
+type = shared-only-cxx-lib
 install = kwallet-lib
 path = subversion/libsvn_auth_kwallet
 libs = libsvn_subr apr kwallet

Modified: subversion/trunk/build/generator/gen_base.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_base.py?rev=1802612&r1=1802611&r2=1802612&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_base.py (original)
+++ subversion/trunk/build/generator/gen_base.py Fri Jul 21 17:05:13 2017
@@ -719,6 +719,22 @@ class TargetApacheMod(TargetLib):
     self.compile_cmd = '$(COMPILE_APACHE_MOD)'
     self.link_cmd = '$(LINK_APACHE_MOD)'
 
+class TargetSharedOnlyLib(TargetLib):
+
+  def __init__(self, name, options, gen_obj):
+    TargetLib.__init__(self, name, options, gen_obj)
+
+    self.compile_cmd = '$(COMPILE_SHARED_ONLY_LIB)'
+    self.link_cmd = '$(LINK_SHARED_ONLY_LIB)'
+
+class TargetSharedOnlyCxxLib(TargetLib):
+
+  def __init__(self, name, options, gen_obj):
+    TargetLib.__init__(self, name, options, gen_obj)
+
+    self.compile_cmd = '$(COMPILE_SHARED_ONLY_CXX_LIB)'
+    self.link_cmd = '$(LINK_SHARED_ONLY_CXX_LIB)'
+
 class TargetRaModule(TargetLib):
   pass
 
@@ -1031,6 +1047,8 @@ _build_types = {
   'ra-module': TargetRaModule,
   'fs-module': TargetFsModule,
   'apache-mod': TargetApacheMod,
+  'shared-only-lib': TargetSharedOnlyLib,
+  'shared-only-cxx-lib': TargetSharedOnlyCxxLib,
   'javah' : TargetJavaHeaders,
   'java' : TargetJavaClasses,
   'i18n' : TargetI18N,

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1802612&r1=1802611&r2=1802612&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Fri Jul 21 17:05:13 2017
@@ -1005,6 +1005,7 @@ if test "$enable_disallowing_of_undefine
     for library_dir in "$abs_srcdir/subversion/libsvn_"*; do
       eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined"
     done
+    shared_only_LDFLAGS="-Wl,--no-undefined"
   else
     AC_MSG_RESULT([no])
     if test "$enable_disallowing_of_undefined_references" = "yes"; then
@@ -1012,8 +1013,6 @@ if test "$enable_disallowing_of_undefine
     fi
   fi
 fi
-AC_SUBST([libsvn_auth_gnome_keyring_LDFLAGS])
-AC_SUBST([libsvn_auth_kwallet_LDFLAGS])
 AC_SUBST([libsvn_client_LDFLAGS])
 AC_SUBST([libsvn_delta_LDFLAGS])
 AC_SUBST([libsvn_diff_LDFLAGS])
@@ -1028,6 +1027,7 @@ AC_SUBST([libsvn_ra_svn_LDFLAGS])
 AC_SUBST([libsvn_repos_LDFLAGS])
 AC_SUBST([libsvn_subr_LDFLAGS])
 AC_SUBST([libsvn_wc_LDFLAGS])
+AC_SUBST([shared_only_LDFLAGS])
 
 
 AC_ARG_ENABLE(maintainer-mode,