On 06/10/2010 03:07 PM, Peter O'Gorman wrote:
On 06/10/2010 11:10 AM, Peter O'Gorman wrote:
Hi,
I got an off-list report from a user about test failures in 2.2.6b, that
turned out to be either because he'd configured with --disable-shared or
libtool had incorrectly guessed that his system did not support shared
libraries. (lots of lag in the exchange).
Logs from clean tree of the unexpected failures.
../../libtool/tests/duplicate_conv.at:79: $LIBTOOL --mode=link --tag=CC $CC
$CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la
stderr:
stdout:
libtool: link: /usr/bin/ld -r -o cee.o --whole-archive a/.libs/liba.a
b/.libs/liba.a --no-whole-archive
../../libtool/tests/duplicate_conv.at:81: $LIBTOOL --mode=link $CC $CFLAGS
$LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT
This patch fixes the above problem with libtool dropping the c.lo
object. Test passes with and without --disable-shared.
Ok?
Peter
>From 281573a54983f82b03b13d786cdb77e5c04ed411 Mon Sep 17 00:00:00 2001
From: Peter O'Gorman <pe...@pogma.com>
Date: Thu, 10 Jun 2010 22:00:47 -0500
Subject: [PATCH] Create reloadable object files with non-pic objects too.
* libltdl/config/ltmain.m4sh: When not building a shared
library, use the non-pic objects to create a reloadable
object, because pic objects do not exist.
---
ChangeLog | 7 +++++++
libltdl/config/ltmain.m4sh | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 24de21d..7ebfe16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-10 Peter O'Gorman <pe...@pogma.com>
+
+ Create reloadable object files with non-pic objects too.
+ * libltdl/config/ltmain.m4sh: When not building a shared
+ library, use the non-pic objects to create a reloadable
+ object, because pic objects do not exist.
+
2010-06-09 Ralf Wildenhues <ralf.wildenh...@gmx.de>
Factorize testing gcj installation in the testsuite.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 9e6646f..5906552 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -7180,6 +7180,9 @@ EOF
fi
fi
+ # If we're not building shared, we need to use non_pic_objs
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
# Create the old-style object.
reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
--
1.7.0.1