changeset 5502:b4c4a5def857

coreutils: RPATH build fixes.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 20 Aug 2009 20:33:52 +0200
parents 82d782f62ab1
children c30fdabcb35a
files gub/specs/coreutils.py
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gub/specs/coreutils.py	Thu Aug 20 20:05:34 2009 +0200
+++ b/gub/specs/coreutils.py	Thu Aug 20 20:33:52 2009 +0200
@@ -1,5 +1,6 @@
 import os
 #
+from gub import misc
 from gub import tools
 
 '''
@@ -24,8 +25,8 @@
             self.file_sub ([('noinst_LIBRARIES', 'lib_LIBRARIES')],
                            '%(srcdir)s/lib/gnulib.mk')
             self.file_sub ([
-                    ('libcoreutils[.]a', 'libcoreutils.so'),
-                    ('([(]LIBINTL[)]) ../lib/libcoreutils.so', r'\1'),
+                    (r'libcoreutils[.]a', 'libcoreutils.so'),
+                    ('[.][.]/lib/libcoreutils.so ([$][(]LIBINTL[)]) [.][.]/lib/libcoreutils.so', r'-L../lib -lcoreutils \1'),
                     ], '%(srcdir)s/src/Makefile.in')
     def _get_build_dependencies (self):
         if 'BOOTSTRAP' in os.environ.keys () or no_patch:
@@ -43,10 +44,13 @@
         return (tools.AutoBuild.configure_command (self)
                 + ' CFLAGS=-fPIC')
     def makeflags (self):
-        return ''' LDFLAGS='%(rpath)s' LIBS='$(cp_LDADD) $(ls_LDADD) -lm' RANLIB='mvaso () { test $$(basename $$1) == libcoreutils.a && mv $$1 $$(dirname $$1)/$$(basename $$1 .a).so || : ; }; mvaso ' libcoreutils_a_AR='gcc -shared -o' '''
-    def wrap_executables (self):
-        # using rpath
-        pass
+        return misc.join_lines ('''
+V=1
+LDFLAGS='%(rpath)s'
+LIBS='$(cp_LDADD) $(ls_LDADD) -lm'
+RANLIB='mvaso () { test $$(basename $$1) == libcoreutils.a && mv $$1 $$(dirname $$1)/$$(basename $$1 .a).so || : ; }; mvaso '
+libcoreutils_a_AR='gcc -shared -o'
+''')
     def install (self):
         # The RANLIB/mvaso trick needs libcoreutils.a to exist at install time.
         self.system ('cd %(builddir)s/lib && ln -f libcoreutils.so libcoreutils.a')
@@ -55,3 +59,6 @@
         if 'BOOTSTRAP' in os.environ.keys () or no_patch:
             self.system ('mkdir -p %(install_prefix)s/lib')
             self.system ('cp -pv %(builddir)s/lib/libcoreutils* %(install_prefix)s/lib')
+    def wrap_executables (self):
+        # using rpath
+        pass