[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compiler search path too
From: |
Peter O'Gorman |
Subject: |
compiler search path too |
Date: |
Mon, 28 Jan 2008 00:50:05 -0600 |
User-agent: |
Thunderbird 2.0.0.9 (X11/20071115) |
Hi,
I am planning on committing these in the morning. Because I am using a
new substituted variable, the only ideas I could come up with for tests
were very contrived and would have been more or less worthless. I will
happily take advice on implementing a test though.
There is another problem of course, gcc is searching dirs that we are
not finding even with the combination of -print-search-dirs and
-print-multi-os-directory.
So, I guess next patch will link a test program verbosely, find the -L,
and prefix those to the sys_lib_search_path_spec if they are not already
there.
Peter
--
Peter O'Gorman
http://pogma.com
Index: ChangeLog
===================================================================
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.2573
diff -u -r1.2573 ChangeLog
--- ChangeLog 27 Jan 2008 16:35:36 -0000 1.2573
+++ ChangeLog 28 Jan 2008 06:41:44 -0000
@@ -1,3 +1,10 @@
+2008-01-28 Peter O'Gorman <address@hidden>
+
+ Search the compiler path too.
+ * libltdl/m4/libtool.m4 (compiler_lib_search_dirs): New variable.
+ * libltdl/config/ltmain.m4sh: Use it.
+ Reported by Maynard Johnson
+
2008-01-27 Gary V. Vaughan <address@hidden>
* libtoolize.m4sh (func_install_pkgconfig_files)
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /sources/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.96
diff -u -r1.96 ltmain.m4sh
--- libltdl/config/ltmain.m4sh 14 Jan 2008 22:06:00 -0000 1.96
+++ libltdl/config/ltmain.m4sh 28 Jan 2008 06:41:48 -0000
@@ -4103,7 +4103,12 @@
fi
func_stripname '-l' '' "$deplib"
name=$func_stripname_result
- for searchdir in $newlib_search_path $lib_search_path
$sys_lib_search_path $shlib_search_path; do
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path
$compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path
$sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
Index: libltdl/m4/libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.131
diff -u -r1.131 libtool.m4
--- libltdl/m4/libtool.m4 24 Jan 2008 06:55:36 -0000 1.131
+++ libltdl/m4/libtool.m4 28 Jan 2008 06:41:53 -0000
@@ -6471,6 +6471,12 @@
case " $_LT_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo "
${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^
!!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
_LT_TAGDECL([], [predep_objects], [1],
[Dependencies to place before and after the objects being linked to
create a shared library])
Index: ChangeLog
===================================================================
RCS file: /sources/libtool/libtool/ChangeLog,v
retrieving revision 1.1220.2.489
diff -u -r1.1220.2.489 ChangeLog
--- ChangeLog 24 Jan 2008 16:12:18 -0000 1.1220.2.489
+++ ChangeLog 28 Jan 2008 06:41:35 -0000
@@ -1,3 +1,10 @@
+2008-01-28 Peter O'Gorman <address@hidden>
+
+ Search the compiler path too.
+ * libtool.m4 (compiler_lib_search_dirs): New variable.
+ * ltmain.in: Use it.
+ Reported by Maynard Johnson
+
2008-01-24 Peter O'Gorman <address@hidden>
* doc/libtool.texi: Fixup Notes.
Index: libtool.m4
===================================================================
RCS file: /sources/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.193
diff -u -r1.314.2.193 libtool.m4
--- libtool.m4 24 Jan 2008 06:56:05 -0000 1.314.2.193
+++ libtool.m4 28 Jan 2008 06:41:39 -0000
@@ -2820,6 +2820,7 @@
_LT_AC_TAGVAR(predeps, $1)=
_LT_AC_TAGVAR(postdeps, $1)=
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
# Source file extension for C++ test sources.
ac_ext=cpp
@@ -3822,7 +3823,8 @@
# compiler output when linking a shared library.
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
dnl we can't use the lt_simple_compile_test_code here,
dnl because it contains code intended for an executable,
dnl not a library. It's possible we should let each
@@ -3947,6 +3949,11 @@
$rm -f confest.$objext
+_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo "
${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^
!!'`
+fi
+
# PORTME: override above test on systems where it is broken
ifelse([$1],[CXX],
[case $host_os in
@@ -4003,7 +4010,6 @@
;;
esac
])
-
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
esac
@@ -4269,6 +4275,7 @@
_LT_AC_TAGVAR(predeps, $1) \
_LT_AC_TAGVAR(postdeps, $1) \
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
_LT_AC_TAGVAR(archive_cmds, $1) \
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
_LT_AC_TAGVAR(postinstall_cmds, $1) \
@@ -4568,6 +4575,10 @@
# shared library.
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+# The directories searched by this compiler when creating a shared
+# library
+compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
+
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
Index: ltmain.in
===================================================================
RCS file: /sources/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.148
diff -u -r1.334.2.148 ltmain.in
--- ltmain.in 21 Jan 2008 17:47:51 -0000 1.334.2.148
+++ ltmain.in 28 Jan 2008 06:41:42 -0000
@@ -2156,7 +2156,12 @@
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
- for searchdir in $newlib_search_path $lib_search_path
$sys_lib_search_path $shlib_search_path; do
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path
$compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path
$sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
for search_ext in .la $std_shrext .so .a; do
# Search the libtool library
lib="$searchdir/lib${name}${search_ext}"
- compiler search path too,
Peter O'Gorman <=