libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: piecewise linking fix


From: Ralf Wildenhues
Subject: Re: piecewise linking fix
Date: Wed, 2 Feb 2005 23:06:29 +0100
User-agent: Mutt/1.5.6+20040907i

* Ralf Wildenhues wrote on Wed, Feb 02, 2005 at 09:16:40PM CET:
> Forward-port of the test will follow.

against 2-0 below, against HEAD attached.

        * config/ltmain.m4sh, tests/defs.m4sh: Typos.
        * tests/Makefile.am, tests/reload.test:
        New test to check for piecewise linking with subdir-objects.

Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.38
diff -u -r1.1.2.38 ltmain.m4sh
--- config/ltmain.m4sh  1 Feb 2005 07:35:05 -0000       1.1.2.38
+++ config/ltmain.m4sh  2 Feb 2005 21:12:49 -0000
@@ -5130,7 +5130,7 @@
              eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
            fi
 
-           # Set up a command to remove the reloadale object files
+           # Set up a command to remove the reloadable object files
            # after they are used.
            i=0
            while test "$i" -lt "$k"
Index: tests/defs.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/defs.m4sh,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 defs.m4sh
--- tests/defs.m4sh     24 Jan 2005 07:46:17 -0000      1.1.2.6
+++ tests/defs.m4sh     2 Feb 2005 21:12:49 -0000
@@ -122,7 +122,7 @@
 # Extract host from the libtool configuration
 func_get_config "host" "$LIBTOOL --config" ": fatal"
 
-# Extract host from the libtool configuration
+# Extract build from the libtool configuration
 func_get_config "build" "$LIBTOOL --config" ": fatal"
 
 # func_mkprefixdir
Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/Makefile.am,v
retrieving revision 1.41.2.6
diff -u -r1.41.2.6 Makefile.am
--- tests/Makefile.am   26 Jan 2005 17:53:26 -0000      1.41.2.6
+++ tests/Makefile.am   2 Feb 2005 21:12:49 -0000
@@ -33,6 +33,7 @@
 COMMON_TESTS = \
        link.test link-2.test nomode.test objectlist.test \
        quote.test sh.test suffix.test tagtrace.test \
+       reload.test \
        cdemo-static.test cdemo-make.test cdemo-exec.test \
        demo-static.test demo-make.test demo-exec.test \
        demo-inst.test demo-unst.test \
--- /dev/null   2005-01-02 13:09:49.000000000 +0100
+++ tests/reload.test   2005-02-02 20:54:16.000000000 +0100
@@ -0,0 +1,49 @@
+#! /bin/sh
+# reload.test - check whether putting the command line together in pieces works
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
+
+. ./defs || exit 1
+# Test script header.
+
+set -e
+
+objdir='reload-test-dir'
+rm -rf $objdir
+mkdir $objdir
+
+# Create a new libtool script that has a low max_cmd_len
+sed 's/^max_cmd_len=.*$/max_cmd_len=10/' < $LIBTOOL > $objdir/libtool
+chmod +x $objdir/libtool
+
+LIBTOOL=$objdir/libtool
+
+for i in 1 2 3 4 5
+do
+  echo "int x$i = 42;" > $objdir/$i.c
+  $LIBTOOL --mode=compile $CC -c -o $objdir/$i.lo $objdir/$i.c
+done
+
+$LIBTOOL --mode=link $CC -o $objdir/libfoo.la $objdir/*.lo
+$LIBTOOL --mode=link $CC -o $objdir/libfoo.la $objdir/*.lo -rpath /nonexistent
+
+rm -rf $objdir
+exit $EXIT_SUCCESS

Attachment: reloadhead
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]