From 148027b94c779f3e52d167bdab6c72404ab2884a Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 24 Oct 2006 20:17:38 +0000 Subject: [PATCH] * NEWS: Account for recent multilib fix. * tests/search-path.at: New test, to provide at least a weak test. * Makefile.am: Update. --- ChangeLog | 5 +++++ Makefile.am | 1 + NEWS | 1 + tests/search-path.at | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 tests/search-path.at diff --git a/ChangeLog b/ChangeLog index d0cfabc7..3427fb9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-10-24 Ralf Wildenhues + * NEWS: Account for recent multilib fix. + * tests/search-path.at: New test, to provide at least a weak + test. + * Makefile.am: Update. + * libtoolize.m4sh (func_fixup_Makefile): Fix missing substitution for nonrecursive mode. Remove otherwise-empty continuation lines in the output file. diff --git a/Makefile.am b/Makefile.am index 30d01c64..2f316fa5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -407,6 +407,7 @@ TESTSUITE_AT = tests/testsuite.at \ tests/shlibpath.at \ tests/static.at \ tests/destdir.at \ + tests/search-path.at \ tests/old-m4-iface.at \ tests/am-subdir.at \ tests/standalone.at \ diff --git a/NEWS b/NEWS index 098bcef0..3dedbb7f 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,7 @@ New in 1.9h: 2005-??-??; CVS version 2.1a, Libtool team: as BeOS. * Initial support for the Sun compiler suite on GNU/Linux. * Improved support for GNU/kFreeBSD and GNU/NetBSD. +* Search paths with GCC on multilib systems like x86_64 have been fixed. * Bug fixes. New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team: diff --git a/tests/search-path.at b/tests/search-path.at new file mode 100644 index 00000000..ab0eca04 --- /dev/null +++ b/tests/search-path.at @@ -0,0 +1,43 @@ +# Hand crafted tests for GNU Libtool. -*- Autotest -*- +# Copyright 2006 Free Software Foundation, Inc. + +# 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, 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. + +AT_SETUP([sys_lib_search_path]) +AT_KEYWORDS([libtool]) +LDFLAGS="$LDFLAGS -no-undefined" + +AT_DATA([main.c], +[[extern int inflate (); +int main() +{ + return inflate (); +} +]]) + +$CC $CPPFLAGS $CFLAGS -c main.c +eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='` +eval sys_lib_search_path=\"$sys_lib_search_path_spec\" +for path in $sys_lib_search_path; do + if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -L$path -lz + then + AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -lz], + [], [ignore], [ignore]) + break + fi +done + +AT_CLEANUP