[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Archiver handling
From: |
Peter Rosin |
Subject: |
Re: Archiver handling |
Date: |
Tue, 20 Jan 2009 23:37:09 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (Windows/20081209) |
Den 2009-01-20 23:35 skrev Peter Rosin:
Den 2009-01-13 10:48 skrev Peter Rosin:
Den 2009-01-13 10:39 skrev Peter Rosin:
libtool-ar.patch
http://lists.gnu.org/archive/html/libtool-patches/2008-09/msg00003.html
No ChangeLog entry written yet.
Sorry 'bout that...
Here's an incremental update that makes the "Link option thorough
search test" proceed a bit further for MSYS/MSVC.
Basically it makes libtool itself use the new --mode=ar to create
archives if the archiver is odd (i.e. MS lib.exe). --mode=ar is
then extended to translate the path of the archive to host native
format which makes it possible to create archives with absolute
pathnames.
(Fails w/o this patch since MSYS doesn't convert pathnames in
arguments if they are prefixed the wrong way. In this case lib.exe
is called with "lib -out:/absolute/archive/name.lib" as MSYS does
not recognize that it has to convert /absolute/archive/name.lib to
a win32 path for lib.exe to understand it).
Blast, forgot the patch...
Cheers,
Peter
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 36dd3fb..fef7a0c 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -8256,9 +8258,10 @@ func_mode_ar ()
for arg
do
if test -z "$archive"; then
- archive=$arg
+ func_to_host_path "$arg"
+ archive=$func_to_host_path_result
else
- files="$files $arg"
+ files="$files $arg"
fi
done
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index e886d3d..c8a46eb 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1320,6 +1320,11 @@ lib)
;;
esac
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+_LT_DECL([], [AR_TFLAGS], [1], [Flags to list archive content])
+_LT_DECL([], [AR_XFLAGS], [1], [Flags to extract an archive])
+_LT_DECL([], [AR_SEP], [1], [Separator between AR flags and AR files])
+
if test -n "$AR_SEP" &&
test "X$AR_TFLAGS" = Xt &&
test "X$AR_XFLAGS" = Xx &&
@@ -1327,20 +1332,23 @@ if test -n "$AR_SEP" &&
then
LT_AR='$(AR)'
LT_ARFLAGS='$(AR_FLAGS)'
+ lt_ar=\$AR
+ lt_arflags=\$AR_FLAGS
else
- LT_AR='$(SHELL) $(abs_top_builddir)/libtool --quiet --mode=ar'
+ LT_AR='$(SHELL) $(top_builddir)/libtool --quiet --mode=ar'
LT_ARFLAGS=cru
+ lt_ar="\"\$SHELL \[$]0 --quiet --mode=ar\""
+ lt_arflags=cru
fi
+_LT_DECL([LT_AR], [lt_ar], [0], [The portable archiver])
+_LT_DECL([LT_ARFLAGS], [lt_arflags], [0],
+ [Flags to portably create an archive])
_LT_DECL([], [ar_extract_one_by_one], [1],
[Extract archive members one by one])
_LT_DECL([], [archiver_list_spec], [1],
[How to feed a file listing to the archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-_LT_DECL([], [AR_TFLAGS], [1], [Flags to list archive content])
-_LT_DECL([], [AR_XFLAGS], [1], [Flags to extract an archive])
-_LT_DECL([], [AR_SEP], [1], [Separator between AR flags and AR files])
AC_SUBST([LT_AR])
AC_SUBST([LT_ARFLAGS])
AC_SUBST([AR])
@@ -1363,7 +1371,7 @@ _LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])
# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS$AR_SEP$oldlib$oldobjs'
+old_archive_cmds='$LT_AR $LT_ARFLAGS $oldlib$oldobjs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=